Skip to main content
GameDev.net gamedev.net
🔒 Locked 🎮 Unity

Compute a skinned mesh

Started by Kinju Feb 24, 2008 at 3:20 PM 0 replies 600+ views
Original Post
Kinju
Kinju
I All, I'm loading a collada skeleton. For each bone, I have : - The inverse bind matrix - The local matrix For each vertex, I have : - The position at binding time - The bones and weights to affect A bone world matrix is computed by WorldMatrix = LocalMatrix; if(parent != NULL) AbsoluteMatrix = AbsoluteMatrix * parent->WorldMatrix(); Now, I have to compute all vertex position by the affected bones So I do: vector3 finalposition(0, 0, 0) for each(affectBone in myvertex.GetAffectBones()) { vector3 vertexBoneBindpose = affectBone.InvBindPose().Transform(myvertex.position); vector3 influence = affectBone.WorldMatrix().Transform(vertexBoneBindpose); finalposition += influence * affectBone.Weight(); } But it is not correct, my final geometry is not what I want Is someone can tell me where I'm wrong ? Thanks very much

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.