PDA

View Full Version : What's a matrix?

 bandini06-23-2006, 07:38 AMI know this is a basic question, but I really hope someone will take a few moments to explain it to me, since I am new to Xpresso. I'm sure there are many others who would benefit a brief explanation as well. What is a matrix and why are they used in xpresso? I know I'm supposed to use them for certain functions, but I really have no idea why I am doing that. For example, connecting an emitter to a null requires the null's global matrix to be wired to the emitter's alignment. I would expect that I would wire the null's global rotation to the emitter, but this obviously is not possible. I can see on the tags that alignment is a matrix value, but rotation is a vector value. I'm pretty sure I remember vectors from my high school physics days. Unless I'm mistaken, a vector is a collection of an objects' direction and magnitude in that direction. So, I can easily understand why something like velocity would be a vector quantity. But, how does a vector relate to a matrix?
Per-Anders
06-23-2006, 07:47 AM
A Matrix is an array of numebrs in a grid (think like excel, a grid of x * y cells).

The matrices in cinema are used to store the transformation data about an object and to apply transformations to other objects and matrices quickly (matrix math is a very convenient method of doing transforms without so much messy trig).

In cinema the transform matrix is position, orientation and scale, they are made up of four vectors (each vector being a 3 component vector x,y,z), and when you use a matrix to vectors node you can see this. The first vector (V0 or something "off") is the position of the matrix, the next three vectors are the directions of the axis of the object (the direction that x, y and z face in 3d space) and the objects scale (the length of these vectors. Because the vectors are seperate for each axis this allows you to skew an object using it's matrix.

If you want to learn more then you would do best to do a google search on matrices and 3d matrix math which might help you understand a little more about what they are and their uses (for instance to convert a position from local to global space and back again, or to rotate an object by an even ammount constantly).

Srek
06-23-2006, 08:14 AM
The COFFEE SDK that is available form plugin cafe includes a nice description on what matrices are and how they are used in CINEMA.
Some tidbits of information regarding Matrices and Xpresso can be found here
http://www.bonkers.de/xpa/coordinates.html

Cheers
Björn

CGTalk Moderation
06-23-2006, 08:14 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.