-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Introduce ScaledTriMesh shape #36
base: master
Are you sure you want to change the base?
Conversation
5a7aa0f
to
c44f26c
Compare
Can we merge this? |
It should be tested first, and I'd like to see the discussion points addressed. Especially given that the QBVH isn't shared, I'm not sure it's worth the trouble vs. just duplicating geometry as needed. |
My usecase is exactly this, our data comes from regular gltf files and so we inherit their transforms and need to pass those onto runtime systems like the physics system. Switching to uniforrm scaling wouldn't help us.
We're actually running into this - having to runtime duplicate triangle data just to get a scaled clone of the TriMesh, having this upstreamed / merged would benefit us for sure. |
The question is, is doing that duplication causing you any concrete problems? |
Yes. We have transforms changing at runtime, including scale. It's both CPU and memory overhead we want to avoid. |
Any update on this? |
Allows reuse of collision geometry between scaled objects, e.g. encoded in a GLTF file.
I think this change is more or less complete, albeit untested, but I'd like to discuss some questions before moving forwards:
QBVH
and perhaps its existing users. Losing support for some cases of GLTF is a shame, but maybe nobody uses nonuniform scaling much in practice?TriMesh
with whatever vertices it likes. Collision geometry usually isn't that big, especially for repeated objects. The composite shape abstraction makes the implementation pretty concise, but even so...