Page 1 of 1

3d models

Posted: Sat Feb 12, 2011 11:43 am
by Randi
which 3d model format would you recommend for a game? What do you think of Collada, milkshape, and wavefront?

Re: 3d models

Posted: Sat Feb 12, 2011 11:57 am
by k1net1k
i think you need to tell us more about the platform/environment its going to be for.

Re: 3d models

Posted: Sat Feb 12, 2011 12:10 pm
by Randi
will be using it with sdl/opengl

Re: 3d models

Posted: Sat Feb 12, 2011 12:20 pm
by pubby8
That still is pretty vague.

Collada is nice for very complicated games - it has many features and is standardized, however it is definately not needed for a small game.

If all you need is simple, static objects, then go with .obj for now.

Re: 3d models

Posted: Sat Feb 12, 2011 2:45 pm
by Nokurn
It really depends on what you want. Here's a list of some common formats:
  • Direct3D .X - This format is pretty good. It's easy to understand (and therefore easy to load), has both an ASCII and binary format, and has the main features you might want, including animations and materials. X files can be loaded quickly, and if you're using Direct3D, you can use D3DX to load them.
  • Wavefront .OBJ - If you only need geometry and UV coordinates, this is an excellent choice. It's a static geometry format, so it doesn't support materials, animations, or a number of other things. However, it's quite easy to write a loader for, and can also be quite fast. OBJ files are often used in combination with MTL files (for material definitions).
  • 3D Systems .STL - Like .OBJ, this is a static geometry format. Unlike .OBJ, this is a static geometry format in the strictest sense. It has both ASCII and binary specifications and is extremely easy to load. The drawback is that it only contains geometry data--there are no official fields for colors, UV coordinates, etc. You could always add these yourself--perhaps using a secondary file of your own design, as modifying the geometry format itself would break compatibility with existing exporters.
  • Collada .DAE - This format can hold pretty much everything you could ever want for your models, including physics data (as of 1.4). It uses XML for storing assets, so loading can be pretty simple. Consequentially, the files can be quite large and can take a while to load. As such, few time-intensive applications use this format for the end-product--it's usually converted to another, faster format. Collada is actually meant to be an interchange format (like a .PSD file, but feasible to read...) that is easy to transfer between production applications (sculpting, modeling, material editors, etc.).
  • id .MD2, .MD3 - These formats are used by id Software in their Quake II and Quake III engines, respectively. They're well-documented, support animations, textures, and a few other features. You should note, however, that animations are stored using keyframes for each vertex, rather than using bones. This can make the files quite large, and make dynamic animations difficult to create. Loading the geometry requires a bit of trigonometry, so loading could take a while on processors with poor floating point performance.
This list is far from comprehensive--you should do some of your own research here. If you can't find something that fits your needs exactly, you could always write your own format; Blender exporters are pretty easy to write.

Re: 3d models

Posted: Sat Feb 12, 2011 4:04 pm
by GroundUpEngine
Krolgar wrote:Wavefront .OBJ - If you only need geometry and UV coordinates, this is an excellent choice.
+1

Writing loader is not to much hassle :)

Re: 3d models

Posted: Sat Feb 12, 2011 5:22 pm
by k1net1k
welcome krolgar :) a first post that's actually informative. i never thought this could be :)

Re: 3d models

Posted: Sat Feb 12, 2011 10:53 pm
by Nokurn
k1net1k wrote:welcome krolgar :) a first post that's actually informative. i never thought this could be :)
Thanks. :)

Re: 3d models

Posted: Mon Feb 14, 2011 7:30 pm
by eatcomics
I'd like to input the fact that I'm using .OBJs to start learning about models ;)