MD3 Reading Problem

I read threw all the code to read a MD3 from www.gametutorials.com. I put it in my code everything seems to be perfect yet when I goto run the code I get run time errors. It loads the head MD3 but nothing else, it crashes in the for loop in ReadMD3Data. I cannt figure out whats wrong. If someone could please help me get it to work thatd be great.

Thanks,
Nuke

What model are you reading?

The lara croft model in the zip file for that tutorial is corrupt, the upper body will not extract and that’s what loads after the head.

Try a different model, or get your own model online and unpack the pk3 file using winrar or equivalent. If you unpack the lara model then you can get the upper model from the models folder and that will do the trick. You need to rename it as lara_upper for the code to work.

I tryed a diffrent model, sarge from quake 3. It did the same thing but this time it wouldnt even load the head! Any ideas?

Thanks,
Nuke

I ran that tutorial and all the parts of the model loaded fine.

Can’t say I’m particularly excited about the format, though; it’s all just vertex blending and no skeletal deformation at all. You just get SO much more flexibility when you export a mesh with full skinning data, and then just drive your skeleton joints using separate animation files.

Too bad there’s no well-supported game format out there yet which actually does this, so that you can get a large number of meshes quickly. My own stick men just don’t cut it very far :slight_smile:

jwatte: MD2 is all one model. So is ms3d(I think)

>>Too bad there’s no well-supported game format out there yet which actually does this<<

doesnt halflife have skeletons (thats what ive heard)
anyways when doom3 comes out im sure we’ll be up to ears in skinned models

O well anyway dose anyone see anything wrong with my code?

nukem: I’m aware that md2 is even more limited than md3. md3 is sort of like pasting a few md2 models together; it retains all the limitations but makes things more complicated :-/

I’ll go looking for half-life models; that may make my life easier. Oh, if the Quake modders would only post their Max files online instead of the .md files :slight_smile:

I checked out the Half-Life models and found some code that Valve released in '99 and every “half-life model viewer” out there has stolen. Thanks for the reference.

Unfortunately, it seems the characters are only skinned with a single bone per vertex, but it still beats vertex blending, and polycount.com beats my modeling skills hands down :slight_smile: