Load a skeleton

Hi all,

I’m trying to load a squeleton. First of all, I would like what is the “bind_shape_matrix” node.

Then, my geometry containes 320 triangles, dispatched in 162 positions, controlled by 3 bones.

I have 3 sources in the skin node :

  • The skin joints (count=3, stride=1)
  • The skin bind poses (count=3, strinde=16)
  • The skin weights (count=13, stride=1)

The joints node contains 2 input elements refers to the skin joints (semantic=“JOINT”) and the skin bind poses (semantic=“INV_BIND_MATRIX”).

Finally, I have the vertex_weights node (count=162) which contains 2 inputs elements (“JOINT” and “WEIGHT”)
The vcount node contains 162 values (156 “1” and 6 “2”), I presume 1 value by position.
The v Node contains 338 elements

What are this 338 elements ?

Thank you

The bind_shape_matrix is the matrix you should multiply your geometry by in order to apply the skeleton skin.

You are correct, vcount is one value per vertex (position), and each one represents the amount of weights that vertex (position) is influenced by.

v contains the weight values as [joint index,weight index] tuples, and as many of those tuples as is stated in the vcount value per vertex.

So you have 156 vertex positions with one weight and 6 with 2, that makes (1561)+(62)=168 and there is 2 indices per weight, one joint, one weight (168*2)=336… sounds like you’re missing a vertex. :?

Ok, thank you very mush for theses precisions.

I cheated, I have 336 v elements, not 338, so, it is good :slight_smile:


Other question…

What are the bind poses matrix ?

Because I’ve load my geometry and my bones (with translate/rotate nodes) but the bones not corresponds with the geometry…

I think it’s because I don’t use the bind poses matrix.