[fixed] MS3D Speed Improvement Patch (for 0.12)

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

[fixed] MS3D Speed Improvement Patch (for 0.12)

Post by Andi|xng »

I had a problem with .ms3d files in Irrlicht and began to find a way to improve the rendering speed for .ms3d meshes in Irrlicht 0.12 ( http://irrlicht.sourceforge.net/phpBB2/ ... php?t=8834 ).
Now my patch is finished :)

Here you can download the source, the patched irrlicht.dll and two example programs (only for Windows, but code should work OS-independently):
http://www.xenoage.com/downloads/irrlic ... _patch.zip

This patch for Irrlicht 0.12 (simply replace the old CAnimatedMeshMS3D.cpp) makes .ms3d much more faster. Try out the .exe files in the bin-directory.
Resoluts on my computer:
- Original Irrlicht 0.12: About 150 FPS
- Patched Irrlicht 0.12: About 330 FPS

Functionality: Original Irrlicht 0.12 creates a vertex for each index, so the index buffer can not improve the speed. The patch finds equal vertices and reuses them in the index buffer.

This patch contains also the no-material-patch written by sdi2000:
http://irrlicht.sourceforge.net/phpBB2/ ... php?t=8411 (Thank you very much, sdi2000!)

The .exe-files do not use the no-material-mesh here, because the old irrlicht.dll would crash. If you want to test it, uncomment the lines "IAnimatedMesh* mesh = smgr->getMesh("../../media/sydney-nomaterial.ms3d"); ..." in main.cpp and try again.
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Re: MS3D Speed Improvement Patch (for 0.12)

Post by Andi|xng »

I tested it on another system and found out, that it makes only a small difference there.
It seems that only some graphics cards render much faster with the patch. But the advantage of less vertices (and so less memory usage) is still there of course.

If some of you have the time, please try the 2 exe-files from the zip and post your results here. Thanks :)
Guest

Re: MS3D Speed Improvement Patch (for 0.12)

Post by Guest »

original: 170 FPS
patched: 340 FPS :)
Thorben Linneweber

Post by Thorben Linneweber »

i uses my OWN models... (-> don't wonder why the frame-rate is so low)

original 88
patched 124

nice work!
Andi|xng
Posts: 83
Joined: Thu Mar 24, 2005 10:49 pm
Location: Schrobenhausen, Germany
Contact:

Post by Andi|xng »

Thanks for implementing the patch, Irrlicht authors 8)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Thanks for the patch :D I hope it helps for your next projects :wink:
Post Reply