Jump to content
  • Advertisement
Sign in to follow this  
Rajveer

matrix deforming 3d object

This topic is 4352 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

hi guys. i have a matrix for an objects 3d rotation. the math library im using is in fixed point math, so eventually after loads of multiplications of matrices the tiny discontinuities become large enough to scale/stretch my object. normalising each axis ever frame (the 1st 3 columns of the matrix) helps but eventually the object still becomes distorted. ive used different methods i.e. creating the matrix every frame so i start with a "fresh" matrix every frame, but there are some advantages to keeping the same matrix. what would you guys suggest?

Share this post


Link to post
Share on other sites
Advertisement
yep, im programming on the nintendo ds and thats all it can support. its really great at it, but thats all it supports.

Share this post


Link to post
Share on other sites
Do you use incremental or from-scratch rotations? That is, do you rotate and write the rotated vertices back into the object?

Share this post


Link to post
Share on other sites
atm im using incremental. im pretty sure its because im not orthogonalizing my matrix before normalizing. to do this do i do two cross products between x,y and z,x axis?

Share this post


Link to post
Share on other sites
A rotation matrix should not change the length of a vector. You can calculate the matrix norm for the rotation matrix to determine if the matrix becomes distorted. Only then you need to recreate the matrix.

Maybe this helps:
http://en.wikipedia.org/wiki/Matrix_norm
(see section "p-norms and uniform norms")

Share this post


Link to post
Share on other sites
Incremental rotations allow even minor errors or floating point drifts to accumulate over time, eventually warping the source vertices. You might consider using "from scratch" rotations instead.

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!