Jump to content
  • Advertisement
Sign in to follow this  
jdjarvis

Need help migrating from XNA to MDX: CopyAbsoluteBoneTransformsTo

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

XNA has a function to copy absolute bone transforms from a model. In the code below, "theModel" is my XNA Model object. Matrix[] transforms = new Matrix[theModel.Bones.Count]; theModel.CopyAbsoluteBoneTransformsTo(transforms); Is there an equivalent function or set of functions in Managed DirectX? I have been trying to create a Frame from which I can extract transformations for the model, but is that direction I should be going? What would be the equivalent set of functions in Managed DirectX to replicate the effect of the "CopyAbsoluteBoneTransformsTo" function? This has been a roadblock for me. Any help would be greatly appreciated. Thanks, Jeremy

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by RDragon1
why would you be migrating to MDX ? use xna.
His last post was about SlimDX, so I think the problem is a more general "what is XNA doing here and how can I replicate it?" Unfortunately, I have no idea.

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
Quote:
Original post by RDragon1
why would you be migrating to MDX ? use xna.
His last post was about SlimDX, so I think the problem is a more general "what is XNA doing here and how can I replicate it?" Unfortunately, I have no idea.


That's exactly it. I am trying to figure out what XNA does here and replicate it in Managed DirectX (Actually, SlimDX). I would go with XNA, but for redistributability reasons I am currently trying to use SlimDX.

Jeremy

Share this post


Link to post
Share on other sites
Quote:
Original post by jdjarvis
Is there an equivalent function or set of functions in Managed DirectX? I have been trying to create a Frame from which I can extract transformations for the model, but is that direction I should be going? What would be the equivalent set of functions in Managed DirectX to replicate the effect of the "CopyAbsoluteBoneTransformsTo" function?


Unfortunately, MDX doesn't have such a function out of the box AFAIK. To properly animate a skinned mesh you'll need to jump through a few hoops to get the skeleton hierarchy and animation data loaded in the first place (the DirectX SDK has some samples and here's another). The skinning & file format support in XNA actually is quite excellent and takes care of many of these details for you, so I'd stick with XNA if possible.

Share this post


Link to post
Share on other sites
Quote:
Original post by Headkaze
Have you done a search for it using Reflector on the XNA's dll? It should show you exactly how XNA is doing it.


That's great for educational purposes, but once you start writing code based off what you see using that tool, you tread a very thin legal line. I wouldn't recommend this user use that tool just for his own protection. Plus it's more fun to just figure things out. ;)

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!