# Weighted Bones question

## Recommended Posts

Every where I have looked, states the equation at the bottom of this image, to be the correct one for weighted bones. I just dont understand, are the weights applied in some random arbitrary space? I have shown how I compute my animations right now and I'm trying to conform to the weighted version.

##### Share on other sites
RobTheBloke    2553
you can concatonate the matrices together, so

Matrix0 = BoneToWorld_inverse * BoneFrameMatrix * BoneToWorld;

the BoneToWorld_inverse, is the inverse world space matrix for the joint in it's bind pose.

v_World = Matrix0 * v_ObjectSpace

gets you the current position of the vertex as if it were parented to that specific bone. So the result here is a single point3!

Now, if you have 2 bones, you get two evaluated positions, namely

V_world_Bone0
V_world_Bone1

The weighting value then linearly interpolates between the two values, so a weighting of 0.5 for both bones will generate a position exactly half way between the two results. Hope that helps a bit.

##### Share on other sites
Yea I got it now. I realized that "BoneMatrix" is actually the bonesmatrix plus all of its parents matrices. I thought I was weighting it individually rather than transforming the point all the way by each bone, and then taking the weights of that.

I think I got it.