Archived

This topic is now archived and is closed to further replies.

nlo

Vertex blending with Bone animation ??

Recommended Posts

i''m using Direct3D7, and very confused about Vertex blending and Bone animation, i''m using MilkShape3D model, b''cuz it has no weight, i calculated by myself, but dont know how to transform the Vertex blend world matrix, here''s some pseudo-code: -Transform object local Matrix to world; -Play Bone animation; -SetTexture and SetRenderState; -Setup and Transform all vertices with Bone animation; -DrawPrimitives; So, my problems are : Which 2 matrice i need to transform for vertex blending ? and When i transform them ?? Thanks for help !

Share this post


Link to post
Share on other sites
This is how I went about it:
1) Traverse bone hierarchy (while concatenating to the inverse of the inverse matrix at
each node) to leafs.
2) Transform bone to local space with node''s inverse matrix.
3) Transform bone with the animation matrix.
4) Multiply each vertex in the skin with the inverse matrix, animation matrix and vertex weights.
5) Update bone''s inverse and animation matrix.
6) Transform bone back to world space with the matrix you built up during the bone traversal.
7) Work your way back to the root with steps 2-6.
8) Render


_________________
Best regards,
Sherman Chin
www.Sherman3D.com

Share this post


Link to post
Share on other sites