-
Notifications
You must be signed in to change notification settings - Fork 3.7k
GaussianSplatPrimitive Multiple Instances Fix #12838
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
base: main
Are you sure you want to change the base?
Conversation
… them for rendering. glTF attribute buffer is kept as ground truth
Thank you for the pull request, @keyboardspecialist! ✅ We can confirm we have a CLA on file for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @keyboardspecialist! Code changes look good over all.
I was able to reproduce the issue in main fairly reliably by disabling my browser cache. In this brain, both tileset appear correctly even without the cache. 👍
As always, would it be possible to add a unit test?
positions: { | ||
get: function () { | ||
return this._positions; | ||
}, | ||
}, | ||
|
||
rotations: { | ||
get: function () { | ||
return this._rotations; | ||
}, | ||
}, | ||
|
||
scales: { | ||
get: function () { | ||
return this._scales; | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inline docs?
Description
When loaded multiple instances of the same Gaussian Splat model, any subsequent loaded instances would have their tiles transformed incorrectly. The primitive was transforming and modifying the underlying glTF attribute buffers. Any new instances loaded would not know those buffers were modified in any way and proceed to perform their own transforms on them.
This simply makes copies of those buffers into the GaussianSplat3DTileContent class, so they can be transformed and modified locally in the GaussianSplatPrimitive class without affecting other instances. When transforming child tiles into root tile space and when gathering tile data for rendering we read from the local copies rather than from the glTF attributes directly.
Issue number and link
Fixes #12795
Testing plan
Load this Sandcastle. It's essentially a race condition whether or not both tileset instances load correctly. Most of the time one will have tiles incorrectly rendered.
Broken Split Pane Sandcastle
Same demo but on this branch using local buffers for each instance. Each gets transformed correctly.
Fixed Splt Pane Sandcastle
Author checklist
CONTRIBUTORS.md
CHANGES.md
with a short summary of my change