HOME | DD

Published: 2016-07-25 17:07:22 +0000 UTC; Views: 6778; Favourites: 110; Downloads: 0
Redirect to original
Description
A while back I made myself a script to generate random "nebulae." I tweaked the script until I was happy with the results, and then added comments so everyone can see how it works and learn to make these from scratch. The script will generate something random each time, so you're never going to get the same thing twice. Results will vary in clarity and structural look, and almost all of them will require further tweaking to make something really stand out.This image was made running this script and then transferring the flame into Chaotica. Once in Chaotica I tweaked the weights and colors, and moved xforms 0-3 (1-4) around a bit until I was happy.
Copy and paste the below into your apophysis script editor (only available in version 7x15B and lower) and then save it to a script file:
{-----------------------------------------------------}
{Nebula Base script by etomchek-----------------------}
{last edited 7-25-16----------------------------------}
{will work with apophysis 7x, versions 15B and lower--}
{-----------------------------------------------------}
procedure CalculateColors;
{just spreads out the colors in the flame so you can see
it better once it's done.
Typically included in functions.asc, but later versions of
apo don't usually recognize the right file.}
begin
for i := 0 to Transforms - 1 do
begin
SetActiveTransform(i);
Transform.Color := i / (Transforms - 1);
end
end;
{create a random flame to get a random gradient,
then clear all xforms}
randomflame(0);
clear;
{add a linear transform, scale it down a random amount,
but no less than 30% original size.
set the base weight between .5 and 1.
move and rotate it a bit.}
AddTransform;
with Transform do
x := 0.1;
While x < 0.3 do
begin
x := random;
end
Scale(x);
Transform.Weight := random+0.5;
Translate((3*random)-1.5,(3*random)-1.5);
Rotate(random*360);
{add a spherical transform, scale it down a random amount,
but no less than 30% original size.
set the base weight between .5 and 1.
move and rotate it a bit.}
AddTransform;
Transform.linear3d := 0;
Transform.spherical := 1;
with Transform do
x := 0.1;
While x < 0.3 do
begin
x := random;
end
Transform.Weight := random+0.5;
Translate((3*random)-1.5,(3*random)-1.5);
Rotate(random*360);
{add a foci transform, scale it down a random amount,
but no less than 30% original size.
set the base weight between .5 and 1.
move and rotate it a bit.
Foci will add some fun star effects.
AddTransform;
Transform.linear3d := 0;
Transform.foci := 1;
with Transform do
x := 0.1;
While x < 0.3 do
begin
x := random;
end
Scale(x);
Transform.Weight := random+0.5;
Translate((3*random)-1.5,(3*random)-1.5);
Rotate(random*360);
{add a another linear xform, scale it down a random amount,
but no less than 30% original size.
set the base weight between .5 and 1.
move and rotate it a bit.}
AddTransform;
with Transform do
x := 0.1;
While x < 0.3 do
begin
x := random;
end
Scale(x);
Transform.Weight := random+0.5;
Translate((3*random)-1.5,(3*random)-1.5);
Rotate(random*360);
{add a gaussian blur xform, with a weight value of .15.}
AddTransform;
Transform.linear3d := 0;
Transform.gaussian_blur := 1;
Transform.weight := 0.15;
{optional when building from scratch:
add a radial blur xform, with a weight value of .15.
Makes stars}
AddTransform;
Transform.linear3d := 0;
Transform.pre_blur := random;
Transform.radial_blur := random;
Transform.weight := 0.15;
{run calculate colors from the beginning to spread out color values.}
calculatecolors;
Related content
Comments: 14
astrodrako [2021-09-04 21:35:33 +0000 UTC]
👍: 0 ⏩: 0
Esherymack [2017-01-28 18:36:37 +0000 UTC]
Just a tip for people who use 7x15C and up: Just delete the "3d" off of the "linear3d" in every instance linear3d appears, and then it'll work.
👍: 0 ⏩: 0
flyinghitcher [2016-09-20 13:31:12 +0000 UTC]
Awesome, thx for this, I have some nice image's to play with.
👍: 0 ⏩: 0
Lupsiberg In reply to Lupsiberg [2016-09-03 09:58:24 +0000 UTC]
I've just tried your script. It works fine with 7X 13 and 7X 14,
but with 7X 15b I keep getting the following error message:
"Unknown identifier or variable is not declared: 'x'.
Source position: 32,11."
👍: 0 ⏩: 0
deadened-glow [2016-07-26 14:51:07 +0000 UTC]
Thank you, I was able to follow the script in version 16 to get what I wanted.
I had a problem downloading an older version, so I just followed the description of the script.
👍: 0 ⏩: 0