Thursday 7 February 2008

Tip: animation scripts

As I've just posted my first animations, I thought I'd share my methodology. But remember, this is my way: there are many others. Some have used this script, but I much prefer the control gained by hand-crafting. Basic format:

Path := 'c:\whatever';
SetRenderBounds;
Flame.SampleDensity := 200;
Flame.Width := 640;
Flame.Height := 480;
Flame.Oversample := 4;
Flame.FilterRadius := 1;
Flame.Name := ('base0000');
SaveFlame(Path + 'myname.flame');

(initialise variables)

(for/while loop, must contain:


SetActiveTransform(i);

(increment variables)

SetActiveTransform(i+n);

(increment variables)

"
"


Flame.Name := 'base' + Format('%.4d', [j]);
SaveFlame(Path + 'myname.flame');
where j increments
end loop)


SetFlameFile(Path + 'myname.flame') ;
for i := 0 to FileCount do
begin
LoadFlame(i);
Renderer.Filename :=Path + Flame.Name + '.jpg';
Flame.SampleDensity := 200;
Renderer.Width := 640;
Renderer.Height := 480;
Flame.Oversample := 4;
Flame.FilterRadius := 1;
SetRenderBounds;
Render;
end;
UpdateFlame := False;

where:

this font denotes example only - substitute with your own text/value
this font denotes general instructions

No comments: