Page 1 of 1

Performance difference in models

Posted: Fri Apr 07, 2006 12:19 am
by green.t
Hello!

I was wondering if anyone has noticed any performance difference between .X and .OBJ file formats. For example, lets say I create a world of hills, buildings and traffic lights, and I model and texture this world in Maya. If I export to X format and OBJ format, the X format file is significantly larger than the OBJ file (including the MTL file as well).

File size isn't my issue however, what I'm getting at is does a static .X file affect Irrlicht's performance more than an OBJ file. (Is using an X file a bad idea for creating a "world")

I hope that makes sense. If it doesn't, I'll explain further.

Posted: Fri Apr 07, 2006 12:34 am
by bitplane
I suspect this is because X files have the extra overhead of being an animated format, while obj's don't. you could try addMeshSceneNode(xanimmesh->getMesh(0)); but the bigger problem is that your mesh is being sent to the driver every loop, when your graphics card probably supports hardware mesh buffers. Try irrSpintz's hardware mesh buffers, they're much much faster. I had about 1.2 million triangles at 30fps here when I tried them

Posted: Fri Apr 07, 2006 8:53 am
by hybrid
The performance could also be different due to surface smoothing. If additional vertices are used to display the mesh better shaped you could have a significant difference in FPS. Test for the number of triangles displayed (I think one of the examples has a title bar which also displays the number of triangles if you don't find the right method).
But it could be the implementation of X meshes, too. Is had been discussed whether there should be a special implementation of static X/MD2/MS3D meshes some time ago. At that time nobody could measure a difference, so it was abandoned. But if you find a difference now the implementation of X Scene nodes might have to be optimized.
Hopefully Spintz' changes will make it to the Irrlicht core very soon, this would push the limits quite far. Unfortunately Niko seems to be so busy that he did not post any progress or even acknowledgements in the last months or so. Only blogging minor progress notes.

Posted: Fri Apr 07, 2006 8:06 pm
by kburkhart84
I've noticed that the .x file renders faster than .ms3d on myt computer, both being the same static model.

Posted: Fri Apr 07, 2006 9:56 pm
by Hirte
kburkhart84 wrote:I've noticed that the .x file renders faster than .ms3d on myt computer, both being the same static model.
Maybe because of mesh-smoothing? I have loaded 2 Meshes, both saved in milkshape, one in 3ds and one in ms3d, the ms3d-file looked more round...