PDA

View Full Version : which 3d model format



laggyluk
29-07-2013, 11:52 AM
I thought that i'll avoid that but after all I need to have some 3d model loader in my game. I could use some transform animation but don't need advanced stuff like skinning or even bones. Which 3d format would be good for that? any existing loaders I could use? I'm using openGL 3.2+ and tuts I've found on the net are either using old gl or some (non pacal) libraries

Ñuño Martínez
31-07-2013, 10:22 AM
Quake's MD2 (http://tfc.duke.free.fr/old/models/md2.htm) doesn't use bones but it includes animations and it's quite simple format. Also, a lot of 3D model editors support or allow to export models in this format. GLScene does support it, and there are more loaders for Delphi and FreePascal IIRC.

laggyluk
01-08-2013, 02:59 AM
for starters I'm trying luck with .OBJ and loader from nxPascal

or maybe not. in obj there is list of verts and then list of faces but those faces look like quads not triangles..

laggyluk
01-08-2013, 07:26 AM
Also I need vertex colors, seems that i'll have to use collada monster..

Ingemar
01-08-2013, 09:37 AM
for starters I'm trying luck with .OBJ and loader from nxPascal

or maybe not. in obj there is list of verts and then list of faces but those faces look like quads not triangles..

Not a problem, an OBJ is not limited to quads. An OBJ can contain polygons of any size, triangles, quads etc. A good loader may straighten up the format to triangles as well as one-to-one matching vertices, normals and texture coordinates, which is needed to make it "OpenGL friendly".

laggyluk
01-08-2013, 10:55 AM
Yes, It's possible to use triangles when exporting but it doesn't support vertex colors. It has 'Materials' but they are in different file and generally wtf

Ingemar
01-08-2013, 10:01 PM
Yes, It's possible to use triangles when exporting but it doesn't support vertex colors. It has 'Materials' but they are in different file and generally wtf

Vertex colors? Why do you need that when you can map a texture on it? Vertex colors are mainly useful for precalculated light IMHO.

laggyluk
02-08-2013, 12:48 AM
because my terrain is not textured :P maybe I'll just skip that model loading and use scaled voxels to construct stuff

Carver413
02-08-2013, 02:13 AM
you give up so easy. with blender you can make your own exporter
http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Advanced_Tutorials/Python_Scripting/Export_scripts

laggyluk
02-08-2013, 02:35 AM
I prefer shortcuts. Models would be 'cubes' anyways, wanted them because my mesh optimization is pretty lame but I guess it's gonna be another shortcoming of my 'game engine' :P btw now my model 'format' is a direct vbo buffer dump

http://laggyluk.com/wp-content/uploads/2013/08/piesek.png