Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

What is the best practice to add support of loading models from multiple file formats (.obj, .3ds ...)? What class hierarchy should I use (now I have Mesh class( containing vertex, data ) and MeshLoader class ( doing nothing right now ))? I do not want to write loaders by myself, so than I have to copy loaded data into my structure. Possibly you can show some articles explaining it especially Mesh class organization. Thanks in advance.

share|improve this question
1  
Have you looked at Assimp? assimp.sourceforge.net –  Jimmy Feb 3 '12 at 17:32
    
No, I've not. Thanks for good link. –  bobenko Feb 3 '12 at 17:36
add comment

1 Answer

up vote 4 down vote accepted

The format that you load into your game engine should be specific to your game engine, and by specific I mean optimized for your target performance. What you will likely want to do, if you want to support multiple model formats, is to have a processing tool that will convert the different formats into the one for your engine. This is the start of an asset pipeline :)

share|improve this answer
1  
This, but please don't force them to precompile everything ala XNA :/ –  ClassicThunder Feb 3 '12 at 17:33
    
@ClassicThunder Very true, especially if you want to target modding and such as I hear this is a right pain to accomplish with out visual studio to compile ala XNA. –  James Feb 3 '12 at 17:51
    
You should hear the Terraria modding guys whine :) –  ClassicThunder Feb 3 '12 at 17:55
    
@ClassicThunder That was actually the people I was thinking of when I was writing that ;) –  James Feb 3 '12 at 17:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.