Jump to content
  • Advertisement
Sign in to follow this  
jimi_hendrix

DirectX 9 and Bones

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

Hello, I am relatively new to DirectX 9. I have been scouring the internet in search of information about manipulating bones in DX, and I am still confused. All that I have found out is that I need to setup a skinned model, but my google fu has failed me when it comes to setting one up. Any information or resources anyone can provide would be great

Share this post


Link to post
Share on other sites
Advertisement
Unless you're talking about .X file animation - and that's not really a good route to go these days, tool support and documentation for it is thin on the ground - then there isn't really any direct stuff for working with bones in Direct3D.

A skeletal animation system's got two major components: firstly, working out what the bone positions/orientations are at any given time, based on which animations you're playing, etc; and secondly, rendering a model using that particular set of bone positions/orientations. The former is entirely separate to Direct3D; the latter is most commonly approached using techniques like Matrix Palette Skinning.

Share this post


Link to post
Share on other sites
If the .X format (which I was using) has lacking documentation, then what format should I use for my models?

Also, I wanted to use the bones for both animation and to place a camera relative to a model. Is there a better way to achieve either of those?

Share this post


Link to post
Share on other sites
There's a bunch of formats around; you should pick one that's most suitable for the 3D editor you're using.

You can use bones to track points relative to a model, certainly - it makes little difference whether you're calculating the position of a vertex on the surface of the model, or the position of a prop you're attaching to the model, or the position of the camera.

Share this post


Link to post
Share on other sites
So I assume this means I will need to write my own loader for the model / bones / materials if I use another format? There isn't a function in dx somewhere to get a bone by name or something from a .x model?

Share this post


Link to post
Share on other sites
Ok, I will look into those, but since I already have the code working for loading .X models (using the functions provided by D3DX9), I would also like to know if any functions are in D3DX9 are available to work with bones.

Share this post


Link to post
Share on other sites
I'm not a big fan of the .x file format, I reccommend using the .smd format (Half-Life simple mesh data file). It supports animation and multiple textures, and most modeling programs like 3dsmax/lightwave have plugins that import/export to .smd. the hard part is writing a model/bone loader since the vertices are in Z-X-Y order. If you would like a mesh loading example for .smd I could provide the function I use :D

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!