Scaling MD3

hi.

Could someone please tell me how to scale a md3(quake3) model. I tried scaling vertices and tag positions but ths doesn’t work. Parts of body do get scaled but there are “gaps” in model now (head floating in the air and so on)… I suspect it has something to do with rotation matrix of tags. Could someone please tell me the way to scale the so the look ok. Some code would be apriciated.

Hmmm, this is probably really wrong, but I’ll just do this, for any model in fact…
glPushMatrix();
glScalef(/Scale Down to right size/);
md3.DrawModel();
glPopMatrix();
I have always scaled down my models this way, and it works perfectly.

I Know you can scale anything like that… I need a way to scale it down on load-time.

Sounds like you did not scale one or more tag positions appropriately. That is the only way I could envision such gaps. Also, make sure you orthonormalize the tag rotation matrices. I have come across several md3 models in which the matrix was not.

I don’t think there is problem with rotation matrix (btw : could someone please explain what is stored in there (up, right, front vectors or what?)), becouse the model works just fine if I don’t scale it. And how do I scale corectly … I just do tag[i].position *= scale; (position is vector and scale is float) for all tags…

There are md3 compilers out there that some modelers use that produces non-orthonormalized rotation matricies. You must orthonormalize the rotation matrix for each tag. Otherwise, you could come across a model such as md3-kisscool, which has scaled rotation column vectors, rather than ortho-normal rotation column vectors. And yes, the columns of the rotation matrix could be described as local coordinate axes for the associated tag.