#3988 Don't render malformed sculpts#5951
Open
akleshchev wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to mitigate severe performance impact from malformed sculpt maps by validating generated sculpt geometry and substituting an empty placeholder mesh when the geometry appears pathological. It adds a small per-LOD cache to avoid repeating the validation work.
Changes:
- Add a per-LOD sculpt validation cache to
LLVolume, resetting it when the volume is dirtied. - Introduce sculpt geometry validation based on total triangle surface area vs. bounding-box surface area, and replace invalid sculpts with an empty placeholder.
- Make
sculpt_calc_mesh_resolution()local tollvolume.cpp.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
indra/llmath/llvolume.h |
Adds sculpt validation cache state and resets it on setDirty(). |
indra/llmath/llvolume.cpp |
Initializes the cache, validates sculpt faces, and swaps in placeholder geometry for invalid sculpts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f9a4de0 to
60bd303
Compare
60bd303 to
c7d14a5
Compare
maxim-productengine
approved these changes
Jun 25, 2026
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.
Not sure if this is a good idea, but malformed sculpts hit performance hard and this change seems to work with the example I have.