Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimplifyQuadricDecimation fixes #6163

Merged
merged 7 commits into from
Aug 15, 2023

Commits on May 19, 2023

  1. SimplifyQuadricDecimation: Check for flipped triangles connected to b…

    …oth vertices of the removed edge
    
    The previous code checks if any triangles connected to the removed vertex are flipped in the process of collapsing the edge. However, since the remaining vertex on the collapsed edge can be moved during the operation, triangles connected to this vertex can flip as well. This commit puts the flip-checking code into a loop so we can check both sets of triangles.
    bjudeworley committed May 19, 2023
    Configuration menu
    Copy the full SHA
    2e8b510 View commit details
    Browse the repository at this point in the history
  2. SimplifyQuadricDecimation: Disallow creating very small triangles

    This sets a threshold on how much any triangle can shrink in area during an edge collapse which should avoid creating degenerate triangles. The threshold is somewhat arbitrary, I found 0.001 worked well but it may make sense for this to become a function parameter.
    bjudeworley committed May 19, 2023
    Configuration menu
    Copy the full SHA
    5ba784e View commit details
    Browse the repository at this point in the history
  3. SimplifyQuadricDecimation: Prevent 'pinching' of triangles

    When a vertex is connected to exactly 3 triangles and an edge of one of these triangles not connected to the vertex is collapsed, the remaining 2 triangles end up sharing the same vertices, with opposite normals. This creates a non-manifold location which is nearly always undesirable.
    This commit adds a check to see if any of the triangles attached to the collapsing edge share an edge that is not connected to `vidx0` or `vidx1`
    bjudeworley committed May 19, 2023
    Configuration menu
    Copy the full SHA
    6b24ae9 View commit details
    Browse the repository at this point in the history
  4. SimplifyQuadricDecimation: Save some memory by clearing some vectors …

    …after they are no longer needed
    bjudeworley committed May 19, 2023
    Configuration menu
    Copy the full SHA
    1a8dadd View commit details
    Browse the repository at this point in the history

Commits on May 22, 2023

  1. Configuration menu
    Copy the full SHA
    b2072c9 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2023

  1. SimplifyQuadricDecimation: Reduce memory requirements by removing nee…

    …d for vbars & costs maps
    
    Reduces the memory footprint by 27% in my tests runs ~15% faster as we remove a lot of allocations.
    bjudeworley committed Jun 1, 2023
    Configuration menu
    Copy the full SHA
    8ebef77 View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2023

  1. SimplifyQuadricDecimation: Simplify checking for pinched triangles

    Changing from tracking edges (`unordered_set<Vector2i>`) to vertices (`unordered_map<int, int>) gives a good performance increase
    bjudeworley committed Jun 3, 2023
    Configuration menu
    Copy the full SHA
    3a84a3f View commit details
    Browse the repository at this point in the history