Positionning objects and cameras with the "Mover" object


The tools provided by MojoWorld to position and orient objects are simple and easy to use, but don't enable any precise control.
The "Mover" plugin is intended to overcome this limitation and provide a far better control of objects and cameras positioning and orientation.

Creating a Mover

The mover is a preview object that takes complete control of any other object, camera Parameter Bombs or even position markers.
To create a Mover, select the "Mover" entry in the "Importing and Plugin's Menu" and add it anywhere on your scene. As the Mover has no size by itself, there is no need to drag the cursor when clicking on the scene.
   

Now, open the Mover editor by clicking on the flag icon at the left of RTR window.

   

Seen from a short distance, the Mover looks like this. The green arrow shows the "Front direction", the blue arrow  shows the "Up" direction and the red one points to the right. This tutorial will show you how to position and give a precise orientation to the "Front" and "Up" directions of the mover and its controlled object.



Of course, you should also have some object to control. For this tutorial, we will use a box primitive. Move it, Scale it and Rotate it arbitrarily.

   

Fine!  It's time to domesticate this wild primitive.  Select it as the Object sub plugin in the Mover editor.



The box is instanly transported at the Mover position and is aligned with the Mover axises. Notice that the scale factors have been reset.

Scale the object

Scaling the object at any precision. That's very easy. The first value changes the right direction, the second controls the front direction and the last one scales the Up direction.





Notice that the arrow ends give an idea of the applied scale factors.
You may also use the standard MW scaling tool to change the scaling factors.

Move the Pivot point

The Pivot point is use as the rotations center and as positioning reference point.





Orient the Front direction

It is easy to make the front direction point toward any object. Let say we will point it toward the moon. Select the "Lumpy Moon Sphere" as the "Points to" sub plugin.





The Mover reorient itself toward the moon, but not as expected. Due to some other constraint that is explained in the next section, the Z axis didn't change. Ignore this fact for the moment and assume everything is OK.
Now click on the "Opposite?" checkbox.



Now, the Mover points at the opposite direction of the moon.
You may also point a point that is not centered directly on the moon by  changing the "offset" values. Notice that the moon radius is one and is scaled at a very high value. Therefore, an offset of 1.0 on an axis means moving the target point by a full moon radius.

Orient the Up Direction

By default, the "Up" direction is set tobe oriented vertically at the opposite of the planet.
When no object is selected, the direction points to the World coordinates origin, which is in fact the center of the planet. This is also true for the "Points To" and "Position relaltive to" sub plugin selectors.



If you uncheck the "Opposite?" checkbox, the "Up" direction will point toward the planet.



Of course, you may also adjust the target direction with the offset parameter.
The "Is Primary Direction?" checkbox let choose witch of the "Front" or "Up" direction primes. By default, it is the "Up" direction that primes as the need for verticallity is something obvious for us biped creatures. If we uncheck it, the "Front" direction will prime. Uncheck also the "Opposite?" checkbox on the "Points to" group and the Mover now points toward the moon. That's great, isn't it?


Position the Object

By default, the Mover is positioned relative to the world coordinates origin (the center of the planet). You may select any other object as reference. The Mover stay in place when selecting a reference object. However, as this object moves, the Mover will follow it.

There are two checkboxes related to the position. The first one, "Long/Lat/Alt?" is used to select cartesian or polar coordinates. When the checkbox is unchecked, the "Offset" values are X,Y and Z  distance to the object in objects ccordinates. If the checkbox is checked, this distance is specified in Longitude, latitude and altitude in objects coordinates. When an object is specified, the altitude is the distance to the objects origin. When used with the planet, the altitude is the height above the planet surface or, if the "Use Sea Level?" checkbox is checked, above the sea level.

Camera Control

Cameras can be controlled as any other objects. The camera points always in the Mover's "Front" direction.

Animation

We will now make a short movie by moving a camera. The script says that the camera must be always pointed toward the black monolith while moving along a strait line.
First of all, create a new camera and put it under control of the Mover. Make it also point to the monolith. Then move it to an appropriate initial position.

   

The green cross in the center of the preview picture is the the "Front" direction arrow.
Now, write down the position 's "Offset" values. You will need them in a later step.
Then, Change this "Offset" parameter to a function...



... and build the following ProUI graph:

   
In the "Add" node, fill the "Add 1" parameter with the values you wrote down just before. This is to set the initial position.
The "Multiply" node role is to define the camera speed relative to the Black Monolith. In our case, it is 2km per second laterally.

Now, you are ready to record a movie and render it. Please refer to the MW manual for the details.

Bug reports and enhancements requests

This plugin is very new and therefore has not been extensively tested. When using this second release, be prepared to face some bugs. I released it in this early stage to let you discover the concept. I would be glad to receive all your comments and enhancement suggestions (Please use the 3DCommune forum and/or the Yahoo Group for this).

Download

Mover plugin for Mac
Mover plugin for Windows

Sample world

The Mover plugin is OpenSource. Therefore, its source files are freely downloadable here. I would greatly appreciate every improvement that will be made by participating developpers.