Jump to content
  • Advertisement
Sign in to follow this  
bitnakke

How to create a 3d model that can be moved around in a DirectX application

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

How do I create a 3d model (in 3ds Max 8) that can be used in a DirectX application (written in C#) so it can be moved around within the application. For instance, I'd like to make a model of a man and use this model in an application so that he (the model) can be controlled with input (keystrokes, game pad, mouse etc.). Do I create the model as an animation in 3ds Max 8 and export the model to the .x format? Wouldn't this be the easiest instead of creating my own format? How do I then determine which frame of the animation should be shown in the application when moving him around? Any help (be it links, books etc.) would be greatly appreciated :-)

Share this post


Link to post
Share on other sites
Advertisement
This isn't the right sub-forum for 3DSMax-specific question - try Visual Arts for that.

But from an API point of view there isn't a single specific route to take. Ultimately it does boil down to creating an animation, exporting it to .X (or whatever), loading it in and then animating it. But there are a lot of context-specific decisions/details involved.

The .X file format should handle what you want, but based on the number of threads in this forum its not necessarily the easiest format/API to work with. You might want to do some research and see if you can find any info regarding other modelling formats - e.g. the ones used by commercial engines (its been superceded, but I remember the old Quake (MD1/MD2?) formats being popular).

hth
Jack

Share this post


Link to post
Share on other sites
The Tiny.x and Tiny_4anim.x files look like they were created in 3dsMax or something like it. The SDK uses them in their SkinnedAnimation and MultiAnimation samples. If you can figure out how to export 3dsMax skinned meshes and their animations set to the .x file format, you are still a ways away from being able to load them and animate them.

DirectX uses key-framed animation using a bone hierarchy with its ID3DXAnimationController and ID3DXKeyFramedAnimationSet interfaces.

However, if you really want to understand it, start with a good book on animation, like Real-time 3D Character Animation, and then learn about the .x file format, and how to load skinned meshes. Then you can move into writing the code that allows you do play those animation sets. The SDK samples do the loading and animating of Tiny.

You can also play with the DXViewer and even look at the source code if you want. It is more generic for various types of skinned meshes.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!