Contents page

Index

III. Moving Stuff in the Detail Editor


-------------------------------------------------------------------------
                  III. Moving Stuff in the Detail Editor
-------------------------------------------------------------------------

Knowing how to move your views around is important, as when you're manipulating an object you'll find yourself changing your viewpoints around constantly. There is a whole new set of commands for moving the OBJECTS in the editor around.

In order to manipulate an object, we either have to load an existing one or start one from scratch. Imagine comes with several simple pre-built objects called 'primitives' that are very convenient to use as starting points for creating your own objects. Talking about these primitives doesn't really belong at this point in the tutorial, but it would be nice to be able to have something to look at and manipulate as each of the viewing and manipulation commands are presented.

To make a primitive object, select 'add' in the Edit menu, and 'primitive' in the sub-menu. There are six simple shapes that Imagine will automagically create for you. They are a sphere, a cylinder, a cone, a disk, a plane, and a torus. When you select one, Imagine will ask how many points the object should have.

With primitives like a sphere, the more points that define it, the smoother its appearance is going to be when rendered. Remember that even curved surfaces are made from triangles, and the surface becomes better defined with each point added. However, an object with more points than are necessary can become a burden; drawing the object in the editor takes more time, and although the final rendered picture with be higher quality with extra points, it will also take longer. Thus, when you add new primitive objects, Imagine asks what level of detail you would like.

For example, the sphere primitive asks how many circle sections and how many vertical sections will make it up. The default is a reasonable number of defining points. If you were looking for a higher quality sphere because you were going to zoom in very closely to it, you might use extra points. If the object is going to sit in the background and not be examined closely, you might select fewer points. Most of the time, the defaults serve as a nice compromise, but you are much more likely to simplify the object as opposed to increase the default level of detail. The plane primitive in particular lends itself to simplification- most of the time you can bear with defining the simplest plane possible (2 triangles) as opposed to the overburdened default of a grid of 200 triangles.

Each primitive lets you define the numbers of points that define it; the parameters that you can vary are all pretty self-explanatory. For example, the cylinder lets you define how many points are to form the circle around the rim, and also how many sections the body of the tube should be defined as. Other options (available for some primitives) are simple flags that define whether to close the ends of the cylinder (to create a hollow tube versus a log) or to 'stagger points' in some models. Staggering points increases the smoothness of curves- you should almost always leave it on. Note that the disk and the plane are actually flat objects- the others all have depth. All objects also let you define their size; this is quite straightforward.

When you have loaded an object or added a primitive, you'll notice that you can see each point and edge in the wireframe. In addition, you'll see an AXIS, usually near the center of the object. In Imagine, EVERY OBJECT HAS IT'S OWN INDEPENDENT AXIS. An object's axis helps Imagine determine which way an object is facing, how it is scaled, and even what it's position is. Imagine doesn't understand what the objects ARE; it doesn't realize that a complex object like an airplane should orient itself with wheels down instead of balanced sideways on a wingtip. The axis actually defines the object's position; if you ask Imagine to move an object, Imagine really just moves the axis, and the object's points, edges, and faces are dragged along with it. When you rotate an object, the rotation occurs around the object's axis, as opposed to the world's absolute reference system. Scalings, where you change the size of the object, also use the object axis as a basis.

When you want to manipulate a certain object, you have to tell Imagine which one (or ones!) that you're interested in, since you might have a dozen different object loaded at once. The way of choosing an object so you can manipulate it is just by clicking on it's axis. The object will turn a pretty blue color (or sometimes purple- more later!) which indicates that the object is chosen- any manipulation commands will be done on this one object. The object is said to be "picked", and Imagine knows that you want to apply commands to this object as opposed to another.

Once you've picked an object, the most common manipulations are to move it around, rotate it, or scale it. These basic commands are often used, so Impulse has made it pretty easy to do. When you have a selected an object, you type the letter 'm' for move. The object will disappear (!) and be replaced by a big yellow "bounding box" which encloses the volume where your object was. This bounding box represents the size, shape, position, and orientation of your object. Since the box is so simple to draw, Imagine can update it in realtime as you manipulate it, allowing you to position it quickly and easily.

After selecting the object and pressing "m", Imagine knows you want to move the object. Putting the cursor in any of the three main views, pressing the left mouse button and then dragging the mouse will drag your object in the direction you move. You do not have to click on the yellow box; anywhere in the view is fine. You can keep moving the object as long as you like; you can let go of the mouse button, move the pointer to another position in any of the three views, and continue moving the object. You are also welcome to zoom in and out, make one view full-screen, or re-center your views at any time. When you are finally done moving your object, pressing the space bar will accept the change and your object will be displayed as a wireframe in it's new location. If you've made a mistake, you can press the ESC key instead of the space bar. This also exits the move mode, but the object's position is unchanged from where it was before you started to move it. This is obviously useful for fixing mistakes or changing your mind.

Two other commands work much like move: rotate and scale. If you select your object and press "r", you will rotate your object, and you'll see the yellow bounding box spin as you drag the mouse with the button down. You can also change spin axes (to pitch or bank the object, as opposed to yawing it) by pressing "x", "y", or "z" to define which axis you want to rotate around. All rotation is done around the OBJECT'S axis.

Scaling is done by selecting "s" and dragging the mouse. Again, scaling is done relative to the OBJECT's axis. If the axis is in the center of the object, the object will grow in all directions. If it is at the bottom, the object will grow up and out, but not down.

Each of these three commands (move, scale, and rotate) can be called either when you've picked an object or during any other move, scale, or rotate command. For example, you might pick an object, press "m" to move the object, position it in a new place, press "r" to spin it, then "s" to scale it. You do not have to press the space bar after every change; only after you are finally satisfied with the new location, size, and orientation of your object do you want to press the space bar to accept the changes you've made. Aborting by using the ESC key will remove all of the changes (movements, rotations, and scalings) that you've made.

These manipulation commands are easy to use, and they have other controls that make certain manipulations even easier. At the bottom of the screen, there is a status bar that will highlight which mode you're in. If you are moving, the "M" in the "M=Move" at the bottom of the screen will be highlighted, and the "R" and "S" highlight when you're rotating or scaling.

The "x", "y", and "z" commands that allow you to change rotation axes also work in moving and scaling. They act in these two modes as toggles- when you start a move, you are free to move it in all three directions, X, Y, and Z. You might want to restrict a direction of motion, though, if for example you are moving a table along a floor and you didn't want to accidentally lift the table into the air as you moved it left and right. Pressing the "x", "y", and "z" keys will toggle the allowable directions on and off, so pressing "z" will anchor the table's height, and pressing "z" again will allow you to lift it up if you change your mind. This also works in the scaling mode; if you want to make an object narrower without changing its height, you might toggle "z" and scale the object down. With the "z" toggle off, the object will maintain it's Z height, but will shrink in the X and Y directions. At any time, the display at the bottom of the screen shows the letters "X-Y-Z" and highlights the directions that are "active" or changeable.

A related shortcut is using the capital letters "X", "Y", and "Z", which set the toggles to allow movement and scaling in one direction only. If you wanted to lift a table straight up, you just type "Z" and the table will be free to move up and down, but not in the X or Y directions. This method of setting the toggles overrides whatever position they were set in before, but you can use the individual toggles afterwards to set whatever freedoms you like.

Imagine gives you even more flexibility if you want to use it. Whenever you move, rotate, and scale an object, it is based on a certain coordinate system. The default is to use the standard coordinate system- the set of axes that is fixed in place and shown at the bottom left of the three main views. This is called the "world" coordinate system. However, each object has it's own "local" coordinate system, defined by it's own axis. Imagine allows you to use a local coordinate system instead of the world system if you like.

For example, if you have an object in the shape of a plane, the local coordinate system probably has the Y axis (going front to back) in line with the main fuselage of the plane. Using "r" to rotate the plane, you can easily position it so that it is angled up like it is climbing into the sky. If you then wanted to move it in a straight line along it's "flight path", the direction it's pointing, you could select move, and try to judge by eye the new position in the direction in front of the plane. If, instead, you select local mode (by using "l") and restrict motion along the Y direction by typing "Y", the plane will move smoothly along the line it's pointed along. In the world coordinate system, it's moving in both the Y and Z directions, but in it's local coordinate system, it's moving only in it's Y direction.

To switch between coordinate systems, you just type "l" and "w" whenever you want to change. The current coordinate system has L or W highlighted at the bottom display just like the X-Y-Z indicators. Many times the local and world coordinate systems will be the same, so one is equivalent to the other.

One final option when you're manipulating objects allows you to manipulate the axis of the object independently. If you want to move, scale, or rotate an object's axis [without simultaneously affecting the object!] you can use "M", "R", and "S", the capital letter versions of the object manipulation commands, to affect only the axis. There are some occasions you might want to do this for fancy tricks, but most of the time, you just want to move the axis around just so that it lies near the center of your object.

The standard commands to move, rotate, and scale objects have been streamlined for ease of use since they are performed so often. Sometimes, however, they are somewhat lacking, especially when you need precise control over how your object is to be manipulated. For the precise control of object manipulation, Imagine has a special command called "Transform" which allows you to numerically control your object as opposed to judging by eye.

The transform command works much like the standard interactive commands in that you first select your object (by clicking on it's axis) and then telling Imagine what to do to it. To enter the transform command, you click on the object (it becomes blue or purple) and pull down the menu item "transform" from the Object menu. A small requester will appear. You have six options you can choose from: translate, rotate, scale, position, alignment, and size. You also enter X, Y, and Z arguments.

Translate takes the X, Y and Z arguments and moves (translates) the object that distance.

Rotate will rotate the object around the axis you specify by an amount (in degrees) you specify in X, Y and Z. Performing more than one rotation at once is legal, but it is easy to make mistakes in final orientation. If you rotate around more than one axis at once, the Z rotation is performed, then the X rotation, then the Y rotation.

Scale will scale your object by a certain factor. To double the size, just enter 2 in each of the X, Y, and Z boxes. A negative number is completely legal, and if one or three of the scalings is negative, you'll actually get a scaled mirror image of your original object.

Position is like Translate in that it moves your object. Instead of moving a certain distance, however, it moves to absolute world coordinates.

Alignment is also absolute; it will rotate your object in whatever way necessary to align in the direction you specify, regardless of the original orientation. Setting X, Y, Z all to zero will make the object line up exactly with the world axes.

Size is again absolute. It uses the axis size as a benchmark, and will scale the object (and it's axis) to an absolute size. The "default" size that all axes start out at is 32 Imagine Units, so entering an XYZ size of 32 32 32 will bring most objects back to their virgin sizes.

To use any of these sub-commands, just click on the box next to it's name and type in the appropriate X, Y, and Z arguments in the boxes to the right. Selecting "OK" will perform the manipulations, "cancel" will abort without affecting your object.

You have the option to use world or local coordinates, just as in the interactive commands; just click on either box to decide. The default is the world system. You can also manipulate only the axis (like the capital letter commands in interactive manipulation) by selecting "transform axis only."

Most manipulations use the interactive controls, and the transformation requester is used only for accurate, measured changes.

One problem that you may run into after an interactive or a transformed manipulation is a "dirty" screen. Imagine erases the old object from before your move or scale or rotate, and draws it in the new position. However, to save time, it will not redraw any other wireframe object that was in view. This means that the areas were the old object intersected any other object in the view will be blank; part of the other object will be erased. If you want to check to see if this is the case, you can select "Redraw" from the Display menu, which will redraw all of the objects, eliminating the problem. One case where this is almost necessary is when you have multiple copies of an object at the same place. If you move one copy, the other isn't redrawn. Since it was in the exact same location as the old, erased, object, it looks like it has disappeared! This is easy to fix with redraw. It is another oft-used command, so knowing the keyboard equivalent of right-Amiga-r is handy.

A problem you'll run into when manipulating complex objects is the sheer time it takes to redraw the wireframe model (in three views). Imagine has a way to speed the display of these objects- it shows the bounding box of the object (like the one shown in interactive manipulation) instead of the wireframe. You LOOSE the detailed view of your object, but you can still see the position, size, and orientation. To make an object "quickdraw" in this mode, you can use three commands in the Functions menu. "Quickdraw all" will make all of the objects display in quickdraw mode. "Quickdraw none" will make all objects display the normal wireframe. "Quickdraw pick" will make your picked (blue or purple highlighted) object display in quickdraw mode. These quickdraw boxes are very handy, and since they can be toggled at any time in the Detail Editor, it makes sense to use them when screen updates start to get too slow.

                         -> Return to Alphabet <-

Back to Ian Smith's HomePage