Jump to content
  • Advertisement
Sign in to follow this  
etaylor27

does scaling preserve relative distances? [SOLVED]

This topic is 5079 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
Have you checked center of polygon type values?
I've been having issues lately with scaling related to that.(I think)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!