Getting used to the editor

Describes: addition, selection and transformation of objects; per spective view and Arcball usage.

Start Tornado3D or open a new project replacing the existing one with Project> New. You are now in the main Tornado3D's editor. With Objects> Polygonal> Pyramid add to the workspace a new object. This is a polygonal object, that is, one composed of vertices, lines and faces.

Press the key '3' or use Workspace> Preview> Flat Shaded to immediately show a color representation of the object.

The pyramid looks like a flat, white triangle, and this is due to the camera angle currently in use. Let's look at it from another point of view, but before let's move the mouse ­without clicking­ over the perspective view. Nothing should happen.

Now press the 'r' key on the keyboard or use the menu item Modify> Transform> Rotate or click on the Rotate gadget. This way rotation mode gets activated. Let's move again the mouse over the perspective area, as before. Now a yellow circle appears. This yellow circle is the reference mark of the "Arcball" rotational controller. It really is very simple to use and learn.

Now click with the left button in the perspective view, just outside of the circle and then drag, holding down the mouse button. You should try to keep the mouse pointer outside of the yellow circle, in practice rotating it around the object. The object will follow mouse movements and a brighter yellow line will provide a graphical representation of your actions.

Now release the mouse button. The object will stop moving. If you look at the other ­non perspective­ views, you'll notice that the pyramid has not been modified. What has changed is the point of view. Now let's repeat the operation, but this time clicking inside the yellow circle.

Clicking outside circle rotates around, clicking inside rotates vertically and horizontally

A line now appears, departing from the click point. This time the line freely follows the mouse movements and is not confined to the circle anymore. This allows to freely rotate the object. If you trace back your steps, moving the mouse up to the point in which the curved line originates, the object will return exactly to the position of departure. This fact, apparently not very important, is really an unique characteristic of the Arcball rotation controller that allows to rotate the objects in three dimensions using a device, the mouse, that is two-dimensional.

Other rotation systems manifest a behaviour, called Hysteresis, that makes impossible to trace back mouse movements and get also back the original object's alignment. This leads to an unnatural user interaction. With Arcball, everything is like in the real world. Moving the mouse to the left, rotates the object to the left. Moving it in circles around the object, rotates the object in circles. Performing the opposite moves returns the object to its original alignment.

In order to understand better the idea behind the Arcball, let's try to imagine that the yellow circle is the profile of a sphere -the sphere of a trackball- and that the mouse acts like your hand on the trackball. The curved line that appears when the click is inside the circle is curved because it depicts the movement of the hand on the surface of this virtual trackball.

Sometimes it may be desirable to exert more control over the way an object will move or rotate, so let's intro duce the concept of constraints. A constraint is a kind of command that tells Tornado3D something like "don't act on the X axis" or Y or Z or on a combination of those.

The constraints are always shown in the left gadgets column as the letters X, Y, and Z . Those letters are red if the actions on that axis are allowed and blue when they are not allowed. Arcball shows the constraints as colored lines and pressing the Control key or Control+Shift just before clicking on the surface of the virtual sphere, those lines can be used as visual aids. Control activates a constraint on the worlds axes, while Control+Shift activates the constraint on the camera's local axes. This is an ad vanced concept, so don't worry if it sounds too exotic right now. Try rotating with and without constraints to get an idea of how they react.

Now restore the perspective view to its original values with the menu item Workspace> Reset View and get ready to discover how to modify objects.

Click on the center of the object's axis, that is on the small square from which three lines depart marked with the X, Y and Z letters. The object will become white, to signal it is selected and ready to be acted upon. Notice how the pointer turns into a selection crosshair when it is over the object's axis center.

Unselected (black) and selected (white) axes

Press 'm' on the keyboard to return to movement mode (remember that you switched to rotate mode before to try out Arcball). Both the Modify> Transform> Move menu and the Move gadget will produce the same results.

Now click and drag with the left mouse button, but not over the object axis. As a general rule, the click must always happen on an empty spot to start an interactive operation.

The object will move along with your movements, following the mouse. If you release the mouse button, the object will remain where it was in that moment. It will be placed, deployed, in its new position. Now the modifica tion is permanent, but it can be undone with the Edit> Undo (Amiga-Z) command.

Now repeat the same actions but first press Shift-X to force the movement to happen only on the X axis. This activates another kind of constraint as the use of the shift key along with axis selection means "act only on this axis, disabling the other". Moving the object again, the modifica tion will only happen along the X axis.

Now it' time to resize the object with the scaling function. Press 's' to switch to Scaling mode or use the

Modify> Transform> Scale menu item or Scale gadget. The constraints are automatically reset. Do the same thing done before, clicking and dragging. This time the object will not move, but will be magnified or shrunk according to the mouse movements.

Now try to rotate the objects instead of the view point. So press 'r' again to go back to rotate mode, and proceed as usual, clicking in an empty spot of the non perspective-views. The object will rotate on the selected axis. Repeat the operation with other axes, for instance Z axis.

Notice how the object is not aligned with the world axes anymore. Before, the X,Y and Z lines projecting from its center were directed to the right, the top and forward, just like world axis always is. Now those lines point else where and this allows to introduce the concept of Local Axes.

Let's try therefore to move the object along its local axes. Press 'l' or activate Local gadget to enter Local mode. Pressing 'm' again return to movement mode and with Shift-X as before force the movement to occur only along the X axis. Click and drag to move the object.

World and Local alignment, in Local mode objects move along their axes

This results in a quite different behavior, now the object moves along its own X axis, that is along the straight dotted line that departs from his center and ends with the letter X. It does not anymore move "to the right", it moves "to its right". This allows, for instance, to simulate the dolly of a camera or the movement of an object along the direc tion it is facing, and this is a key concept.

It is really important to understand the subtle differ ences between World and Local axes. One is immediately obvious: thinking of the world axes as the real world, it's logical to say that "Up" is always upwards, that is, along the Y world axis. But if we travel in an airplane that loops, our "Up" direction may suddenly be different. In this case the airplane's local Y axis still defines the local "Up" direction.

A much less intuitive concept is that local Axes can also be of different sizes. This means that an object can be stretched, compressed, flattened without suffering any real modification: only its local reference axis is modified. Again, this is an advanced concept, and will become clear only later.