Jump to content
  • Advertisement
Sign in to follow this  
janoside

X File Mesh Loading

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

A friend of mine has made several models using Maya and has exported them to the .x file format. Both of the mesh viewing utilities that are distributed with the DXSDK (DXViewer and MeshViewer) have no problem loading the models. However, the code for loading meshes that is available in the managed samples (EnhancedMesh and ProgressiveMesh) cannot correctly load the models. Specifically an exception is thrown by the DX method ComputeNormals() of the Mesh class. If anyone knows of robust code for loading models please let me know.

Share this post


Link to post
Share on other sites
Advertisement
I've never had a problem loading the .X file if MeshViewer opens it. I followed the example here: http://www.toymaker.info/Games/html/load_x_simply.html

Why don't you try computing the normals before you load it? In MeshViewer just select the mesh then compute normals, and re-save it.

Share this post


Link to post
Share on other sites
I have seen this using max studio. My solution was to use a different exporter, panda or polytrans. This cured the problem.

Share this post


Link to post
Share on other sites
I just put a mesh into meshviewer and computed the normals. Now it won't load. I'm wondering if it corrupts the file if the normals are computed twice.

Share this post


Link to post
Share on other sites
I looked at the link that you posted, but it doesn't do everything that I want, notably it does not compute the normals of the mesh which is what is causing the problem. I really need the normals to render the way that I want to.

Share this post


Link to post
Share on other sites
if you have the normals already computed, then load it you dont need to compute them.. thats my point.

computing normals should be a pre-process operation, imo.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!