Sign in to follow this  

DirectX 10 Mesh Animation

This topic is 2846 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

Greetings. I'm going to give a background to my question first, but you can just skip to "My question:" farther down if this is too much. I recently finished reading "Introduction to 3D Game Programming with DirectX 10" (http://preview.tinyurl.com/y86kved), and set out to experiment with what I'd learned. It was going well until I realized that I had no idea how to animate meshes. The book does a great job explaining how to load and render static meshes, but doesn't even mention how to animate them. I purchased "Character Animation With Direct3D" (http://preview.tinyurl.com/yahfv7c) earlier in the week, but it uses the .x file format exclusively. For whatever reason, DX10 no longer provides functions for handling .x files, so the book has turned out to be less useful than I'd hoped. I tried reading a tutorial on manually parsing .x files here: http://www.gamedev.net/reference/programming/features/xfilepc/ ...but I have a hard time following along in the source code. My question: Does anyone know of any tutorials that go in depth on DX10 animation? Should I cut my losses, read Frank Luna's DX9 book ("Introduction to 3D Game Programming with Direct X 9.0c: A Shader Approach" (http://preview.tinyurl.com/y9j4v5o)), and give up on DX10?

Share this post


Link to post
Share on other sites
A file format is just a vehicle with which you carry data around. If the book only concentrates on using ready-made animation solutions implemented specifically for the .x format, then it is not very useful at all.

The real difficulty in animating meshes is the bone hierarchy handling as well as animation blending. Not that these are very difficult by themselves, but that a robust implementation requires a lot of work and consideration. Also, in graphics API context, the efficient usage of vertex shaders as well as constant buffers is important.

D3D10 and D3D11 are both more robust systems than D3D9 in the long run. The newer versions do have less ready-made tools available, though, precisely because they are newer. However, the internals of mesh loading are very similar across all three, even though there's no "native" support for .x format.

Also, if you have a hard time following source code, just study the language more :)

Share this post


Link to post
Share on other sites
Thanks for your thoughts Nik02.

I would like to learn to implement a custom animation system (or whatever the technical term is), but I'd settle for one that's already made right now because I'm ready to move forward. I would still learn something from it, even if it's not all that I'd hoped.

As for following along in the source code, I feel like I have a solid grasp of C++; I would say my knowledge is at the intermediate level. It wasn't exactly the language that confused me. The way the author used it, and the format, confused me.

Anyways, I'm probably going to start making my way through Frank Luna's DX9 book today, so this topic can be considered closed. Luna's book has two chapters on animation. Maybe by the time I finish that and "Character Animation with Direct3D" I'll be able to do something with animation in DX10. Thanks again Nik.

Share this post


Link to post
Share on other sites
I recently wrote my own bone animation set of classes. I call it "joint" animation because it's really about joint movement and rotation.

Coding it involves...

1) Keeping track of what joint effects what verts.
2) Writing a recursive function for initializing and transforming your mesh

It sounds like your starting out and this is like trying to win a marathon before learning to walk. I'd start out simple and start developing your game engine. There's a lot hurdles before you get to this.

Share this post


Link to post
Share on other sites
Hi there.

if your staying with the .X file format, the book Advanced Animation with DirectX( By Jim Adams). show how to roll your own animation and how to read this data from the xfiles, its in DX 9 but its not to hard to convert to DX10.
if not any thing its a good read and it helps get the concepts right. I could post the code but if your going to do this you need to understand it for later, when the SDK's really change heaps near future.

Share this post


Link to post
Share on other sites

This topic is 2846 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this