FEATURE June 18, 2001
Coordinate Systems
by Ted Boardman
Starting off, I'd like to
thank everyone who stopped me at Autodesk University to mention they had been
reading the column. I appreciate the feedback and the suggestions on possible
topics for upcoming columns.
Remember that these
columns are intended to help you increase your productivity and try to make
your experience with VIZ and MAX more fun. That's right folks, this stuff should
be fun. Don't tell the boss that, though.
Feedback from readers is
helpful in gauging the topics you perceive as important for getting the job
done. I can plan my columns to try to fit as many solutions and alternate work
methods for those problems and bottlenecks that commonly slow those pesky budgets
and schedules. Thanks again.
For those of you who missed
Autodesk University this year, the event was held in Las Vegas in the last week
of November. For whatever else Las Vegas may or may not be to you, it is the
absolute best place in the world to study lighting and materials. The Mr. Potatohead
School of Interior Design practice of putting every conceivable wood, plastic,
chrome and fabric treatment in the same room and lighting it with any and all
light types is a paradise to those of us who study the interaction of light
and surfaces. It's not to be missed.
Where in the World...
One issue in 3D Studio MAX
and VIZ that I see as a fundamental hindrance to production for many users,
both new and experienced, is a lack of understanding of the coordinate system.
The effective use of several important commands in both VIZ and MAX requires
users to understand the various coordinate systems in the software, Align and
Array being the most notable. In both Align and Array you are asked to enter
numeric data to align or array objects along the x, y or z axes. However, the
direction of x, y or z depends on the active coordinate system and, often, the
active viewport.
Many users are familiar
with the Absolute World coordinate system in VIZ or MAX because it is the default
Grid plane with which VIZ and MAX start. However, the World Coordinate System
is the active coordinate system for each viewport.
Reference Coordinate System
In the Toolbar menu, you
will see a field with View in it by default. This is the Reference Coordinate
System that is currently active. Click on the View field, and you will see a
pop-up menu of the different Reference Coordinate Systems available, as shown
in Figure 1.
Figure 1: This menu shows avaiable Reference Coordinate Systems.
|
I will take you through
a simple exercise that will illustrate some of the differences between the various
Reference Coordinate Systems. You can either try the exercise on your computer
or, better yet, just read along to get the idea, then go to the computer and
do the exercise. In any case, at some point you should sit down and just play
with simple objects to get a feel for how the system works. As with many VIZ
and MAX tools, don't try to learn this during the deadline crunch on a large
project. With a little practice the Reference Coordinate Systems will become
second nature and your productivity will increase accordingly. At the end of
this column I will summarize the attributes of each system.
Getting the Lay of the Land
Start with a clean session
of either VIZ or MAX with the display set to four viewports: Top, Front, Left
and Perspective. In the Top viewport, create a cylinder in the middle of the
display and click the Zoom Extents All button, as shown in Figure 2.
Figure 2: The Cylinder is zoomed to the extents in four viewports.
|
View Reference Coordinate System
Notice that the Axis Tripod
shows positive x to the right, positive y up and positive z out toward the viewer
and that the current active Reference Coordinate System is set to View. Right-click
in the Front viewport and notice that the Axis Tripod adjusts to make the positive
axis's point in the same directions as in the Top viewport. Right-click in the
Left viewport to see a similar change. The Axis Tripod adapts itself to the
orthographic viewports while in View Reference Coordinate System.
Now, right-click in the
Perspective viewport and notice that the Axis Tripod corresponds to the World
Coordinate System as indicated by the tri-color tripod in the lower left corner
of each viewport. This is true for all non-orthographic viewports while in View
Reference Coordinate System.
Screen Reference Coordinate System
Right-click in the Top viewport,
then click View in the Toolbar and choose Screen Reference Coordinate System in
the list. Right-click in the other viewports and watch the Axis Tripod. Screen
Reference Coordinate System is exactly the same as View for orthographic viewports.
However, for non-orthographic viewports the positive z axis points out of the
screen toward the viewer. Arc-Rotate in the Perspective viewport and watch the
Axis Tripod move in the other viewports. Screen Reference Coordinate System allows
you to move objects in space based on your line of site in non-orthographic viewports.
World Reference Coordinate System
Right-click in the Top viewport
and switch to World Reference Coordinate System. Right-click in the other viewports,
and you will see that the World Coordinate System is always active for all viewport
types.
Parent Reference Coordinate System
The next Reference Coordinate
System in the list is Parent, which requires an object to be hierarchically
linked to another object in the parent/child relationship. In Parent Reference
Coordinate System, the child always uses the parent's Local coordinate system,
which will be explained next.
Local Reference Coordinate System
Right-click in the Top viewport
and choose Local in the Reference Coordinate System list. Right-click in the
other viewports and the Axis Tripod is the same as it was for the World Reference
Coordinate System. This is a coincidence because you created the cylinder in
the Top viewport. Right-click in the Perspective viewport and rotate the cylinder
about 45 degrees in both the x and y View Reference Coordinate System, as shown
in Figure 3.
Figure 3: Here I've rotated the cylinder about 45 degrees in the x and y View coordinates
of the Perspective viewport.
|
Grid Reference Coordinate System
At this point you will notice
that even though you had the Reference Coordinate System set to Local, it switched
automatically to View when you picked the Rotate button. The current Reference
Coordinate System is sticky for each Transform: Move, Rotate and Scale. Once
you set the Reference Coordinate System it will be retained for that Transform,
until you change it again. The Axis Tripod also changes to the Transform Gizmo
when the Transform buttons are picked.
Right-click in the Top viewport,
click the Move Transform button and set the Reference Coordinate System to Local.
Right-click in the other viewports, and you will see that the Axis Tripod stays
oriented to object as it was created. This is an especially powerful tool for
production with which you will want to familiarize yourself.
The Grid Reference Coordinate
System requires you to create a new Grid Helper object as the active work plane.
Right-click in the Top viewport to activate it. In the Status bar, toggle the
Autogrid feature on. As you move your cursor over the cylinder, you will notice
a tri-color cursor track the Face Normal that it is over. In the Create panel,
pick Box, hold the Alt key and pick and drag a Box primitive on the end cap
of the cylinder, as shown in Figure 4.
Figure 4: Using Autogrid, hold the Alt key and create a Box on the end cap of the
cylinder.
|
Holding the Alt key while
creating an object in Autogrid mode concurrently makes the new grid in the scene
and makes it the active grid. Switch to Grid Reference Coordinate System and
the x, y and z axes of the grid are used for the current transform. (Note: in
this example the fact the new grid corresponds to the local axis of the cylinder
is a coincidence.)
Click the Select button,
pick the new Grid object in the active viewport, right-click on the Grid and,
in the pop-up menu, choose Activate Grid then Home Grid to return to the default
grid system. You can have as many of these grid helpers as you want, but only
one can be active at any time. You can reactivate the new grid at any time.
Grid helpers are similar to UCS grids in AutoCAD.
Pick Reference Coordinate System
In the Pick Reference Coordinate
system you can use the coordinate system of another object in the scene as the
current system. Right-click in the Top viewport to activate it and create a
small Sphere to one side of the cylinder. Change the Reference Coordinate System
to Pick, and pick on the cylinder in the Top viewport. The sphere now uses the
cylinder's Local Reference Coordinate System as its own. Also, Cylinder01 is
added to the list of available Reference Coordinate Systems.
Pivot Point Options
Another aid to production
that goes hand in hand with the Reference Coordinate System is the active Pivot
Point type. Just to the right of the Reference Coordinate System window is a
flyout menu with three choices of Pivot Point types. Understanding the different
options makes transforming objects with Reference Coordinate Systems a more
flexible and powerful tool, as shown in Figure 5.
Figure 5: Here is the Flyout menu of Pivot Point options.
|
Pivot Point Center
In the Top viewport, select
all the objects in the scene. With the Pivot Point Center option set you will
notice that each selected object will be Transformed based on its current active
Reference Coordinate System around its own individual pivot point. This is especially
interesting when you are in Rotate or Scale Transform. (Caution: Never Scale
objects in either VIZ or MAX. Always apply an Xform modifier and scale the Xform
Gizmo.)
Selection Center Choose
Use Selection Center in the flyouts, and you will see that the entire selection
set of objects uses a single Pivot Point in the geometric center of the bounding
box of the selected objects. This is most appropriate for rotations.
Transform Coordinate Center
The Transform Coordinate
Center uses the 0,0,0 Absolute World Coordinate point except when Pick Reference
Coordinate System is active. The selected object then uses the Pick objects
Pivot Point as its own.
Figure 6: The
Active Reference Coordinate System is shown in parentheses in the Align
dialog box.
|
Summary
The attributes of the various
Reference Coordinate Systems are:
View. The Axis Tripod adapts
itself to each orthographic viewport so that positive x axis is to the right,
positive y axis is up and positive z axis is perpendicular out of the display.
Non-orthographic viewports resort to using World Reference Coordinate System.
- Screen. This is the
same as View in orthographic viewports. In non-orthographic viewports the
positive z axis always points at the viewer.
- World. The World Coordinate
System always corresponds to the Absolute World Coordinates.
- Parent. The child object
uses the parent's Local coordinate system in a hierarchically linked parent/child
relationship.
- Local. The coordinates
always remain with the object as it was created, regardless of the rotation
angle of the object.
- Grid. This uses the active
Grid System's coordinate system.
- Pick. This uses the
Local Coordinate System of another object picked in the scene.
For the ALIGN, ARRAY and
MIRROR commands in VIZ and MAX, always check the current active Reference Coordinate
System to see which x, y and z axes is being used by the command. The mode is
noted in the Align or Array dialog, as shown in Figure 6. (Hint: The View Reference
Coordinate System is never listed in ARRAY, ALIGN or MIRROR commands. You will
always see Screen, which is the same.)
As I mentioned at the outset
of this column, these incredibly powerful tools and options are simple to learn.
You are doing yourself a great disservice if you aren't using these effectively
in daily production tasks. Start with simple examples to get the feel of the
options, and it will come naturally as you work. Good luck and have fun.
Ted Boardman is one of a
dozen Discreet Training Specialists from around the world; not a Discreet employee
but a consultant for training 3D Studio VIZ and 3D Studio MAX dealers, Discreet
Application Engineers and some Discreet major account clients. However, his
primary business is custom professional-level training and some scheduled training
sessions around the world. You can reach him at [email protected].
(Originally published in Cadence May 2001.)
|