skeletal animation and vertex skinning

please help me.
I need to bring vertices mesh from object space to bones space.
My problem is on joint inverse.
Can anyone help me? Pleeeeaseeeeee

Originally posted by nig3d:
please help me.
I need to bring vertices mesh from object space to bones space.
My problem is on joint inverse.
Can anyone help me? Pleeeeaseeeeee

dont need it,

deformed_pos.x = 0;
deformed_pos.y = 0;
deformed_pos.z = 0;

for( i=0; i<number_of_weights;i++ )
{
deformed_pos += joints_current_transform*(vertex_pos - joint_bind_pos)*joint_weight;

}

for( i=0; i<number_of_weights;i++ )
{
deformed_pos += joints_current_transform*(vertex_pos - joint_bind_pos)*joint_weight;
}

??


\ A

O JA
/
/ B
/

A is my parent Bone
B is my child Bone
JA is the joint.
A have associated TOT vertices
B have associated TOT vertices
JA have associated TOT vertices
A vertices are transformed by A matrix Bone only
B vertices are transformed by B matrix Bone only
JA vertices are transformed by blending of A matrix Bone and B matrix Bone.
To transform mesh vertices from object space to bones space i must do:
AverticesBone = AverticesObj * MatrixA^-1
BverticesBone = BverticesObj * MatrixB^-1

for joint?

for now i try this:
JAverticesBone = JAverticesMesh * (MatrixA * weight + MatrixB * (1.0f - weight))^-1
But don’t work right…please help me.