Javier Ramírez Javier Ramírez - 2 months ago 28
C++ Question

Collada skinning

I hope you can help me. My problem is with the collada's skinning equation:

v += {[(v * BSM) * IBMi * JMi] * JW}



  • n
    : The number of joints that influence vertex v

  • BSM
    : Bind-shape matrix

  • IBMi
    : Inverse bind-pose matrix of joint i

  • JMi
    : Transformation matrix of joint i

  • JW
    : Weight of the influence of joint i on vertex v



Each vertex "v" must be calculated (i.e. through a "for" bucle). But, it`s not very, very slow if I have a mesh of 10,000 vertices or more? This must be calculated ever in real time? No other way to calculate "v"?

Thank you very much. :-)

Answer

You can probably use a threshold JW - for each vertex v, you may skip further computation for any joint i on v where JWi is below some threshold.

Also you could precompute IBMi * JMi for each joint once, right?