-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Fix computation of model bounding volume #12112
base: main
Are you sure you want to change the base?
Conversation
Thank you for the pull request, @javagl! ✅ We can confirm we have a CLA on file for you. |
I'll try to post intermediate updates, even though they are HIGHLY preliminary. I hope that they help to illustrate why all this takes far longer than it should. Here is the output of a debugging Sandcastle. This is similar to the one that I posted in the issue. But it shows...
For the current ("Hey, there is no 'gray' one! And/or the one for the model is completely wrong! And/or one of the bounding volumes seems to be missing!" - "Yeah. That's the point...") For the current (highly preliminary) state of this PR: It looks "less wrong". In fact, it looks completely correct. Yay! 🥳 But... ... some .... things are ... happening at different places. What is currently shown in that sandcastle are the actual bounding spheres of the model and the primitives. Let's look at the bounding spheres that are stored in the draw commands (dense red grid): I could say that "the bounding spheres are wrong", but ... in many cases, they are not even spheres 😬 Tracking down which bounding spheres this are, where they come from, where they are modified, and where they are becoming "wrong" is a challenge. It's easy to point to "some place where this might be happening". But not where it actually is happening. I'll keep digging. |
A small update, starting with some comments that I wrote locally in one of the files. I'm trying to summarize this as a form of "rubber duck debugging": The The
It is not clear what the "object space" is. Is it the space of the MODEL, or the space of the PRIMITIVE? (I.e. does it include the transform of the node that the primitive is attached to or not?) The The bunding volumes that are computed right now include
and are "correct" in terms of the visual output. But but when they are part of the I'm tempted to either
tl;dr The questions of 'Which bounding sphere includes which transform?' and 'Which matrix contains which transform?' are hard to answer. |
These "broken bounding volume visualizations" are actually tracked in #5684 (from 2017...) |
Addresses #12108
Only an early draft for now. Further details will be added here soon.
Description
...
Issue number and link
#12108
Testing plan
...
Author checklist
CONTRIBUTORS.md
CHANGES.md
with a short summary of my change