You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the NodeMaterial system creates different shader program variants between different skeletons, resulting in a long compilation time.
Is it possible to use the same program variant between skinned mesh with different skeletons?
In three-vrm, we are using a function called removeUnnecessaryJoints, which generates skeletons for each mesh to prevent exceeding the maximum uniform count on mobile devices.
it would be nice if we could put a bone count instead and make it work properly, for example.
Probably we have to modify how we upload bone matrices as a uniform array? since it's not working as is.
Alternatives
Alternatively, I can change the removeUnnecessaryJoints to create less skeletons when there are many meshes but I'm yet to come up with a way.
I can align the bone count between skeletons by adding dummy bones at the tails of arrays.
Additional context
I think this is pretty much the bare minimum to check the behavior.
it would be nice if we could put a bone count instead and make it work properly, for example.
Probably we have to modify how we upload bone matrices as a uniform array? since it's not working as is.
Sounds good define a bone count as part of cache key, I think that some modifications will be necessary in SkinningNode to this work properly, maybe manage reference nodes like we did in MorphNode, I will have to check that.
Description
Currently, the NodeMaterial system creates different shader program variants between different skeletons, resulting in a long compilation time.
Is it possible to use the same program variant between skinned mesh with different skeletons?
Related: #27398
Context:
In three-vrm, we are using a function called
removeUnnecessaryJoints
, which generates skeletons for each mesh to prevent exceeding the maximum uniform count on mobile devices.The function body:
https://github.com/pixiv/three-vrm/blob/v2.0.10/packages/three-vrm/src/VRMUtils/removeUnnecessaryJoints.ts
Solution
Currently, we are dispatching variants by adding skeleton uuid to the cache key.
three.js/examples/jsm/renderers/common/RenderObject.js
Line 136 in 841d2e7
it would be nice if we could put a bone count instead and make it work properly, for example.
Probably we have to modify how we upload bone matrices as a uniform array? since it's not working as is.
Alternatives
Alternatively, I can change the
removeUnnecessaryJoints
to create less skeletons when there are many meshes but I'm yet to come up with a way.I can align the bone count between skeletons by adding dummy bones at the tails of arrays.
Additional context
I think this is pretty much the bare minimum to check the behavior.
https://glitch.com/edit/#!/denim-valley-echinodon
The text was updated successfully, but these errors were encountered: