Skip to content
David Komer edited this page May 31, 2018 · 1 revision

All of the required data for rendering a GltfMeshNode with a skin travels along with it as pure data (e.g. inverseBindMatrix, nodeId to find joints, etc.)

From the perspective of the app logic, this is simple - just update the joint transforms (e.g. via animation, or manual) and pass the scene as normal.

From the renderer point of view- note that the joints do need to be found by walking the tree (comparison is on originalNodeId) - therefore the approach right now is that every tick the transforms for the entire tree are updated. There is a bit of an optimisation there for skin searching where it exists early, however.

In many cases this probably could be improved, especially for large scenes, e.g. detecting the parts of the tree that need to be changed and only updating those, however it can be rather tricky since these changes need to be propogated in either case of the mesh sub-tree or the joint sub-tree being changed... and we want to avoid doing that except on tick, so it would require some diffing algorithm or a cache of changes to only push those on tick.

Clone this wiki locally