#### Archived

This topic is now archived and is closed to further replies.

# Skinned Mesh "tiny.x" in SDK

This topic is 5558 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

How does the ''skinned mesh'' example in DXSDK work? Is the animation generated by the program? or was it through animationset? I have already created a character in 3ds max, I just don''t know how to animate it in DX? What do I need? I have read about physique modifiers and how it is needed in your character. After I put physique modifiers in my character, how will I able to move it? the animationset in .x seems very very complicated? Plus, the tutorial "Implementing skinned mesh" did not deal on the animation of the .x file itself... need help

##### Share on other sites
I just got through that huge mess.

The Skinned Mesh example in the SDK is quite complicated and difficult to follow, so I'll try to help you if I can.

The animations are included in the .x file itself. If you can generate the .x file in a text format, it will really help you to understand it.

Skinned Mesh .x files are set up as a hierarchy of frames (bones). Each frame has one or more meshes attached to it, and each frame can have 0 to many child frames. Moreover, each frame has its own transform matrix. If you look at the .x file in a text editor, you will see this hierarchy.

After the hierarchy is set up, there is an animation set. (You'll find this at the end of the .x file) In the animation set, you will find a bunch of animations with animation keys. An animation key has a number of entries, separated by semicolons. The first entry says what type of animation it is. The second entry says how many keys there are in this particular animation. Each following entry is an animation key frame. An animation key frame starts with the frame number, then the number of entries that will follow (usually 16, meaning a 4x4 matrix), then all the entries that go into that matrix. The matrix in each animation key frame corresponds to a rotation and translation of a specific frame in the model. Basically saying, "At this point in the animation sequence, set the matrix of this frame (bone) to this matrix."

An animation key that has 10 animation key frames will contain 12 entries--1 for the animation type, 1 for the number of animation frames, and 1 for each animation frame.

After listing the animation keys in an animation, there is a reference to the frame (bone) associated with the animation, enclosed in curly brackets {}.

Here is an example from one of my .x files:

      AnimationSet {  Animation {  AnimationKey {   4;   2;   0;16;1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000;;,   21600;16;1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000;;;  }  { Scene_Root } }

I hope this helps!

[edited by - Teric on November 1, 2002 5:42:15 PM]

##### Share on other sites
If I make an animated character in 3ds max and I export it to x file, will my animation be stored in .x too? is it that simple?

##### Share on other sites
Yes your animation data is stored in the .x file (don''t forget to tick include animation data in the .x file exporter with 3Ds MAX).