Skip to content

Updated simplification algorithm #91

Merged
HeDo88TH merged 6 commits intomasterfrom
improve-mesh-decimation
Mar 16, 2026
Merged

Updated simplification algorithm #91
HeDo88TH merged 6 commits intomasterfrom
improve-mesh-decimation

Conversation

@HeDo88TH
Copy link
Collaborator

@HeDo88TH HeDo88TH commented Mar 15, 2026

  • Updated simplification algorithm
  • Refactored options
  • Cleanup dead code

Fixes #23

@HeDo88TH HeDo88TH self-assigned this Mar 15, 2026
Copilot AI review requested due to automatic review settings March 15, 2026 21:12
@HeDo88TH HeDo88TH added bug Something isn't working enhancement New feature or request labels Mar 15, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the mesh decimation stage to address issue #23 (later LODs not further reducing) by refactoring how simplification parameters are passed into MeshDecimatorCore, while also removing unused vertex-attribute code paths.

Changes:

  • Replace legacy decimator flags with a new SimplificationOptions configuration object passed from DecimationStage.
  • Modify FastQuadricMeshSimplification to use Options, add curvature-weighted error, and change attribute blending behavior.
  • Remove dead code for tangents/bone weights in MeshDecimatorCore.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Obj2Tiles/Stages/DecimationStage.cs Switches decimation setup to SimplificationOptions and adds a warning when reduction is minimal.
MeshDecimatorCore/SimplificationOptions.cs Introduces a new options struct to configure simplification behavior.
MeshDecimatorCore/Algorithms/DecimationAlgorithm.cs Replaces PreserveBorders with an Options property to carry simplification settings.
MeshDecimatorCore/Algorithms/FastQuadricMeshSimplification.cs Refactors algorithm behavior to read from Options, adds curvature handling, and changes vertex attribute interpolation strategy.
MeshDecimatorCore/Mesh.cs Removes tangents/bone-weight support and related recalculation logic.
MeshDecimatorCore/BoneWeight.cs Removes unused bone-weight type as part of dead-code cleanup.

@HeDo88TH HeDo88TH merged commit d345c5d into master Mar 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Decimation only works for LOD 1, subsequents LODs are having same size

2 participants