Javier Ramírez - 7 months ago 81

C++ Question

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

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

- : The number of joints that influence vertex v
`n`

- : Bind-shape matrix
`BSM`

- : Inverse bind-pose matrix of joint i
`IBMi`

- : Transformation matrix of joint i
`JMi`

- : Weight of the influence of joint i on vertex v
`JW`

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?