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.
Show differencesHistory of post edits
#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.
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.