{ pbAnimate script for Apophysis (c)2005-2006 by Piotr Borys piotr (dot) borys (at) gmail (dot) com Feel free to use it for your own. If you will make some modifications, or some very cool stuff with it, don't hesitate dropping me a note :) } { This tool creates an animation of a flame using Scott Draves' flam3-animate fantastic app. } { First, create a directory for output. Keep in mind, that this tool will create a whole bunch of individual frames of your animation, so it will be better to keep them organized in a separate directory. Then, remember where your flam3 tools are, you will need two of them: flam3-genome and flam3-animate While configuring this tool you will be asked for a directory where those tools exist. After executing this script, you'll have a batch file named flame_name-animate.bat in a main Apophysis directory, and a flame_name.flame file in the output directory, chosen at the execution time. Just fire up the .bat file and it will start rendering your animation :) Enjoy! } // // Script parameters // w := 752; h := 564; q := 400; f := 0.4; o := 2; t := 'jpg'; n := 100; p := 'flam3'; s := 'anims'; batches := 1; if not InputQuery('Parameter Input', 'Render Width:', w) then exit; if not InputQuery('Parameter Input', 'Render Height:', h) then exit; if not InputQuery('Parameter Input', 'Render Quality:', q) then exit; if not InputQuery('Parameter Input', 'Filter Radius:', f) then exit; if not InputQuery('Parameter Input', 'Oversample:', o) then exit; if not InputQuery('Parameter Input', 'Filetype (jpg/png/ppm):', t) then exit; if not InputQuery('Parameter Input', 'Number of frames per animation stage:', n) then exit; if not InputQuery('Parameter Input', 'Flam3 software path:', p) then exit; if not InputQuery('Parameter Input', 'Output path:', s) then exit; flam3path := Trim(p); outputpath := Trim(s); // // Exporting a flame file // FileList := TStringList.Create; FileList.Add(''); with flame do begin Width := w; Height := h; SampleDensity := q; Oversample := o; FilterRadius := f; CalculateScale; FileList.Add(''); end; //ShowMessage('Mam ' + IntToStr(Transforms) + ' transformsów.'); for i := 0 to Transforms-1 do begin //ShowMessage('Transform no. ' + IntToStr(i)); SetActiveTransform(i); with Transform do begin FileList.Add(' '); end; end; //ShowMessage(FileList.Text); for i := 0 to 255 do begin FileList.Add(' "'); end; //ShowMessage(FileList.Text); FileList.Add(''); FileList.Add(''); //ShowMessage(FileList.Text); FileList.SaveToFile(INSTALLPATH + outputpath + '\' + Flame.Name + '.flame'); // // Creating a batch file controlling flam3-animate program // FileList.Clear; FileList.Add('set verbose=1'); FileList.Add('set nframes=' + IntToStr(n)); FileList.Add('set format=' + t); FileList.Add('set bits=64'); FileList.Add('set prefix=' + outputpath + '\' + Flame.Name + '_animframe_'); FileList.Add('set sequence=' + outputpath + '\' + Flame.Name + '.flame'); FileList.Add('"' + flam3path + '\flam3-genome" > "' + outputpath + '\sequence_' + Flame.Name + '.flame"'); FileList.Add('"' + flam3path + '\flam3-animate" < "' + outputpath + '\sequence_' + Flame.Name + '.flame"'); FileList.Add('del /f /q "' + outputpath + '\sequence_' + Flame.Name + '.flame"'); //ShowMessage(FileList.Text); FileList.SaveToFile(INSTALLPATH + Flame.Name + '-animate.bat'); FileList.Free; UpdateFlame := False; ShowMessage('Now you can execute a batch file named ''' + INSTALLPATH + Flame.Name + '-animate.bat'', which will create your animation. Enjoy!');