MD2 reading in Irrlicht sources

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Oddmonger
Posts: 24
Joined: Tue Oct 04, 2005 7:01 pm
Location: Near Paris

MD2 reading in Irrlicht sources

Post 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.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
Oddmonger
Posts: 24
Joined: Tue Oct 04, 2005 7:01 pm
Location: Near Paris

Post by Oddmonger »

Ok, I think i'll do the same thing.

Thank you for answering.
Post Reply