Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualturch

Posted 27 March 2012 - 01:50 PM

Matrices which only scale or rotate do so relative to 0,0,0. If you want to scale or rotate a mesh with a different point as a pivot, you need to first translate the mesh so that the pivot is at 0,0,0, then do the scale / rotation, then translate back.

That's what Rp and Sp are for. They are translation matrices, and in both cases first the mesh is multiplied by the pivot matrix (translated), then rotated or scaled, then multiplied by the inverse of the pivot matrix (translated back).

The other matrices are mostly used only for animation / joints. For more info see here.

#1turch

Posted 27 March 2012 - 01:49 PM

Matrices which only scale or rotate do so relative to 0,0,0. If you want to scale or rotate a mesh with a different point as a pivot, you need to first translate the mesh so that the pivot is at 0,0,0, then do the scale / rotation, then translate back.

That's what Rp and Sp are for. They are translation matrices, and in both cases first the mesh is multiplied by the pivot matrix (translated), then rotated or scaled, then multiplied by the inverse of the pivot matrix (translated back).

Most of those are only used for animation / joints. For more info see here.

PARTNERS