does scaling preserve relative distances? [SOLVED]

Started by
3 comments, last by etaylor27 19 years, 8 months ago
When loading vertices in from an .an8 (anim8or) file, I've been scaling them down so the models are the correct size. The way I do this is to divide the x, y, and z components by some constant. The model looks fine, but when I load up the skeleton (which is given as bones which have only length and a quaternion orientation relative to the parent), and render it, it's off by a little bit. It doesn't quite look the same as the bone/model view that is in Anim8or. I thought at first that perhaps it was because of my scaling, that the lengths wouldn't scale just like the points, dividing each by that same constant, but after working out some of the maths, it looks like the distance between two points should scale with the exact same constant factor I'd used to scale each point. Please correct me if I'm wrong. I hope this was clear enough, please also post if you don't understand and need clarification. Elijah [Edited by - etaylor27 on August 19, 2004 11:44:59 PM]
--"The greatest pleasure in life is in doing what people say you cannot do." -- Walter Bageholt
Advertisement
Have you checked center of polygon type values?
I've been having issues lately with scaling related to that.(I think)
~V'lionBugle4d
With uniform scaling it's obvious every distance ratios are preserved.

- I suppose you did not modify the quaternions or any non dimensionnal value.

"it's off by a little bit"
Can you be more precise. Maybe it's only a question of numerical precision, but I doubt any float error could cause significant and visible artefacts here.
"Coding math tricks in asm is more fun than Java"
yes, I know my description was not very accurate.. I'll try to post some pictures later today.

Thanks
Elijah
--"The greatest pleasure in life is in doing what people say you cannot do." -- Walter Bageholt
sorry to bother everyone, I've figured out my problem... Anim8or uses a rotated coordinate system in relation to mine (his y is up and z points into the screen from the front) and I was doing the quaternion conversions wrong, so some of the rotations, while small in relation to their parent bones, were mirrored, and cause the bones not to line up with the model perfectly.

Elijah
--"The greatest pleasure in life is in doing what people say you cannot do." -- Walter Bageholt

This topic is closed to new replies.

Advertisement