#3988 Don't render malformed sculpts#5951
Conversation
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
|
I wrote a sculpt importer, and I never synthesized points. I thought it was broken; I thought it required calculus to process, adapt, and bake. Now, I am calling this a feature instead of something malformed. I don't see the bug? |
|
The bug is a clearly 'malformed' sculpt that slows viewer from 200fps to 10fps by making viewer calculate a lot of 'occlusions' #3988 P.S. I think we had a mesh with a similar problem, but wasn't able to figure out how that was handled. |
|
The cinematic sculpts were a surprise. I digress. |
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.