let’s make a basic tutorial on scripting in apophysis 7x...

36
Let’s make a basic tutorial on scripting in Apophysis 7x V15C To start you need a nice base flame to script… So I took one from my SC gnarl script. Have a look to run the original script we need some plugins. Do go download the script it comes with all the plugins you need to install. (Just paste them in your Apo plugin folder.) Or if you feel brave just take your own flame and apply the principles I share here. Just copy and paste it in Apo. <flame name="SC Gnarl-120612-167" version="Apophysis 7x Version 15" size="512 512" center="- 0.403268521044636 -1.21207792995833" scale="51.2" angle="1.06569804126774" rotate="- 61.0600000000001" oversample="1" filter="0.5" quality="50" background="0 0 0" brightness="20.1913043478261" gamma="2" gamma_threshold="0.0873761190965019" estimator_radius="9" estimator_minimum="0" estimator_curve="0.4" enable_de="0" plugins="" > <xform weight="0.05" color="0.091" symmetry="0.44" linear="0.626972600445151" radial_blur="1" coefs="0.07114 -0.03229 0.03229 0.07114 0.484187 1.139548" radial_blur_angle="1" chaos="1 2 " opacity="1" /> <xform weight="10" color="0.909" symmetry="0.9" cross2="0.0131143286046572" waves2="1.00666418301174" coefs="-0.488527 0.856468 -0.867305 -0.498127 0.99734195637881 0.70834849318664" post="0.505074 -0.863076 0.863076 0.505074 0 0" waves2_freqx="4.49286" waves2_scalex="-0.0435942" waves2_freqy="2.40787" waves2_scaley="-0.01904" chaos="2 4 " opacity="1" /> <xform weight="0.5" color="0" flux="1.11844282170059" coefs="0 0.5 -0.5 0 0.213786 0.921655" flux_spread="0.900485" opacity="1" /> <xform weight="0.5" color="0" flux="1.14475191698875" coefs="0.5 0 0 0.5 -0.432323 -0.855144" post="-1 0 0 -1 0 0" flux_spread="-0.747906" opacity="1" /> <finalxform color="0" symmetry="1" linear3D="1" coefs="-0.798635510047293 - 0.601815023152048 0.601815023152048 -0.798635510047293 0 0" /> <palette count="256" format="RGB"> FC4305F84805F54D05F15205EE5705EA5C05E76105E36605 E06B05DC7005D97506D57A06D27F06CE8406CB8906C78E06

Upload: others

Post on 31-Aug-2019

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

Let’s make a basic tutorial on scripting in Apophysis 7x V15C

To start you need a nice base flame to script…

So I took one from my SC gnarl script.

Have a look to run the original script we need some plugins.

Do go download the script it comes with all the plugins you need to install.

(Just paste them in your Apo plugin folder.)

Or if you feel brave just take your own flame and apply the principles I share here.

Just copy and paste it in Apo.

<flame name="SC Gnarl-120612-167" version="Apophysis 7x Version 15" size="512 512" center="-

0.403268521044636 -1.21207792995833" scale="51.2" angle="1.06569804126774" rotate="-

61.0600000000001" oversample="1" filter="0.5" quality="50" background="0 0 0"

brightness="20.1913043478261" gamma="2" gamma_threshold="0.0873761190965019"

estimator_radius="9" estimator_minimum="0" estimator_curve="0.4" enable_de="0" plugins="" >

<xform weight="0.05" color="0.091" symmetry="0.44" linear="0.626972600445151"

radial_blur="1" coefs="0.07114 -0.03229 0.03229 0.07114 0.484187 1.139548"

radial_blur_angle="1" chaos="1 2 " opacity="1" />

<xform weight="10" color="0.909" symmetry="0.9" cross2="0.0131143286046572"

waves2="1.00666418301174" coefs="-0.488527 0.856468 -0.867305 -0.498127 0.99734195637881

0.70834849318664" post="0.505074 -0.863076 0.863076 0.505074 0 0" waves2_freqx="4.49286"

waves2_scalex="-0.0435942" waves2_freqy="2.40787" waves2_scaley="-0.01904" chaos="2 4 "

opacity="1" />

<xform weight="0.5" color="0" flux="1.11844282170059" coefs="0 0.5 -0.5 0 0.213786 0.921655"

flux_spread="0.900485" opacity="1" />

<xform weight="0.5" color="0" flux="1.14475191698875" coefs="0.5 0 0 0.5 -0.432323 -0.855144"

post="-1 0 0 -1 0 0" flux_spread="-0.747906" opacity="1" />

<finalxform color="0" symmetry="1" linear3D="1" coefs="-0.798635510047293 -

0.601815023152048 0.601815023152048 -0.798635510047293 0 0" />

<palette count="256" format="RGB">

FC4305F84805F54D05F15205EE5705EA5C05E76105E36605

E06B05DC7005D97506D57A06D27F06CE8406CB8906C78E06

Page 2: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

C49306C09806BD9D06B9A206B5A706B2AC06AEB106ABB606

A7BB06A4C006A0C5069DCA0699CF0796D40792D9078FDE07

8BE30788E80784ED0781F2077DF70780F10B83EB1086E514

89DE188CD81D8FD22192CC2695C62A98C02E9BBA339EB337

A1AD3BA4A740A7A144AA9B48AD954DB08F51B38956B5825A

B87C5EBB7663BE7067C16A6BC46470C75E74CA5778CD517D

D04B81D34585D63F8AD9398EDC3393DF2C97E2269BE520A0

E81AA4E61BA0E31C9CE11D98DE1E95DC1F91DA208DD72189

D52285D22281D0237ECD247ACB2576C92672C6276EC4286A

C12967BF2A63BD2B5FBA2C5BB82D57B52E53B32F50B0304C

AE3148AC3244A93340A7333CA43439A23535A036319D372D

9B3829983925963A22933B1E913C1A94401A96451B99491B

9C4D1C9E511CA1561DA35A1DA65E1DA9621EAB671EAE6B1F

B16F1FB3741FB67820B97C20BB8021BE8521C08922C38D22

C69222C89623CB9A23CE9E24D0A324D3A724D6AB25D8AF25

DBB426DEB826E0BC26E3C127E5C527E8C928EBCD28EDD229

F0D629EBD72AE5D82BE0D92CDAD92DD5DA2ECFDB30CADC31

C4DD32BFDE33BADF34B4DF35AFE036A9E137A4E2389EE339

99E43A93E53B8EE63D89E63E83E73F7EE84078E94173EA42

6DEB4368EC4462EC455DED4658EE4752EF484DF04A47F14B

42F24C3CF24D37F34E31F44F2CF5502BF0532AEB5628E65A

27E15D26DD6025D86323D36722CE6A21C96D20C4701FBF73

1DBA771CB57A1BB17D1AAC8018A78417A287169D8A15988D

149390128E9411899710859A0F809D0D7BA10C76A40B71A7

0A6CAA0967AD0762B1065DB40559B70454BA024FBE014AC1

0045C40048C4004BC4014EC40152C40155C40158C5025BC5

025EC50261C50264C50268C5036BC5036EC50371C50374C5

Page 3: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

0477C5047AC5047DC60481C60484C60587C6058AC6058DC6

0590C60693C60697C6069AC6069DC606A0C607A3C707A6C7

07A9C707ADC708B0C708B3C708B6C712B7C11BB9BA25BAB4

</palette>

</flame>

Got it sweet… now for step 2

Click on script and then click on generate script from flame.

Got it?

Great the script editor with the script in there has opened for us to play with.

Here is where the fun starts……

Step 3

The script looks like this

………………………………………………………………………………………………………………………………

{ Flame }

Clear;

if (pos('7x', LowerCase(ProgramVersionString)) >= 0) then

AngleTransform := 180 / PI else AngleTransform := 1;

with Flame do begin

Width := 512;

Height := 512;

Brightness := 20.1913043478261;

Gamma := 2;

GammaTreshold := 0.00432741330581297;

Scale := 10;

Page 4: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

Angle := 1.06569804126774;

X := -0.403268521044636;

Y := -1.21207792995833;

Background[0] := 0;

Background[1] := 0;

Background[2] := 0;

end;

{ Transform 1 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 0.05;

Color := 0.091;

Symmetry := 0.44;

a := 0.07114;

b := 0.03229;

c := -0.03229;

d := 0.07114;

e := 0.484187;

f := 1.139548;

Opacity := 1

linear := 0.626972600445151

flatten := 1

radial_blur := 1

radial_blur_angle := 1

end;

Page 5: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

{ Transform 2 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 10;

Color := 0.909;

Symmetry := 0.9;

a := -0.488527;

b := -0.867305;

c := 0.856468;

d := -0.498127;

e := 0.99734195637881;

f := 0.70834849318664;

post[0,0] := 0.505074;

post[0,1] := (-1) * -0.863076;

post[1,0] := (-1) * 0.863076;

post[1,1] := 0.505074;

post[2,0] := 0;

post[2,1] := (-1) * 0;

Opacity := 1

flatten := 1

cross := 0.0131143286046572

waves2 := 1.00666418301174

cross2 := 0.0131143286046572

waves2_freqx := 4.49286

waves2_freqy := 2.40787

Page 6: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

waves2_freqz := 0

waves2_scalex := -0.0435942

waves2_scaley := -0.01904

waves2_scalez := 0

end;

{ Transform 3 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 0.5;

Color := 0;

a := 0;

b := -0.5;

c := 0.5;

d := 0;

e := 0.213786;

f := 0.921655;

Opacity := 1

flatten := 1

flux := 1.11844282170059

flux_spread := 0.900485

end;

{ Transform 4 }

AddTransform;

with Transform do begin

Page 7: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

for i := 0 to NVARS do Variation[i] := 0;

Weight := 0.5;

Color := 0;

a := 0.5;

b := 0;

c := 0;

d := 0.5;

e := -0.432323;

f := -0.855144;

post[0,0] := -1;

post[0,1] := (-1) * 0;

post[1,0] := (-1) * 0;

post[1,1] := -1;

post[2,0] := 0;

post[2,1] := (-1) * 0;

Opacity := 1

flatten := 1

flux := 1.14475191698875

flux_spread := -0.747906

end;

{ Final Transform }

Flame.FinalXformEnabled := True;

SetActiveTransform(transforms);

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Color := 0;

Page 8: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

a := -0.798635510047293;

b := 0.601815023152048;

c := -0.601815023152048;

d := -0.798635510047293;

e := 0;

f := 0;

linear := 1

end;

{ Weight modifiers for transform 1 }

SetActiveTransform(0);

with Transform do begin

chaos[0] := 1

chaos[1] := 2

end;

{ Weight modifiers for transform 2 }

SetActiveTransform(1);

with Transform do begin

chaos[0] := 2

chaos[1] := 4

end;

………………………………………………………………………………………………………………………………………………………….

Click the run button in the script editor.

Nothing happened ?

Page 9: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

Not true everything happened to recreate the flame in the script.

An Exact copy of the base flame was generated.

You have just generated your own flame script.

Step 4.

Now let’s tweak the script

Copy and paste the rotation script on line 71( just after the end: on transform 2)

Rotate(randomRange(90,120))

Then run the script again .

Wow now we have some variations in the look of the flame .

You are now randomly rotating transform2 between 90 and 120 degrees.

Save the script cause there is no undo in the script editor.

I save after every change I make.

So if things go wrong and funny and they do I have something to fall back on.

Ok take note this little script.

Rotate(randomRange(90,120))

The values can be changed here it is set on a rotation value of between 90 and 120

Could be Rotate(randomRange(0,360)) for a full revolution or anything in-between.

Have fun change the values there( different ranges work on different flames.)

The script should look like this now.

…………………………………………………………………………………………………………………….

Page 10: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

{ Flame }

Clear;

if (pos('7x', LowerCase(ProgramVersionString)) >= 0) then

AngleTransform := 180 / PI else AngleTransform := 1;

with Flame do begin

Width := 512;

Height := 512;

Brightness := 20.1913043478261;

Gamma := 2;

GammaTreshold := 0.00432741330581297;

Scale := 10;

Angle := 1.06569804126774;

X := -0.403268521044636;

Y := -1.21207792995833;

Background[0] := 0;

Background[1] := 0;

Background[2] := 0;

end;

{ Transform 1 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 0.05;

Color := 0.091;

Symmetry := 0.44;

a := 0.07114;

b := 0.03229;

c := -0.03229;

Page 11: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

d := 0.07114;

e := 0.484187;

f := 1.139548;

Opacity := 1

linear := 0.626972600445151

flatten := 1

radial_blur := 1

radial_blur_angle := 1

end;

{ Transform 2 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 10;

Color := 0.909;

Symmetry := 0.9;

a := -0.488527;

b := -0.867305;

c := 0.856468;

d := -0.498127;

e := 0.99734195637881;

f := 0.70834849318664;

post[0,0] := 0.505074;

post[0,1] := (-1) * -0.863076;

post[1,0] := (-1) * 0.863076;

post[1,1] := 0.505074;

post[2,0] := 0;

post[2,1] := (-1) * 0;

Page 12: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

Opacity := 1

flatten := 1

cross := 0.0131143286046572

waves2 := 1.00666418301174

cross2 := 0.0131143286046572

waves2_freqx := 4.49286

waves2_freqy := 2.40787

waves2_freqz := 0

waves2_scalex := -0.0435942

waves2_scaley := -0.01904

waves2_scalez := 0

end;

Rotate(randomRange(90,120))

{ Transform 3 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 0.5;

Color := 0;

a := 0;

b := -0.5;

c := 0.5;

d := 0;

e := 0.213786;

f := 0.921655;

Opacity := 1

flatten := 1

flux := 1.11844282170059

flux_spread := 0.900485

Page 13: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

end;

{ Transform 4 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 0.5;

Color := 0;

a := 0.5;

b := 0;

c := 0;

d := 0.5;

e := -0.432323;

f := -0.855144;

post[0,0] := -1;

post[0,1] := (-1) * 0;

post[1,0] := (-1) * 0;

post[1,1] := -1;

post[2,0] := 0;

post[2,1] := (-1) * 0;

Opacity := 1

flatten := 1

flux := 1.14475191698875

flux_spread := -0.747906

end;

{ Final Transform }

Flame.FinalXformEnabled := True;

SetActiveTransform(transforms);

Page 14: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Color := 0;

a := -0.798635510047293;

b := 0.601815023152048;

c := -0.601815023152048;

d := -0.798635510047293;

e := 0;

f := 0;

linear := 1

end;

{ Weight modifiers for transform 1 }

SetActiveTransform(0);

with Transform do begin

chaos[0] := 1

chaos[1] := 2

end;

{ Weight modifiers for transform 2 }

SetActiveTransform(1);

with Transform do begin

chaos[0] := 2

chaos[1] := 4

end;

……………………………………………………………………………………………………………………………….

Ok we have done a random rotation on transform2

Page 15: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

(the one with the most weight/therefore influence)

Any other quick tricks for the day?

Let’s do another thing to it called translate .

the script goes like this ………

translate(-1 + random*2,-1 + random*2)

so this time it’s going to move the transform randomly between -1 and +1, up and down and left and

right.

Copy and paste it in the script editor just below the last piece of script we pasted.

(Press enter to make space to paste)

Before the next transform (transform3)

The script will now generate even more random flames.

The script should look like this now.

…………………………………………………………………………………………………………..

{ Flame }

Clear;

if (pos('7x', LowerCase(ProgramVersionString)) >= 0) then

AngleTransform := 180 / PI else AngleTransform := 1;

with Flame do begin

Width := 512;

Height := 512;

Brightness := 20.1913043478261;

Gamma := 2;

GammaTreshold := 0.00432741330581297;

Page 16: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

Scale := 10;

Angle := 1.06569804126774;

X := -0.403268521044636;

Y := -1.21207792995833;

Background[0] := 0;

Background[1] := 0;

Background[2] := 0;

end;

{ Transform 1 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 0.05;

Color := 0.091;

Symmetry := 0.44;

a := 0.07114;

b := 0.03229;

c := -0.03229;

d := 0.07114;

e := 0.484187;

f := 1.139548;

Opacity := 1

linear := 0.626972600445151

flatten := 1

radial_blur := 1

radial_blur_angle := 1

Page 17: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

end;

{ Transform 2 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 10;

Color := 0.909;

Symmetry := 0.9;

a := -0.488527;

b := -0.867305;

c := 0.856468;

d := -0.498127;

e := 0.99734195637881;

f := 0.70834849318664;

post[0,0] := 0.505074;

post[0,1] := (-1) * -0.863076;

post[1,0] := (-1) * 0.863076;

post[1,1] := 0.505074;

post[2,0] := 0;

post[2,1] := (-1) * 0;

Opacity := 1

flatten := 1

cross := 0.0131143286046572

waves2 := 1.00666418301174

cross2 := 0.0131143286046572

waves2_freqx := 4.49286

Page 18: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

waves2_freqy := 2.40787

waves2_freqz := 0

waves2_scalex := -0.0435942

waves2_scaley := -0.01904

waves2_scalez := 0

end;

Rotate(randomRange(0,360))

translate(-1 + random*2,-1 + random*2)

{ Transform 3 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 0.5;

Color := 0;

a := 0;

b := -0.5;

c := 0.5;

d := 0;

e := 0.213786;

f := 0.921655;

Opacity := 1

flatten := 1

flux := 1.11844282170059

flux_spread := 0.900485

end;

Page 19: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

{ Transform 4 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 0.5;

Color := 0;

a := 0.5;

b := 0;

c := 0;

d := 0.5;

e := -0.432323;

f := -0.855144;

post[0,0] := -1;

post[0,1] := (-1) * 0;

post[1,0] := (-1) * 0;

post[1,1] := -1;

post[2,0] := 0;

post[2,1] := (-1) * 0;

Opacity := 1

flatten := 1

flux := 1.14475191698875

flux_spread := -0.747906

end;

{ Final Transform }

Flame.FinalXformEnabled := True;

Page 20: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

SetActiveTransform(transforms);

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Color := 0;

a := -0.798635510047293;

b := 0.601815023152048;

c := -0.601815023152048;

d := -0.798635510047293;

e := 0;

f := 0;

linear := 1

end;

{ Weight modifiers for transform 1 }

SetActiveTransform(0);

with Transform do begin

chaos[0] := 1

chaos[1] := 2

end;

{ Weight modifiers for transform 2 }

SetActiveTransform(1);

with Transform do begin

chaos[0] := 2

chaos[1] := 4

end;

Page 21: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

…………………………………………………………………………………………………………………………………..

Copy and paste this script into the script editor if you could not follow the steps.

From and including

{ Flame }……..

…….. end;

Ok we got a nice script going here

For the bonus and end of this little start scripting tut let’s make it a batch script.

To do this add this bit (copy and paste) in the beginning…………………………………..

………………………………………………………………………………………………………………………………….

SaveFlame(INSTALLPATH + 'myflamescript.flame');//creates the original flame file since it doesn't

exist on first run

DeleteFile(INSTALLPATH + 'myflamescript.flame');//deletes the old flame file for the next run

for M := 0 to Options.BatchSize - 1 do

begin

ShowStatus('Processing ' + IntToStr(M) + ' of ' + IntToStr(Options.BatchSize));

RandomFlame(0);

BatchIndex := BatchIndex + 1;

………………………………………………………………………………………………………………………………………….

And paste this bit right in the end……………………

Page 22: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

…………………………………………………………………………………………………………………………….

Flame.Name:= 'myflamescript-' + DateCode + '-' + IntToStr(BatchIndex);

BatchIndex := BatchIndex;

SaveFlame(INSTALLPATH + 'myflamescript.flame');

end;

ListFile(INSTALLPATH + 'myflamescript.flame');

UpdateFlame := True;

…………………………………………………………………………………………………………………………………

Now the script will make a batch the same size (amount) as your random batch settings.

All unique and never to be repeated.

Ready for you to play with /save/tweak or share.

The script should look like this now…………….

………………………………………………………………………………………………………………………………………

SaveFlame(INSTALLPATH + 'myflamescript.flame');//creates the original flame file since it doesn't

exist on first run

DeleteFile(INSTALLPATH + 'myflamescript.flame');//deletes the old flame file for the next run

for M := 0 to Options.BatchSize - 1 do

begin

ShowStatus('Processing ' + IntToStr(M) + ' of ' + IntToStr(Options.BatchSize));

Page 23: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

RandomFlame(0);

BatchIndex := BatchIndex + 1;

{ Flame }

Clear;

if (pos('7x', LowerCase(ProgramVersionString)) >= 0) then

AngleTransform := 180 / PI else AngleTransform := 1;

with Flame do begin

Width := 512;

Height := 512;

Brightness := 20.1913043478261;

Gamma := 2;

GammaTreshold := 0.00432741330581297;

Scale := 10;

Angle := 1.06569804126774;

X := -0.403268521044636;

Y := -1.21207792995833;

Background[0] := 0;

Background[1] := 0;

Background[2] := 0;

end;

{ Transform 1 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 0.05;

Page 24: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

Color := 0.091;

Symmetry := 0.44;

a := 0.07114;

b := 0.03229;

c := -0.03229;

d := 0.07114;

e := 0.484187;

f := 1.139548;

Opacity := 1

linear := 0.626972600445151

flatten := 1

radial_blur := 1

radial_blur_angle := 1

end;

{ Transform 2 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 10;

Color := 0.909;

Symmetry := 0.9;

a := -0.488527;

b := -0.867305;

c := 0.856468;

d := -0.498127;

e := 0.99734195637881;

Page 25: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

f := 0.70834849318664;

post[0,0] := 0.505074;

post[0,1] := (-1) * -0.863076;

post[1,0] := (-1) * 0.863076;

post[1,1] := 0.505074;

post[2,0] := 0;

post[2,1] := (-1) * 0;

Opacity := 1

flatten := 1

cross := 0.0131143286046572

waves2 := 1.00666418301174

cross2 := 0.0131143286046572

waves2_freqx := 4.49286

waves2_freqy := 2.40787

waves2_freqz := 0

waves2_scalex := -0.0435942

waves2_scaley := -0.01904

waves2_scalez := 0

end;

Rotate(randomRange(0,360))

translate(-1 + random*2,-1 + random*2)

{ Transform 3 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Page 26: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

Weight := 0.5;

Color := 0;

a := 0;

b := -0.5;

c := 0.5;

d := 0;

e := 0.213786;

f := 0.921655;

Opacity := 1

flatten := 1

flux := 1.11844282170059

flux_spread := 0.900485

end;

{ Transform 4 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 0.5;

Color := 0;

a := 0.5;

b := 0;

c := 0;

d := 0.5;

e := -0.432323;

f := -0.855144;

post[0,0] := -1;

Page 27: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

post[0,1] := (-1) * 0;

post[1,0] := (-1) * 0;

post[1,1] := -1;

post[2,0] := 0;

post[2,1] := (-1) * 0;

Opacity := 1

flatten := 1

flux := 1.14475191698875

flux_spread := -0.747906

end;

{ Final Transform }

Flame.FinalXformEnabled := True;

SetActiveTransform(transforms);

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Color := 0;

a := -0.798635510047293;

b := 0.601815023152048;

c := -0.601815023152048;

d := -0.798635510047293;

e := 0;

f := 0;

linear := 1

end;

{ Weight modifiers for transform 1 }

Page 28: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

SetActiveTransform(0);

with Transform do begin

chaos[0] := 1

chaos[1] := 2

end;

{ Weight modifiers for transform 2 }

SetActiveTransform(1);

with Transform do begin

chaos[0] := 2

chaos[1] := 4

end;

Flame.Name:= 'myflamescript-' + DateCode + '-' + IntToStr(BatchIndex);

BatchIndex := BatchIndex;

SaveFlame(INSTALLPATH + 'myflamescript.flame');

end;

ListFile(INSTALLPATH + 'myflamescript.flame');

UpdateFlame := True;

…………………………………………………………………………………………………………………………

Rename the myflamescript bit (there is 5 places in the script) with your own name and it will make

and name it as such.

Have fun till next time when we get a little more involved with this scripting thing in Apophysis .

Page 29: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

Feel free to apply your new found insight to the whole flame and you might end up with a script that

looks something like this.

…………………………………………………………………………………………………………..

SaveFlame(INSTALLPATH + 'myflamescript.flame');//creates the original flame file since it doesn't

exist on first run

DeleteFile(INSTALLPATH + 'myflamescript.flame');//deletes the old flame file for the next run

for M := 0 to Options.BatchSize - 1 do

begin

ShowStatus('Processing ' + IntToStr(M) + ' of ' + IntToStr(Options.BatchSize));

RandomFlame(0);

BatchIndex := BatchIndex + 1;

{ Flame }

Clear;

if (pos('7x', LowerCase(ProgramVersionString)) >= 0) then

AngleTransform := 180 / PI else AngleTransform := 1;

with Flame do begin

Width := 512;

Height := 512;

Brightness := 20.1913043478261;

Gamma := 2;

GammaTreshold := 0.00432741330581297;

Scale := 10;

Page 30: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

Angle := 1.06569804126774;

X := -0.403268521044636;

Y := -1.21207792995833;

Background[0] := 0;

Background[1] := 0;

Background[2] := 0;

end;

{ Transform 1 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 0.05;

Color := 0.091;

Symmetry := 0.44;

a := 0.07114;

b := 0.03229;

c := -0.03229;

d := 0.07114;

e := 0.484187;

f := 1.139548;

Opacity := 1

linear := 0.626972600445151

flatten := 1

radial_blur := 1

radial_blur_angle := 1

end;

Page 31: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

Rotate(randomRange(0,90))

{ Transform 2 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 10;

Color := 0.909;

Symmetry := 0.9;

a := -0.488527;

b := -0.867305;

c := 0.856468;

d := -0.498127;

e := 0.99734195637881;

f := 0.70834849318664;

post[0,0] := 0.505074;

post[0,1] := (-1) * -0.863076;

post[1,0] := (-1) * 0.863076;

post[1,1] := 0.505074;

post[2,0] := 0;

post[2,1] := (-1) * 0;

Opacity := 1

flatten := 1

cross := 0.0131143286046572

waves2 := 1.00666418301174

cross2 := 0.0131143286046572

waves2_freqx := 4.49286

Page 32: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

waves2_freqy := 2.40787

waves2_freqz := 0

waves2_scalex := -0.0435942

waves2_scaley := -0.01904

waves2_scalez := 0

end;

Rotate(randomRange(0,5))

translate(-1 + random*2,-1 + random*2)

{ Transform 3 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 0.5;

Color := 0;

a := 0;

b := -0.5;

c := 0.5;

d := 0;

e := 0.213786;

f := 0.921655;

Opacity := 1

flatten := 1

flux := 1.11844282170059

flux_spread := 0.900485

end;

Page 33: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

Rotate(randomRange(0,45))

{ Transform 4 }

AddTransform;

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Weight := 0.5;

Color := 0;

a := 0.5;

b := 0;

c := 0;

d := 0.5;

e := -0.432323;

f := -0.855144;

post[0,0] := -1;

post[0,1] := (-1) * 0;

post[1,0] := (-1) * 0;

post[1,1] := -1;

post[2,0] := 0;

post[2,1] := (-1) * 0;

Opacity := 1

flatten := 1

flux := 1.14475191698875

flux_spread := -0.747906

end;

Page 34: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

Rotate(randomRange(0,45))

translate(-0.5 + random,-0.5 + random)

{ Final Transform }

Flame.FinalXformEnabled := True;

SetActiveTransform(transforms);

with Transform do begin

for i := 0 to NVARS do Variation[i] := 0;

Color := 0;

a := -0.798635510047293;

b := 0.601815023152048;

c := -0.601815023152048;

d := -0.798635510047293;

e := 0;

f := 0;

linear := 1

end;

{ Weight modifiers for transform 1 }

SetActiveTransform(0);

with Transform do begin

chaos[0] := 1

chaos[1] := 2

end;

{ Weight modifiers for transform 2 }

Page 35: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial

SetActiveTransform(1);

with Transform do begin

chaos[0] := 2

chaos[1] := 4

end;

Flame.Name:= 'myflamescript-' + DateCode + '-' + IntToStr(BatchIndex);

BatchIndex := BatchIndex;

SaveFlame(INSTALLPATH + 'myflamescript.flame');

end;

ListFile(INSTALLPATH + 'myflamescript.flame');

UpdateFlame := True;

………………………………………………………………………………………………………………………………………………..

Have loads of fun with a newfound copy and paste thing.

Next time we will go into understanding and manipulating RANDOM values on our variations and

variables……………………………………………………………

These bits of script were not written by me I found them in loads of scripts by many people.

So a great thank you to the people before us that helped to make all of this possible.

I love you all and thank you for downloading this little tutorial I hope it helps to open doors.

If you get stuck just ask and I will do the best I can to help.

Peace love freedom

I make and then I bake

SCriptscriber 2012

Page 36: Let’s make a basic tutorial on scripting in Apophysis 7x V15Corig00.deviantart.net/75ea/f/2012/173/d/a/apophysis_script_tutorial_for_beginners_and... · Let’s make a basic tutorial