Page 1 of 1

Help with a quake 3 md3 model loader?

Posted: Thu Nov 11, 2010 5:17 pm
by rarejoint
Note: I say surfaces but I think most other people call them meshes

I'm trying to write a md3 model loader in c++ for a project. I've run into a problem and cannot work out what is wrong. I'm working through it step by step so have not yet implemented animation or textures. I can load in a single md3 model but only if it has a single surface. If it has multiple surfaces it does not display it correctly, I can see the rough shape there though. Oddly I can load in one model that has 5 surface the only difference I can see is that it is just one frame.

If I add all the triangles from all the surfaces to an array and all the vertices to an array and try and draw them in one go I get the working model and odd looking other ones.

I tried drawing the vertices to the screen after each surface object but this didn't work at all.

Not sure where to go from here

Any help will be greatly appreciated

Re: Help with a quake 3 md3 model loader?

Posted: Thu Nov 11, 2010 11:13 pm
by ^misantropia^
Is your code available somewhere, on GitHub or the like?

Re: Help with a quake 3 md3 model loader?

Posted: Fri Nov 12, 2010 9:30 am
by rarejoint
I've got a zip of the files on my server. I'll pm you the download link if you don't mind. I don't like putting messy unfinished code up for everyone to see

Re: Help with a quake 3 md3 model loader?

Posted: Wed Nov 24, 2010 8:44 pm
by bitWISE
Triple check that you are parsing and sending flawless vertex and index buffers to the API.