Need help migrating from XNA to MDX: CopyAbsoluteBoneTransformsTo

Started by
5 comments, last by NickGravelyn 15 years, 10 months ago
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
Advertisement
why would you be migrating to MDX ? use xna.
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.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
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
Have you done a search for it using Reflector on the XNA's dll? It should show you exactly how XNA is doing it.

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.
Rim van Wersch [ MDXInfo ] [ XNAInfo ] [ YouTube ] - Do yourself a favor and bookmark this excellent free online D3D/shader book!
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. ;)

This topic is closed to new replies.

Advertisement