Jump to content
  • Advertisement
Sign in to follow this  
jf_wangfeng

How to load a multi-animation person into a game?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I like gta4very much.So I study d3d.I am very surprised because the person in the game have so many actions like riding,firing,running,walking and fighting. I want to know how to use 3dsmax to make a file.x containing so many actions? That file.x can use in my d3d game.I also find the directx sdk have several samples of introducing skinned mesh.However I have no idea about how that .x in sdk was made .Why the sdk did not tell us use how to use a 3dsoftware to produce such a skinned mesh?Thank you for reading my question.

Share this post


Link to post
Share on other sites
Advertisement
I'm a programmer, not an artist, but I think I understand the general concept (I've messed with an engine that animates some characters like you describe).

The artist makes a model that has 'bones' in it. The bones have information that can be used by the code, such as their position and orientation, to figure out where to put the triangles of the mesh. The animations are separate, and describe where to put the bones for each different action that the character might be doing (running, jumping, falling over dead, etc).

For a humanoid shape, the bones are typically linked together in a kind of 'skeleton' hierarchy. This lets you do things like move the upper half of your leg, and the lower half follows it. On the programming side, the 3D transforms for the bones deeper down the hierarchy inherit the transforms from their parents.

This is kind of a simplistic summary -- I hope it helps a little.

The files that we use in the engine aren't .X though, so I can't help there. There's probably just some exporter for .X that can export skinned animations.

Share this post


Link to post
Share on other sites
Animation in Directx is a very big topic, and it seems like you are just starting to play with it. I have only recently started with it as well...

I know how hard the MultiAnimation and SkinnedMesh samples in the SDK are to understand... so basically I gave up on them..! here are some resources that I started with, and they were helpful to me...

http://www.toymaker.info/Games/html/x_file_animation.html
http://leafnode.net/tutorials/skinmesh.php

To export 3dsmax models to X files, you will need this: http://www.andytather.co.uk/Panda/directxmax.aspx

Anyway, I suggest you start off with understanding about the x file format first, and learning about the Mesh Hierarchy (frames and mesh containers) requried to load an animated mesh. then move onto Skinned Meshes, then prolly go on with multiple animations.

hope I have helped

-fuchiefck

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!