Apophysis 2.0: Free Fully Commented Scripts

Please note that these scripts all assume that you have a folder on your C drive called ‘renders’. If you do not, either change this directory in the scripts, or create a directory by this name in that location.

Full listing of available scripts:

  1. Modified Batch Render (ModBatchRen.asc) – 3 KB
  2. Preview Sweep - using ‘for’ – 1 KB
  3. Preview Sweep - using ‘repeat’ – 1 KB
  4. Render Single Flame (RenSingle.asc) – 2 KB

 


Modified Batch Render (download name: ModBatchRen.asc)

{Modified Batch Render – Apophysis 2.0}
{Renders selected flames in the
 current parameter file to disk.
 Set the render settings to taste}
{http://jamesrskemp.net/}
p := 1; {sets primary number to 1}
f := FileCount; {sets final number to the file count}
Renderer.Width := 1280; {sets render width – change to taste}
Renderer.Height := 960; {sets render height – change to taste}
InputQuery('First Flame to render', 'Actual Position:', p);
 {Prompts for the first flame to render – defaults to the very
  first flame, set by p above}
InputQuery('Last Flame to render', 'Actual Position (default is last):', f);
 {Prompts for last flame to render – defaults to the very last
  flame, set by f above}
Print('Input done'); {Prints to the editor window that values have been entered}
p := p - 1; {Since the first flame is really 0, not 1, you have to subtract one from the initial value}
f := f - 1; {You also have to subtract one from the final value}
Print('First actual: ');
Print(p); {Outputs the actual position number for the first flame}
Print(' and last actual: ');
Print(f); {Outputs the actual position number for the last flame}
for i := p to f do { from the first to the last flame...}
begin {begin the following until the ‘end’}
  LoadFlame(i); {load flame}
  n := i+1 {add one to current flame position value}
  Print('Loaded flame in position #');
  Print(n); {Output this value so that the user knows what flame is rendering}
  Flame.SampleDensity := 100; {best 200 - flame sample density – change to taste}
  Flame.Oversample := 1; {best 2 - flame oversample – change to taste}
  Flame.FilterRadius := 0.2; {best 0.4 - flame filter radius – change to taste}
  Renderer.Filename :='C:\renders\' + Flame.Name + '.jpg'; {render flame to this directory, in jpg format – change to taste}
  SetRenderBounds; {sets render bounds}
  Render; {renders the flame}
  Print('Rendered flame #');
  Print(n); {output that the flame has been rendered}
end; {end the for loop – if the ‘for’ is not done, go back to ‘begin’ and continue – automatically adds one to the ‘i’ value}
UpdateFlame := False; {don’t update the flame in the Apophysis window}

Sample output for entered values of ‘1’ & ‘1’

Input done
First actual:
0
 and last actual:
0
Loaded flame in position #
1
Rendered flame #
1

Please note that you must have the script editor open in order to see the outputs.  However, you can open the editor at any time (Ctrl + D) to check the progress of the script.


Preview Sweep – using ‘for’ (download name: PreviewSweep1.asc)

{Preview Sweep - Apophysis 2.0}
{Preview Flames, with information regarding the number down}
{http://jamesrskemp.net/}
UpdateFlame := false; {don't update the main display}
b := 0; {starting value – change if you’d like}
e := FileCount - 1; {ending value - 'FileCount - 1' (no quotes) for all - run as is to text SampleDensity – change after determining best sample density}
for i := b to e do {from b to e, do the following}
begin {begin 'for' loop}
if Stopped then Break; {if the Stop button is pushed, stop the preview}
LoadFlame(i); {load flame}
Flame.SampleDensity := 30; {change this value to allow the image to have time to preview on your computer}
{increase on faster machines, decrease on slower ones}
if (Transforms > 1) then
Preview;
else
Print('Bad flame'); {since only flames with more than one transform can be rendered, this checks for that}
print(i); {Print flame number from top - prints after showing the flame}
end; {end 'for' loop - go back to the 'begin' if the 'for' is not done}

See also Preview Sweep – using ‘repeat’ for an alternative method.


Preview Sweep – using ‘repeat’ (download name: PreviewSweep2.asc)

{Preview Sweep - Apophysis 2.0}
{Preview Flames, with information regarding the number down}
{http://jamesrskemp.net/}
UpdateFlame := false; {don't update the main display}
b := 0; {starting value – change if you’d like}
e := FileCount - 1; {ending value - 'FileCount - 1' (no quotes) for all - run as is to test SampleDensity – change after setting sample density to taste}
repeat {repeat the following until the below conditions are met}
LoadFlame(b); {load flame}
Flame.SampleDensity := 30; {change this value to allow the image to have time to preview on your computer}
{increase on faster machines, decrease on slower ones}
if (Transforms > 1) then
Preview;
else
Print('Bad flame'); {since only flames with more than one transform can be rendered, this checks for that}
Print(b); {Print flame number from top - prints after showing the flame}
b := b + 1; {increase flame value by one}
until (b >= e) or Stopped; {continue until the end value is reached}

See also Preview Sweep – using ‘for’ for an alternative method.


Render Single Flame (download name: RenSingle.asc)

{Render Single Flame - Apophysis 2.0}
{Renders single flame in the current parameter file to disk.}
{http://jamesrskemp.net/}
InputQuery('Input flame to render','Flame number to render (actual position):',f) {Prompt for flame to render where first flame = 1}
i := f-1; {Set value for flame to render, first = 0, last = total flames - 1}
Renderer.Width := 1280; {Set render width – change value to taste}
Renderer.Height := 960; {Set render height – change value to taste}
LoadFlame(i); {Load flame}
Flame.SampleDensity := 200; {best 200 - flame sample density – change to taste}
Flame.Oversample := 2; {best 2 - flame oversample – change to taste}
Flame.FilterRadius := 0.4; {best 0.4 - flame filter radius – change to taste}
SaveFlame('C:\renders\' + 'singlerenders.flame'); {save the flame parameters to this file – change to taste}
Renderer.Filename :='C:\renders\' + Flame.Name + '.jpg'; {render flame to this directory, with ‘jpg’ extension – change to taste}
SetRenderBounds;
Render; {set render bounds and render the image}
UpdateFlame := False; {don’t update the flame when done}


Created: February 13th 2004

Modified: March 9th 2004; March 12th 2004; September 13th 2004; November 25th 2004; December 16th 2004

Notes: Some of these scripts were originally developed during the beta stages of Apophysis 2.0, but they have all been run successfully on the final release and on 2.02 (the version current as of this update).