3D Animation Workshop: Lesson 10: Intersecting Spaces | 3 | WebReference

# 3D Animation Workshop: Lesson 10: Intersecting Spaces | 3

## Lesson 10 - Intersecting Spaces - Part 3

Local coordinate systems (and therefore center points) for the individual objects are clearly essential. But we quickly discover that they are not enough.

We very often need to treat an object as though it were positioned in the local coordinate space of another object.

Don't worry if that sounds confusing. It is confusing. But the idea can be mastered.

Think again of an apple on a table. We need the ability to place the apple precisely on the table. We find the location using the global coordinate system of the entire scene. But to rotate the apple around its own center (so as to orient it just as we want) we need the local coordinate system of the apple itself. Once the apple is positioned, we may wish to move it or rotate it , setting keyframes as we go, so that the apple dances on the table.

But what if we decide to move the table. If the table moves, we want the apple to move with it. Or, to take another example, if we place a person in a car, we want the person to move along with the car if the car itself is translated. Thus we need to somehow lock the person to the car or the apple to the table. This kind of locking one object to another is called PARENTING.

Parenting is a one-way street. The child object is translated (or scaled or rotated) along with the parent. But transformations to the child do not affect the parent. If the table is translated, the apple moves with it. The apple, however, is free to be moved without moving the table.

Creating a parent-child relationship creates an additional local coordinate system for the child, but not for the parent. The table has only its own local coordinate system. The apple, once it is parented to the table has two coordinate systems. The apple can be translated, rotated or scaled on its own local system. It can also be translated, rotated or scaled on the table's local coordinate system. The reason the apple moves with the table is that the apple is located at a certain distance in all three dimensions from the center of the table's local space. As the table is moved, the apple preserves that location in the table's local space. It preserves its spatial relationship to the origin of the table's local space.

These are difficult and subtle ideas that take on meaning only as you work with them in 3-D space. To give them visual content, let's return to our solar system.

If we parent the Earth to the Sun, rotating the Sun will swing the Earth around with it. Look at the following two renders carefully.

These are both top views, parallel projections (no perspective) so that the effect of the rotation is clear. The Sun is made the parent of the Earth. The Sun is rotated on its own vertical axis 180 degrees from one image to the other. The Earth, being the child of the Sun object, is rotated around the Sun's vertical axis as the Sun is rotated. The orientation of the axes running through the Earth make the effect of this rotation clear.

The Earth, as a child object, can still be rotated separately from the Sun. Here the Earth is rotated 90 degrees on its y axis, while its position with respect to the Sun is unaffected. Note how the green axes through the Earth are now horizontal, rather than vertical, in this final render.

This is only our first introduction to the subject of parent-child relationships between objects in scenes. We will discover as we go on the very extensive significance of organizing objects into hierarchies in which one object is the parent of another. Although it may seem confusing, the common usage is to speak of "parenting" a child object to the parent object--that is, of making one object the parent of another.