Artwork > Finished Works and Works in Progress

Red and moving steam thing

(1/3) > >>

ENSONIQ5:
G'day all.

Although the comp is long finished, I have continued working on this thing.



There is still more work that could be done (when is that not the case?), like putting in a driver and perhaps adding a few more dynamic things, like a swinging tow chain on the front bumper or whatever, but I'm done with it for now (gotta get back to other projects).

Everything that rotates is controlled by a script, such as this one below which controls the rotation of the left front wheel:

float $speed;
float $speedbasic;
float $workingframe;
float $a;
float $b;
float $c;
float $d;
float $e;
float $timekey;
$timekey=time*24;
$a=$timekey;
$b=211-(((221-$timekey)*(221-$timekey))/40);
$c=211;
$d=211-((($timekey-279)*($timekey-279))/40);
$e=500-$timekey;
if (frame<201)
$workingframe=$a;
else if (frame<221)
$workingframe=$b;
else if (frame<280)
$workingframe=$c;
else if (frame<300)
$workingframe=$d;
else
$workingframe=$e;
$speedbasic=0.0581776;
$speed=$speedbasic/1.72308;
$orientation = (sin($speed*$workingframe),0,0,cos($speed*$workingframe));

The script rotates the wheel first in a forward direction at a constant speed, decelerates to zero, rests for a bit, accelerates in reverse, and finally reverses at a contant speed.  This script would have been WAY simpler if it were possible to define variables that could be remembered from frame to frame.  At present it is necessary to calculate the position of each rotating object at each frame relative to the object's initial orientation, rather than relative to the objects position in the preceding frame.

The smoke is also scripted, separate scripts controlling each smoke-puff's rotation, location and scale in a cyclic fashion.  The pistons and various valve linkages are keyframed, though scripts would not have been impossible to figure out.

The mechanisms were assembled in Scene mode, rather than defining the whole machine as a figure, using parent/child object relationships to ensure mechanical integrity.  Rendering was done with ART, total rendering time estimated to be over 150 hours.

$imon:
Wow that is awesome work ensoniq! The best mechanical animation ive seen in anim8or.

I dont know anything about making scripts, but it seems like youve very cleverly made use of them in your animation, great work!

I envy your anim8or skills!

ENSONIQ5:
Cheers $imon.  Motion scripts are basically just mathematical ways of defining a Scene element's attributes, as opposed to modelling scripts (which seem to be far more popular in the Scripts link on this site).  Scripts are by far the easiest way to define rigidly repetitive motion, such as rotations or even walk cycles, the only real alternative being tedious keyframing.

The script below defines the position (only the position) of one of the smoke puffs:

float $loft;
float $pseudotime;
if (time<0.5)
$pseudotime=time+1.5;
else if (time<2.5)
$pseudotime=time-0.5;
else if (time<4.5)
$pseudotime=time-2.5;
else if (time<6.5)
$pseudotime=time-4.5;
else if (time<8.5)
$pseudotime=time-6.5;
else if (time<10.5)
$pseudotime=time-8.5;
else if (time<12.5)
$pseudotime=time-10.5;
else if (time<14.5)
$pseudotime=time-12.5;
else if (time<16.5)
$pseudotime=time-14.5;
else if (time<18.5)
$pseudotime=time-16.5;
else
$pseudotime=time-18.5;
$loft=$pseudotime*30;
$position = (($loft*-1)/3, $loft+70, -5);

It's a bit clunky, and could be shortened with better mathematics, but it works ok and is the result of considerable experimentation.  Essentially it steadily raises the element vertically, while moving sideways one third of the rate of lift, and drops it back to the starting point to run the cycle again every two seconds.  A very similar script is applied to the Scale attribute, and a basic rotation script is applied to the Orientation attribute.

The problem with the script above is that it would need to be substantially altered if the animation length was increased, which is not very neat, programmatically.  Unfortunately it is not possible to define running variables, the values of which are remembered from frame to frame.  If this was possible the script above could be shortened to perhaps nine or ten lines, and would be able to accomodate any length of animation without alteration.  Fingers crossed that future versions might allow running variables!

headwax:
heh, very impressive Tony. I'm amazed by your skillls! Time, as you say, for a driver!

captaindrewi:
From the outside, scripts look very complicated but wow what a pay off if you are prepared to go the distance.
Once again marvelous work and thanks for sharing.

Navigation

[0] Message Index

[#] Next page

Go to full version