
Junior Member
Regular Contributor
vertex tranforms for skeletal animation
i have been succesful in animating a mesh with skeletal animation (joint based skeleton). the process was simple and straighforward:
1. produce the absolute matrix for each joint by concatenating the joint's poarent's absolute matrix with the joint's relative matrix
2. for each vert in the mesh, translate it into jointspace for whatever joint it is associated with
3. each time through the loop, transform the vert by it's joint's matrix.
this worked great. now i want to implement vertex skinning. my first thought is that putting the vert into jointspace won't work, because the vert could be associated with more than one joint. i just can't get my head around how to create the correct matrices and how exactly to transform the verts. i know i need to take the joint's position into account when transforming the vert. i'm just not sure exactly how to do it.
i'd appreciate any input you guru's may have</brownnosing>
jebus

Advanced Member
Frequent Contributor
Re: vertex tranforms for skeletal animation
The idea of skinning is pretty simple. Normally, when you change the position of a bone in your model, all the points in the "skin" go with it. It's how we draw a model in the first place. The idea of skinning is to add a finer degree of controll in moving this skin with the bone. From a vertex point of view, it's how much I'm influenced by my bone. From the bone's perspective, it's how much do I influence the vertices in my skin. This "how much" is quantified as "weight". By associating a weight with eighter the bone, or vertices, you can calculate the degree to which the skin will deform in responce to a change in basis. With multiple bones sharing a joint, the change is a sum over all infuencing bones. In CG, for example, you would send bone weights, as you are streaming vertices. There is a CG example of this at nVidia's web site if you would like to see code.

Junior Member
Regular Contributor
Re: vertex tranforms for skeletal animation
thanks for the response!
i actually have a good graps of the theory behind vertex skinning. my issue was how exactly to transform the verts. i have found a good reference of this from the gamedev magazine at http://www.darwin3d.com/gamedev.htm under 1998. basically the algorithm does this:
1. subtract the joints position from the vertex (this puts the vert into jointspace as opposed to model space)
2. multiply the vert by the joints matrix
3. add the joints position back to the vert (puts the vert back in modelspace)
4. multiply the weight
these steps are performed on every weight for each vertex. i've got this working now in my code, but i have a small problem elsewhere. too late to investigate it tonight, though. back on it tomoree
jebus

Re: vertex tranforms for skeletal animation
After calculating the asbolute and 'final' transformation matrices for the joint, you can transform the vertices using weight values (all must add up to 1):
1) Transform vertex into joint space (can be precalculated, or done at rendertime)
Vector3 v = vertex.bindLocation;
joint.absoluteMatrix.inverseTransformVector(v);
2) Transform vertex by joint 'final' transformation
v.transform(joint.finalMatrix);
3) Apply weight value to transformation
v += ((vvertex.bindLocation) * weight);
Render(v);

Re: vertex tranforms for skeletal animation
I was just about finished with my QuakeIIIArena modeler when I read your post about a vertex shader for skinning.
QuakeIIIArena does implement a simple form of skeletal animation system (bones & joint sort).
The transformation from the frames is based on keyframe animation and a SLERP equation.
I'd really like to implement skinning to my program, so Im just curios if you think it is possible to do this with this kind of models (I'm not to great with animation systems, this is my first real attempt) ?
Thankfull for any help,
/JJ
Posting Permissions
 You may not post new threads
 You may not post replies
 You may not post attachments
 You may not edit your posts

Forum Rules