Scale hidden line tolerance to model size and add optional full wireframe toggle#7
Open
dirlligafu wants to merge 1 commit into
Open
Scale hidden line tolerance to model size and add optional full wireframe toggle#7dirlligafu wants to merge 1 commit into
dirlligafu wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
Some models render with interior geometry visibly bleeding through the exterior ("x-ray" look, see #6) even though hidden-line removal is supposed to hide anything blocked from view. The actual cause isn't the model (normals, winding, etc. all checked out fine on the reported model). It's that the tolerance used to decide whether an edge is hidden behind a surface was a fixed absolute value, tuned for a "normal-size car" scale. Models exported at a very different unit scale (common for a lot of free/community downloads) end up with a tolerance larger than the entire model, so the occlusion test can never actually hide anything.
What was added / modified
Testing
Reproduced the exact issue on the model from #6, confirmed the fix resolves it, and confirmed the new toggle reproduces the old full-wireframe look on demand when turned on. Also tested against several other models at normal scale to confirm no regression (huge X4 Foundations Carrier ships and small scout vessels models, all behaved as expected)
Closes #6
Preview
All lines hidden
All lines visible (none hidden)
Extra option in section 5 :