3d models

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
Randi
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 50
Joined: Sat Apr 24, 2010 1:32 pm
Location: Noobville

3d models

Post by Randi »

which 3d model format would you recommend for a game? What do you think of Collada, milkshape, and wavefront?
User avatar
k1net1k
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 563
Joined: Sun Nov 07, 2010 2:58 pm
Contact:

Re: 3d models

Post by k1net1k »

i think you need to tell us more about the platform/environment its going to be for.
Randi
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 50
Joined: Sat Apr 24, 2010 1:32 pm
Location: Noobville

Re: 3d models

Post by Randi »

will be using it with sdl/opengl
pubby8
Jealous Self-Righteous Prick
Jealous Self-Righteous Prick
Posts: 58
Joined: Mon Feb 07, 2011 12:22 am

Re: 3d models

Post 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.
User avatar
Nokurn
Chaos Rift Regular
Chaos Rift Regular
Posts: 164
Joined: Mon Jan 31, 2011 12:08 pm
Favorite Gaming Platforms: PC, SNES, Dreamcast, PS2, N64
Programming Language of Choice: Proper C++
Location: Southern California
Contact:

Re: 3d models

Post 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.
User avatar
GroundUpEngine
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 835
Joined: Sun Nov 08, 2009 2:01 pm
Current Project: mixture
Favorite Gaming Platforms: PC
Programming Language of Choice: C++
Location: UK

Re: 3d models

Post 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 :)
User avatar
k1net1k
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 563
Joined: Sun Nov 07, 2010 2:58 pm
Contact:

Re: 3d models

Post by k1net1k »

welcome krolgar :) a first post that's actually informative. i never thought this could be :)
User avatar
Nokurn
Chaos Rift Regular
Chaos Rift Regular
Posts: 164
Joined: Mon Jan 31, 2011 12:08 pm
Favorite Gaming Platforms: PC, SNES, Dreamcast, PS2, N64
Programming Language of Choice: Proper C++
Location: Southern California
Contact:

Re: 3d models

Post by Nokurn »

k1net1k wrote:welcome krolgar :) a first post that's actually informative. i never thought this could be :)
Thanks. :)
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: 3d models

Post by eatcomics »

I'd like to input the fact that I'm using .OBJs to start learning about models ;)
Image
Post Reply