View Full Version : Scaling MD3
12-10-2001, 11:59 PM
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.
12-11-2001, 12:08 AM
Hmmm, this is probably really wrong, but I'll just do this, for any model in fact...
glScalef(/*Scale Down to right size*/);
I have always scaled down my models this way, and it works perfectly.
12-11-2001, 01:39 AM
I Know you can scale anything like that.. I need a way to scale it down on load-time.
12-11-2001, 05:55 AM
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.
12-11-2001, 06:50 AM
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..
12-11-2001, 09:40 AM
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.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.