3 ms·
This is the representation I usually see used for the tree of nodes for skinning 3D models. There each node has a transform, and the most common operation is to
by edflsafoiewq 3y ago
This is the representation I usually see used for the tree of nodes for skinning 3D models. There each node has a transform, and the most common operation is to recompute the world transform for all nodes, formed by composing the transform for each node with the one for all of its parents. If the array is sorted so that parents always precede their children, that's just a straight loop over the arrays
for i = 0, num_nodes do
if parents[i] == -1 then
world_xforms[i] = xforms[i]
else
world_xforms[i] = world_xforms[parents[i]] * xforms[i]
- ninepoints 3y agoI would hope your joint hierarchy is at least depth sorted or the loop as shown would not work. The proposed ATree has no order invariants...