Jump to content
  • Advertisement
Sign in to follow this  
Checkmate_001

Load Meshes

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

I've been working through GEA and re-reading "Introduction to 3D Game Programming with DirectX 11" and have recently also been making some demos based on the further exercises from each chapter.

 

I wanted to improve these demos by adding some models/ meshes around the environment and including a skybox. Although the book only covers how to load the custom .m3d format. I could create a Python script in blender, but I really wanted to load the models another way.

The book recommends, MeshFromOBJ10, but having researched it, the results seem to complicated to include in my code. I did, however, find this (http://www.braynzarsoft.net/index.php?p=D3D11OBJMODEL), which I have reason to belive is not functional.

 

Should I include the code from there in two files - OBJLoader.cpp and OBJLoader.h?

Or is there any other place I should be looking to load meshes?

 

P.S. I'm open to any file format that would be good for me. Be it .OBJ or anything else (.max or .3ds would be great though).

Share this post


Link to post
Share on other sites
Advertisement

While most times I'd agree with yckx on the assimp thing, I think for a demo it's rather bulky. It contains WAY too many functions and formats. I say, find a format that you want and look for a library that specializes in it. It will be smaller and, in most cases, faster.

Share this post


Link to post
Share on other sites

Assimp is pretty simple to use and with a unique interface you have lots of format in your hands. Once I thought as sethhope, but the time i spend to find and get working some specialized lib (not to say to write my own parser...) is at the end greater than the time to download, install and use assimp. And, more, the assimp work has to be done only once, and you can get rid of the problem of loading a mesh in every other project.

 

As for the speed I quote setthope: assimp seems a bit slow in effect.

Share this post


Link to post
Share on other sites


As for the speed I quote setthope: assimp seems a bit slow in effect.

 

The speed of the first loader shouldn't be an issue, in that a better approach is to convert files to a convenient format that will load quickly. I.e., use assimp to load files, convert the files to a fast-loading format and save those files for (later) loading into an app that needs them.

Share this post


Link to post
Share on other sites

If you have doubts about an OBJ loader then don't use it.

 

I second suggestions about using ASSIMP. Why?

Because work put in ASSIMP interfacing, even for a demo, is work invested in a library you're going to use. By contrast, you will drop OBJ support a day. It gets quite some mileage but it's just insufficient for modern uses and BTW, the real OBJ format includes nontrivial stuff such as NURBS usually not supported by easygoing file loaders.

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!