0
\$\begingroup\$

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.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Have you looked at Assimp? assimp.sourceforge.net \$\endgroup\$ Commented Feb 3, 2012 at 17:32

1 Answer 1

4
\$\begingroup\$

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 :)

\$\endgroup\$
4
  • 1
    \$\begingroup\$ This, but please don't force them to precompile everything ala XNA :/ \$\endgroup\$ Commented Feb 3, 2012 at 17:33
  • \$\begingroup\$ @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. \$\endgroup\$ Commented Feb 3, 2012 at 17:51
  • \$\begingroup\$ You should hear the Terraria modding guys whine :) \$\endgroup\$ Commented Feb 3, 2012 at 17:55
  • \$\begingroup\$ @ClassicThunder That was actually the people I was thinking of when I was writing that ;) \$\endgroup\$ Commented Feb 3, 2012 at 17:57

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.