Page 1 of 1

MD2 reading in Irrlicht sources

Posted: Wed Nov 18, 2009 11:14 am
by Oddmonger
Hello,

I'm trying to load a md2 mesh in my own renderer (nothing to do with Irrlicht). It works quite well, but i've got some problems with a few models (faces are disappearing).
After investigating, it seems that it's a blender exporting problem with the generation of "gl_commands" in md2 files ("gl_commands" is an optimisation which tell how to render with GL_TRIANGLES_STRIP and GL_TRIANGLES_FAN). I think the rendering order of fans or strips is wrong in blender's exportation.

I tried to load the contentious models with Irrlicht: no problems.
So i've read the CAnimatedMeshMD2.cpp from Irrlicht's sources.
I might be wrong, but i think that Irrlicht's md2 routines are juste drawing triangles, without using gl_commands from the md2 file.

I'm not sure, but i would bet Irrlicht only read raw vertices, and scales them with md2's frame array. Without using any gl_commands.

Am i right ?

Thank you.

Posted: Wed Nov 18, 2009 12:22 pm
by hybrid
Yes, we chose to ignore this optimization. md2 are not a such important mesh class, so we didn't invest too much overhead in their support.

Posted: Wed Nov 18, 2009 12:54 pm
by Oddmonger
Ok, I think i'll do the same thing.

Thank you for answering.