Jump to content
  • Advertisement
Sign in to follow this  
jdjarvis

[SlimDX] Mesh rendering problems, Frame.LoadHierarchyFromX exception

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

Anyone getting an exception when they try using Frame.LoadHierarchyFromX(...) with SlimDX? I am trying to create a frame from a .x mesh files, but calling the LoadHierarchyFromX function generates an SEHException: "External component has thrown an exception." Error code: -2147467259. Seems like DirectX is throwing an exception and I don't know what to do about it. Any thoughts? ***BACKGROUND INFO*** Here's some background information on what I am trying to do, which could be relevant. I am trying to render some mesh files, and am getting different results through SlimDX vs. XNA. I first used XNA as the 3D renderer for my project, and all the meshes rendered in the correct positions and with the correct lighting (nice and bright). I have since moved to SlimDX for 3D rendering, but the meshes do not render in the correct positions, nor do they seem to be lighted correctly (dim). After compairing my XNA and SlimDX code, I determined that I could make my XNA version render all messed up just like my SlimDX version if I left out the line I have commented out below. Matrix[] transforms = new Matrix[theMeshModel.Bones.Count]; theMeshModel.CopyAbsoluteBoneTransformsTo(transforms); ... Matrix worldTransforms = Matrix.Identity; // worldTransforms *= transforms[mesh.ParentBone.Index]; worldTransforms *= other transforms... effect.World = worldTransforms; Since that line of code seems to make all the difference, I am trying to find a way to duplicate the functionality of theMeshModel.CopyAbsoluteBoneTransformsTo(transforms) using SlimDX. I have tried using Frame.LoadHierarchyFromX(...) to create a frame from which I could extract the bone transformations. But, like I said at the beginning, DirectX throws an exception. Any thoughts? Is this the wrong approach? I want my meshes to show up in the correct positions, and with the correct lighting. They don't look like they are lit correctly, as if the light is very dim. Thanks, Jeremy

Share this post


Link to post
Share on other sites
Advertisement
It's very hard to determine what's going on without seeing it for myself. If you want, you can email or PM me your entire project, and I'll try debugging it over here. It helps to have the SlimDX source on hand, so I can step through each function and see what's going on.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!