TITLE: The incredible Ant-Machine-Ant
NAME: Helge Bahmann
COUNTRY: Germany
EMAIL: hcb@chaoticmind.net
WEBPAGE: http://www.chaoticmind.net/~hcb
TOPIC: Technology
COPYRIGHT: I SUBMIT TO THE STANDARD RAYTRACING COMPETITION COPYRIGHT.
MPGFILE: hcb_ant.mpg
ZIPFILE: hcb_ant.zip
RENDERER USED: 
    Povray 3.5 (Debian Sarge)

TOOLS USED: 
    Python, Gimp, Text editor, Berkeley MPEG encoder, brain

CREATION TIME: 
    5days modelling; 16hours final render (read below)

HARDWARE USED: 
    Dual Opteron 240 (model&render), 17x Dual PPC7455 (render only)

ANIMATION DESCRIPTION: 


Yet another "infinite recursion" animation -- ants drive a machine which
itself is an ant.

The two "gate" types shown in the animation allow to construct every possible
logic "gate". Besides ants there are unfortunately also a few bugs in the
animation which I could not fix because I ran out of time.


VIEWING RECOMMENDATIONS: 
    vlc (VideoLan Client) works fine

DESCRIPTION OF HOW THIS ANIMATION WAS CREATED: 


This is my first animation for IRTC and I made a lot of mistakes; the worst
mistake is that I completely underestimated the rendering time. Even with
the massive amount of computing resources I could throw at the problem, the
last image was not finished until about an hour before submission deadline,
and I am unable to fix the things that went wrong with the animation. The high
render time is caused by too many reflective objects, too many complicated
and badly bounded isosurfaces, and too many objects in the scene altogether.

Almost everything is modelled as CSG; the individual components (ants, tubes,
gates, gears) are defined as macros or objects in Povray include files. For the
first part of the animation a python script is used to generate a master Povray
file for every frame that uses the basic building blocks from the include
files. For the second part of the animation everything is done using only
Povray macros.

The only really noteworthy thing is the ant. The ant itself is created using
standard povray features (isosurface, sphere_sweep for the body parts; the
hairs were added using the trace macro). Every individual joint position was
then made controllable by a macro.

Teaching the ant to walk sucked badly; the complexity of positioning the legs
"by hand" drove me nuts and didn't produce satisfying results. Instead I
duplicated the calculation of the joint transformations in a small python
script and wrote a very simplistic inverse kinematic solver:

The joint orientations are represented as quaternions with the three imaginary
parts being the free variables; the script then calculates the direction the
target point would move if changing every free variable by just a small amount;
then use the linear least squares form the python Numeric package to calculate
 an update to the free variables. Repeat until target point is reached.

Unfortunately the solver was rarely, if ever, able to find an "improvement" to
the current joint position that brings the target point closer to its intended
target, I added a "randomizer" to perturb the current position a little in case
the solver stagnated. Calculating the joint rotations for every single leg for
a full ant movement cycle (12 frames) took close to an hour, but the result
looks good.

As far as I could research ants in nature move a bit differently than my little
ant -- "real" ants temporarily take off the ground completely if they are
running fast, while my ant always touches the ground with at least three legs
(it is doing more of a "spider walk"). I think the small inaccuracy is
permissible :)

The first 100 frames were post-processed to add the title, no other
post-processing was done. The title text was created in gimp, exported as PNG
with transparency. A small python script (using python-imlib) was then used to
superimpose the title text on the image. The fade out at the end of the clip
was created using a black povray fog (decreased fog distance as time passes).

Since I was almost running out of time at the end, I had to (ab)use the
University's Linux computer lab. A few scripts were used to start two Povray
instances on every computer. If I had to render the video on my own workstation
it would have taken an estimated 200 hours.