Thursday, September 18, 2008

FBX and XNA Part 3 - Models cont.

Now we look at the LimbNodes.

A LimbNode is a bone in the model. Just like your bones they have a length (translation) and an angle (rotation). There is a section in LimbNodes called Properties60: and there are some important porperties.
Lcl Translation and Lcl Rotation are the default values to use for the limb if there is no animation information. There is also a PreRotation which defines a transform on the limb before translation is added in. This is necessary because limbs may have rotation in the joint.

The Deformer and SubDeformer are what connect the LimbNode to the mesh so the points in the mesh can actually be moved in world coordinates. A Deformer is just the parent of one or more SubDeformers and is most important because it links (with the Connections: section) to the LimbNode.
A SubDeformer simply has a series of indexes in the Vertices, and a series of weights. In all our models if there are multiple deformers for a given Vertex, the sum of weights will be 1.0
there also is a very important Transform. The Transform is where the Deformer is relative to the LimbNode.

I think we have all the pieces now. Next we actually combine them to get a model that moves in world coordinates.

TF

No comments: