[fixed] MS3D Speed Improvement Patch (for 0.12)
Posted: Fri Oct 07, 2005 7:34 am
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.
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.