realtlacitka.png (1143 bytes) Real3D Amiga Environment Real3D Amiga Tutorials Real3D Amiga Projects Real3D Amiga Macros Real3D Amiga Other Back to Real3D Amiga home page

6.13.3 Three Dimensional Time

Multi-dimensional time ... sounds terrible, but it is true. It is possible to fork one dimensional time to three dimensional time. This example demonstrates how to do it and how to use this possibility.

In order to understand three dimensional time, we have to understand how the animation system of REAL 3D works.

Curves, such as B-Splines and circles, can be defined using so called parametric representation: each point on the curve is represented by a parameter value between 0 and 1. The value 0 corresponds the start point of the curve, and the value of 1 corresponds the end point of the curve. In other words, when the parameter value runs from zero up to one, the corresponding point moves from the beginning of the curve to the end point.

When an animation is played, the time runs from 0 to 1. Methods use this time for evaluating points on their parameter(s). If a new time value is given, the method knows that it should do something to make the target objects match the new situation. For example, the PATH method knows that it should move its target objects as much as the evaluated point has moved from the previous frame.

As long as the parameter object can be fully parametrized by using only one value, we need only one dimensional time. But, there are lot of objects which cannot be represented by one parameter. For example, a B-Spline mesh is such an object.

To clarify this further, we compare a B-Spline curve and a B-Spline mesh and illustrate how the parametrization works for them.

A B-Spline curve can be parametrized using only one value. We could use the term "length" for that value. The reason why only one dimensional parameter value is enough is that any position on the curve can simply be specified by mentioning the distance from the beginning point of the curve to the point along the curve.

This is not possible with a B-Spline mesh. Instead, we need two values for describing all possible points on the surface. These values could be called as "width" and "height". For example, if the value pair 0,0 corresponds the top left edge of the surface, then the value pair 1,1 corresponds the bottom right corner of it. 0.5,0.5 corresponds the middle point of the surface etc.

The time can be forked to three dimensions using a coordsys primitive as a parameter for the TRANSFORM object instead of an axis. A Coordsys includes 3 axes to project the evaluated point to, instead of one.

It is possible to move objects along a B-Spline mesh by defining the motion using dimensional time and the mesh as a method parameter. Let's stop the theoretic discussion now and demonstrate this in practice.

1. Create a TRANSFORM method.

2. Create a coordsys primitive under it.

3. Create a B-Spline curve under the method so that it begins from the origin of the coordsys and wriggles between X and Y axes of the coordsys, as shown in the picture below.

4. Create a level object, at the same level with the transformation object, and make the level the current level.

5. Create a small sphere.

6. Create a PATH method, animating the sphere.

7. Create a B-Spline mesh under the PATH method level.

realtut6.13.3_1.png (6345 bytes)
YouTube Figure T6-43: Sphere Moves along a B-Spline Mesh.

When you play the animation, by following the sphere you can see how the time transformation works: the current position of the sphere shows the current point evaluated from the transformation curve. The point is projected to the vertical time transformation axis - you can "read" the projection value by checking where the horizontal line hits the axis. The distance from the crossing point to the beginning of the time axis in proportion to the whole time axis length defines the new local time for the objects affected by the TRANSFORM method. When the B-Spline curve turns downwards, the crossing points move downwards, too; this means the time starts to run backwards.

ghh don'tpanic