Performance difference in models

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
green.t
Posts: 3
Joined: Wed Mar 29, 2006 7:58 am
Location: Australia
Contact:

Performance difference in models

Post 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.
Green T.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post 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
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
hybrid

Post 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.
kburkhart84
Posts: 277
Joined: Thu Dec 15, 2005 6:11 pm

Post by kburkhart84 »

I've noticed that the .x file renders faster than .ms3d on myt computer, both being the same static model.
Hirte
Posts: 73
Joined: Sat Apr 01, 2006 1:32 pm

Post 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...
Post Reply