Using force fields

Describes: force fields purpose, creating reference keys, animating a deformation.

Newcomers to 3D graphics are often surprised by the fact that when two objects collide, they simply intersect. This happens because in the simplified virtual world used in 3D graphics there is no physical law that prevents two volumes to occupy the same space at once.

Force fields are a special kind of deformation tool, that modify the geometry of the objects they act upon, thus simulating a physical relationship between objects. Force fields operates mainly in animation mode.

Force fields simulate physical relationships

Add a tube with Objects> Polygonal> Tube, setting the number of Y Sec to 10 and the Y size to 200. This will add a tall tube that extends out of the view, so zoom out twice to see it in full. Press Tab to enter Animation Mode. Select the tube and go in Point Mode (Amiga-9) to create a reference key. This will pop up a requester asking if you really want to create the morph key. Answer Ok, then return to object mode with Amiga-8 and to Modeling Mode pressing Tab again.

At first glance, we have not modified anything, but now the tube has stored its shape twice inside Tornado3D. One copy is the one we'll deform with the Force field, the other is the original shape that will be used to go back to the undeformed shape. The reason why Tornado3D does not create such a reference shape automatically is that in some instances the user may need to accumulate the deformation frame after frame, for example to crush something against a wall.

Add a spherical shape with Objects> Polygonal> Superquadric and change its size to 50. in all axes. Hit spacebar to deselect all and use the Object Find panel (Amiga-F) to select the sphere, called Quadric. With the sphere selected, move it up in front view until it is placed on top of the tube.

The ball and the force field on top of the tube

Now with Amiga-I open the Info Panel for the Sphere and set the No forces checkmark. This tells Tornado3D not to apply force fields to this object. This makes sense, since the ball will appear to deform the tube.

Finally, add a Force Field with Objects> Force Fields> Repulsor. A Repulsor Force Field will deform outward from its center. Deselect all with spacebar, and use the Find Panel to select the Force Field. Move it where the ball is located. Now scale it by seven times, until it encompasses the whole ball. Save the project to disk before proceeding.

Press Tab to switch to Animation mode. Shift select the ball so that there are two selected objects: the ball and the Force Field. Change the Cycle gadget near the Time code from All to Sel and hit the red Rec button in the Vcr toolbar. This creates a keyframe for the ball and the force field. Without deselecting them, jump to frame 50 hitting 'f' to activate the timecode gadget and clearing its contents: typing an absolute frame number will convert it into a timecode.

Last animation frame, ball and force field move at once

Now move the ball and the Force Field at once, placing them just below the bottom of the tube, just like if they had traveled inside it. Now the animation is ready. Shift click on the Prev Keyframe gadget to go to frame 1 (or enter 1 in the timecode gadget) and press Play Forward to see a real-time preview of the ball entering the tube and deforming it just like if it was made of rubber.