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