Git Product home page Git Product logo

quadric-mesh-simplification's People

Contributors

bimsarapathiraja avatar freakthemighty avatar friggog avatar jannessm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

quadric-mesh-simplification's Issues

Type mismatch on windows

Hey @jannessm I'm looking forward to trying out this library! Running on windows, I bumped into this type error. It seems that the long type is not cross compatible with windows. This project seems to have bumped into a similar issue. I wonder, is it possible to apply a similar fix to this project?

quadric-mesh-simplification\quad_mesh_simplify\simplify_test.py", line 63, in test_simplify_mesh_without_threshold
    res_pos, res_face = simplify_mesh(np.copy(pos), np.copy(face), 10 - i)
  File "quad_mesh_simplify\simplify.pyx", line 73, in quad_mesh_simplify.simplify.simplify_mesh
    face_copy = np.copy(face_in)
ValueError: Buffer dtype mismatch, expected 'DTYPE_LONG_T' but got 'long'

Clarification on Documentation

Hello thanks for working on this project, it is quite timely for my own project. For the arguments of positions and faces are the positions expected to be in any sort of order, i.e. should the positions be ordered to match their reference in the faces array?
example: faces = [[1,4,5], [0,2,3]] should the positions then be: [[x,yz] (1), [x,y,z] (4), [x,y,z] (5),...] or is it [[x,z,y] (0), [x,y,z] (1), [x,y,z] (2),...]

Performance | Mesh > 100K slow to process & memory hungry

@jannessm I know you're quite busy, but just wanted to capture my findings when processing larger meshes. I've found that when decimating meshes larger than ~100K triangles decimation grinds to a stop.

For examples:

    sphere = trimesh.creation.icosphere(subdivisions=7, radius=1.0, color=None)
    simplified = simplify_mesh(np.array(sphere.vertices),
                               np.array(sphere.faces, dtype=np.uint32),
                               len(sphere.vertices) // 2)

Some informal measurements:

  • This consumes ~1.3GB of memory. I think that ~161MB of that is the mesh.
  • I haven't yet seen the algorithm complete. I'm not sure the longest I've let it run, but I think I may have let this run for hours at some point

The closest comparison to this library that I have for comparison is a decimation implementation in OpenMesh. It doesn't have all the same features. For example, it doesn't seem to handle edge preservation as well, so it may not be a fair performance comparison. Nonetheless, it decimates this sphere in less than 1 second and I believe uses less than 1GB of memory.

Tracking simplification

Hi !

First, thanks for your work, it works very nicely !

I have a question : what do you think about tracking the simplification ? Could the function to simplify a mesh return like a set of edges and the movement of vertices that were simplified ? With those return infos, it would be possible to apply exactly the same simplification to a mesh that has the same connectivity but that has its vertices other positions.

Thanks !

Maximum error

It would be great to support a maximum error parameter. Ideally we can say, “decimate this mesh to n faces, but don’t remove any faces then produce error greater than x threshold.”

This would allow a more aggressive face target, while maintaining a particular level of quality.

Python 3.10 wheels

Any chance of some python 3.10 wheels for this package? Having issues installing on 3.10 currently

Four faced quad

I don't think this is bug, but I thought I'd pose the question here.

When I decimate a very thin piece of geometry sometimes I find quads, 4 vertices, that have 4 faces instead of 2. The result is a lot of z-fighting in my final application. I've been trying to figure out if this is something I could to clean up as a post process, but can't quite figure out a general way to describe the issue never mind an algorithm for cleaning it up.

Do you think this is something that could be improved in the decimation algorithm? Any other thoughts about how to approach the issue?

image

Trouble in installing

I'm sorry that I have trouble in installing your package. When I use pip install quad_mesh_simplify, it only install a dist-info folder. When I download the repository, and run the command that your provide, It just fails. What's wrong?

Version confusion

Hi @jannessm 👋 . I'm a big confused about the 1.1.1 version published to pypi.

If I try to install 1.1.1, I get the old version

$ pip install quad_mesh_simplify==1.1.1

Collecting quad_mesh_simplify==1.1.1
Using cached quad_mesh_simplify-1.1.1-cp36-cp36m-manylinux1_x86_64.whl (105 kB)
Requirement already satisfied: numpy in /usr/local/lib/python3.6/site-packages (from quad_mesh_simplify==1.1.1) (1.18.1)
Requirement already satisfied: cython in /usr/local/lib/python3.6/site-packages (from quad_mesh_simplify==1.1.1) (0.29.21)
Installing collected packages: quad-mesh-simplify
Successfully installed quad-mesh-simplify-1.1.0

It took some digging through pypi, but then I noticed some of the pypi artifacts seem to be published to 1.1.1a.

$ pip install quad_mesh_simplify==1.1.1a

Collecting quad_mesh_simplify==1.1.1a
Using cached quad_mesh_simplify-1.1.1a-cp36-cp36m-manylinux1_x86_64.whl (105 kB)
Requirement already satisfied: cython in /usr/local/lib/python3.6/site-packages (from quad_mesh_simplify==1.1.1a) (0.29.21)
Requirement already satisfied: numpy in /usr/local/lib/python3.6/site-packages (from quad_mesh_simplify==1.1.1a) (1.18.1)
Installing collected packages: quad-mesh-simplify
Successfully installed quad-mesh-simplify-1.1.1


So I guess the question is, did something go wrong on publishing? Should the package version be changed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.