0% found this document useful (0 votes)
74 views1 page

Basic Qualities: Animation (In .Avi Format)

This document provides a visual guide to understanding 3D transforms and matrices. It describes transforms as containers that hold position, rotation, and scale. 4x4 matrices are useful for representing transforms because they can combine these components in a way that allows for hierarchical relationships. The document explains key concepts like matrix multiplication, inversion, uniform and non-uniform scaling, and shearing through diagrams and examples. The goal is to build familiarity with matrix manipulation by exploring the range of possible transformations.

Uploaded by

cloroformus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views1 page

Basic Qualities: Animation (In .Avi Format)

This document provides a visual guide to understanding 3D transforms and matrices. It describes transforms as containers that hold position, rotation, and scale. 4x4 matrices are useful for representing transforms because they can combine these components in a way that allows for hierarchical relationships. The document explains key concepts like matrix multiplication, inversion, uniform and non-uniform scaling, and shearing through diagrams and examples. The goal is to build familiarity with matrix manipulation by exploring the range of possible transformations.

Uploaded by

cloroformus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Isner

Isner's Guide to Thinking with Transforms


and Matrices

Visualizing 4*4 Matricies

Table of Matrix Multiplication

Inverting Matricies

Introduction to Transforms

Visualizing Classical Scaling Transforms

VIsualizing Softimage Scaling Transforms

Local + Global Transforms

Inverting Softimage Scaling

When it comes right down to it, there are


only a couple things going on in 3D:
transformations moving and rotating
about, vectors and planes
projecting/intersecting, and the
occasional interpolation algorithm like a
spline or patch. Like Physics, at a low
level there's a set of fundamental
interacting components and everything
else sits on top of that.

Definitely a movie like The Matrix really


plays on the idea that these building
blocks are a core component in this new
world of human imagination we're
constructing. Seeing how these "atoms"
or building blocks shift around and
interact has many uses, especially for for
solving problems or creating low-level
machines for achieving 3D tasks.

For me, visualizing vectors always came


easy. It's pretty direct to understand
manipulating little lines with arrows.
Rotations and quaternions came harder,
but I had no choice because I was
banging my head up against problems
that required them so frequently. But
transformations have remained a little
more elusive. Sure most character setup
problems come down to transform issues
in the end, but 3D software and even
programming API's are very helpful in
letting you productively get by with only a
general sense of what you are doing with
them.

But like with many problems, to get to a


higher level you need to understand the
depth of a lower level and I've decided it's
time to expose the details of these atoms
for visual people..

When I started this project I found all of


the discussion on matrices and
transforms to date revolves around the
mathematics or math textbook type
diagrams which wasn't giving me a clear
picture of the underlying mechanism in
my head. So what I've tried to do in this
document is to invent a language to see
matrix + transform manipulation that
covers the whole range of behavior, and
gives a framework to think and invent
with.

Basic Qualities

Ok, so let's start with the basics. A


transformation is a container that holds 3
things: position, rotation and scale.

Lets start with a single object A in the


space of the origin O:

The most common way of thinking of


transforms is how I phrased it above: one
object sits in the space of another.

In this picture Object A sits in global


space. That means the coordinates on
the right describe how to get from the
origin to it's current state.

Simple enough.

But if we wanted to go into more detail,


how can you picture one object being in
the space of another as a process or set
of instructions?

Well the starting point is understanding


the root computation behind transforms:
4 * 4 matrix manipulation.

Visualizing 4*4 Matrices

Let's start piecing together the


components that happen in 3D matrix
computation. There are a few aspects of
why 4*4 matrix are useful for 3D.

The first thing you could say is that can


be used to hold Scale, Rotation and
Translation:

As a starting point, you could consider all


three of these components are an offset.
So a rotation of 30, starts at 0 and goes
to 30. A translation of 6,2 starts at (0,0)
and goes to (6,2).
The significant thing about 4*4 Matrix
manipulation is the way these intertwine
together.

If you take a position and rotation


difference together the rotation offset
occurs across the position change.

A good way to visualize it is as a rotating


disk or coordinate system on the end of a
stick. It's exactly this quality that makes
matrices it useful for doing transform
manipulation. You can think of the
rotations as "binding points" for little
molecules that create hierarchical
motion. Characters, and other
hierarchically driven 3D machines are all
composed of sets of these sticks acting
as the offsets between parents and
children.

So the next thing to take into account is


scale. You can also picture a scaling
delta happening in a similar manner to
rotation and the start and end of a stick:

When you bring together rotation and


scaling the visual result is predictable:

However there's a twist. With scaling the


behavior is a bit different than a simple
delta that starts at zero and becomes
your values at the end of the stick.
Matrix scaling acts more like there are
two independent sets of scaling values.
The first sits on the grid at the origin, the
second at the end of the stick.

What complicates matrix manipulation is


that scaling the grid at the origin shears
everything else, including rotation values
and the second grid. So in the above
result, if you scale the x axis on the first
grid 160%, the space (ie grid icon) at the
end of the stick no longer has its x + y
axis perpendicular to one another.

In the following example, the shearing is


coming from the fact that scaling is
applied after the translation and rotation.
You could get this result from the
transformation order (rotation, scale,
translate) or by having a parent with non-
uniform scaling.

Keep in mind in this sheared space


rotation values are also warped. Shearing
will only occur with non-uniform scaling.
So in the picture above if you scaled both
the x + y axis 160% there would be no
shearing, just an increase in the length of
the stick and the scale of the second
space.

So now that we have roughed out a


language to "see" different states of a
matrix, how can you become familiar with
with how to manipulate it? I believe the
quickest route to true familiarity is having
a perspective on the range of possibility.
So in the case of matrices, the first range
to look at is multiplication

Table of Matrix Multiplication

Below is a table of the different possible


combinations of multiplying matrices
together.
Both columns and rows start from an
empty matrix and become more complex
throug h: Translation, Rotation, Scaling,
Rot+Trans, SRT (non-uniform).

The Multiplication results from B2 to F6


can be clicked on for a larger diagram
with a Jscript example for XSI.

One of the first things that should be


obvious looking at this table is that matrix
multiplication is non-commutative (A*B
don't equal B*A). Multiplying a
Translation Only by a Rotation Only in B3
is not the same as multiplying a Rotation
Only by a Translation Only in C2.

Ma
Translation
wit
Empty (Vector or Rotation Scale
Un
Point)
Sc

Translation
Multiply Multiply Multiply Mu
(Vector or
B1, A2 C1, A2 D1, A2 E1,
Point)

Multiply Multiply Multiply Mu


Rotation
B1, A3 C1, A3 D1, A E1,

Multiply Multiply Multiply Mu


Scale
B1, A4 C1, A4 D1, A4 E1,

Matrix
with Multiply Multiply Multiply Mu
Uniform B1, A5 C1, A5 D1, A5 E1,
Scaling

Matrix
with Non- Multiply Multiply Multiply Mu
Uniform B1, A6 C1, A6 D1, A6 E1,
Scaling

Looking at a result like E5, you can see is


exactly a parenting relationship, where E1
is the child of A5.

So next let's look at the other important


manipulation you can do with a Matrix:
inversion.

Inverting Matrices

Inverting a Matrix is a little more complex


to visualize than negating a vector and
getting it to point in the opposite
direction.

An inverse is an opposite like you would


expect, but you have to have a clear
picture in your mind of what a matrix is
doing to understand the inversion.

For a uniform scaling inversion, it's pretty


straightforward. If you go back to the
stick metaphor, just picture instead of
going from the origin of the stick towards
a goal, you go backwards from the goal of
the stick to the origin.

You can see when rotation is non-zero,


the translation numbers are not going to
be the same after inversion because the
coordinate system you are describing the
path back with is that of the goal.

In the case of a non-uniform scaled


matrix, it's a bit more tricky. You need to:

1) Picture going back from the orientation


of the goal towards the origin.
2) Get rid of scaling on the goal by
multiplying it by the inverse of it's scaling.

The Inverse Matrix will have shearing on


the goal space (ie grid and rotation).

So multiplying Matrix A- by Matrix A will


produce an empty matrix.

Inverting through a sheared non-uniform


matrix is similar, but has the added twist
that the result does not scale the first grid
back to a uniform one.
You are scaling back to the inverse of the
scaling only, and that results in a non-
uniformly scaled (but not sheared)
starting grid on the inverse.

Basically if you have scaling on the origin


grid (which is what introduces shearing)
then we need to add two add two new
steps to the visual instructions to also
invert that origin scale.

To make the origin scaling a little more


clear, the following animation (in .avi
format) demonstrates the difference
between a Matrix and it's inverses as the
x-axis scaling increases at the origin.

So you can see things get a bit tricky


when you have non-uniform scaling on
the different axes, but once you figure out
how it works, it really reinforces the view
of a 4*4 matrix as rotation on a stick
between these two grid spaces.

Because you have two scale spaces like


this, matrices can be used to take an local
transform of an object parented below 20
other and convert that into a single global
transform which only holds the result
from the compounding scale, shear,
translation and rotation changes.

So now that we have a very clear idea


about what a 4*4 Matrix is and how it can
be manipulated let's begin to analyze how
transforms and parenting work.

Introduction to Transforms

The first thing you have to consider, is

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy