PDA

View Full Version : What do you gain performancewise from using 3ds files?



DalTXColtsFan
03-03-2003, 06:42 AM
Or any other modelfile format for that matter.

Obviously in the cases of 3ds or md2 you get the benefit of being an industry standard, and the possibility that your models can be reused easily, and you get the advantage of having the model data in an external file instead of in your source code.

But I was looking at the code for loading a 3ds file from GameTutorials.com, and also the MD2 example from the book OpenGL Game Programming. Unless I'm missing something, it looks like all they're doing is loading the data into collections of classes or structs in memory - they're still calling glVertex3f for every single vertex in the file. Do you really gain anything performancewise from that over having the objects in your code, or even having them in vertex arrays?

Thoughts appreciated!

Thanks

03-03-2003, 09:08 AM
The differentiator isn't performance, it's utility.

Enabling an artist to use a modelling program to create and refine elaborate meshes, textures, lights, effects, etc. for import and display is the point.

How did you get the 'objects in your code' in the first place? Hand-coded vertices and triangles? Yowsah!

yakuza
03-03-2003, 06:58 PM
Also, those tutorials are simplified, for beginners to use to learn. You can process the data however you like to use vertex arrays, VAR, VAO, etc.

As for performance, I've personally seen a >300% improvement simply by putting the Gametutorials model render method into a compiled display list. Works great for static objects.




GLuint myDisplayList;
myDisplayList = glGenLists(1);
glNewList(myDisplayList, GL_COMPILE);
renderModel();
glEndList();


Hope that helps.

gator
03-03-2003, 07:28 PM
Obviously in the cases of 3ds or md2 you get the benefit of being an industry standard


Industry standard? I don't think so.

3ds files are old and obsolete. This format is way dead. Don't use it.

md2 is a game format for Quake 2. Game formats aren't industry standard
in any way, shape or form. What is this game? From 1996? How old is that?

And I fail to see how you can relate performance to any file format.
Maybe loading data on game startup, but that's about it. Seems like
a misplaced question to me.

Miguel_dup1
03-03-2003, 07:52 PM
Display lists DO NOT make a difference in terms of performance if all you are doing is pass data. It will make a difference when you have state changes. If you want an improvement when passing data, use vertex arrays...

Formats are never stardards because they are constantly changing... I agree with gator that 3ds is dead... Discrete replaced it with ase. If I were you, I would milkshape.

And well, as many other people said. Formats do not have anything to do with performance.

Regards,

Miguel Castillo




GLuint myDisplayList;
myDisplayList = glGenLists(1);
glNewList(myDisplayList, GL_COMPILE);
renderModel();
glEndList();


Hope that helps.[/B]<HR></BLOCKQUOTE>



[This message has been edited by mancha (edited 03-03-2003).]