DesignImage.co.uk
 
 
Matrix 3 for beginners

You may have thought that the Matrix 3 controller uses some sort of mathematical voodoo (like quaternions) when it's actually very simple.

Assuming you know what a vector is. You can think of the matrix3 as a 4 x 3 matrix where the first 3 rows represent the objects X Y Z axis and the last row represents the objects world position.

For example…

Start a new scene in max. Create a box somewhere in the LEFT viewport Then open up the MAXScript Listener and type this...

$Box01.transform

The Max listener then returns a value like this.

(matrix3 [0,-1,0] [0,0,1] [-1,0,0] [0,12,57.6])

If not the type this into the listener.

$Box01.transform = (matrix3 [0,-1,0] [0,0,1] [-1,0,0] [0,12,57.6])

Looking at the first row we can see th at the x-Axis has this vector [0,-1,0] Ie the local x-axis of the object points backwards along the World Space y-axis. Now click on the object and pick Local from the main toolbars Coordinate system dropdown list.

Note the direction the objects X-axis points and compare it with the little icon in the bottom left of the viewport that represents the world axis. You should see the local x-axis of the object points backwards along the World Space y-axis. Now type this into the listener window.

$box01.transform = (matrix3 [1,0,0] [0,1,0] [0,0,1] [0,0,0])

The box now moves to the center of the world (because the last row is now [0,0,0] ) and its local axis are aligned with the world axis. It's also worth noting that by tweeking the values of the first 3 row you can also control the objects scale.

E.g. Typing this will squash the box flat. Because the length of the z axis (the 3rd row) is now zero.

$box01.transform = (matrix3 [1,0,0] [0,1,0] [0,0,0] [0,0,0])

Typing this will stretch the box. Because the length of the z axis (the 3rd row) is now 10.

$box01.transform = (matrix3 [1,0,0] [0,1,0] [0,0,10] [0,0,0])

Even more strangely you can shear the box by typing this…

$box01.transform = (matrix3 [1,1,0] [0,1,0] [0,0,1] [0,0,0])

Because the angle of the x-axis has changed whilst the y and z remain aligned to the world.

enjoy..