Page 1 of 1

[fixed] MS3D Speed Improvement Patch (for 0.12)

Posted: Fri Oct 07, 2005 7:34 am
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.

Re: MS3D Speed Improvement Patch (for 0.12)

Posted: Fri Oct 07, 2005 9:05 am
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 :)

Re: MS3D Speed Improvement Patch (for 0.12)

Posted: Sat Oct 08, 2005 7:45 am
by Guest
original: 170 FPS
patched: 340 FPS :)

Posted: Thu Oct 13, 2005 7:39 pm
by Thorben Linneweber
i uses my OWN models... (-> don't wonder why the frame-rate is so low)

original 88
patched 124

nice work!

Posted: Wed Jan 03, 2007 10:52 pm
by Andi|xng
Thanks for implementing the patch, Irrlicht authors 8)

Posted: Thu Jan 04, 2007 8:50 am
by hybrid
Thanks for the patch :D I hope it helps for your next projects :wink: