EmberGenome is for generating flames from scratch as well as from other existing flames. Out of the three command line programs, it’s the most complex due to the number of options.
The options differ from the other programs in that rather than governing how the program performs its given task, they exist in groups which instruct the program to perform different tasks entirely. These different tasks are separate from each other, and only one may be run at a time. Once the task complete, the program exits.
It also differs in that its output is not an image, and is instead text printed to the console. So it should usually be ran by piping the output to a text file.
Upon completion, a summary of what operations took place will be placed in the edit Xml tag of the output flame.
Diagnostic options
The diagnostic options for EmberGenome are just for showing which variations are supported.
allvars
Display the names of all supported variations and exit.
> embergenome --allvars
sumvars
Display the names of all regular variations which have the default behavior of summing their outputs and exit.
> embergenome --sumvars
assignvars
Display the names of all regular variations which have the non-standard behavior of assigning their outputs and exit.
> embergenome --assignvars
ppsumvars
Display the names of all pre/post variations which have the non-standard behavior of summing their outputs and exit.
> embergenome --ppsumvars
ppassignvars
Display the names of all pre/post variations which have the default behavior of assigning their outputs and exit.
> embergenome --ppassignvars
dcvars
Display the names of all variations which use direct coloring and exit.
> embergenome --dcvars
statevars
Display the names of all variations which alter their state on each iteration and exit.
> embergenome --statevars
parvars
Display the names of all variations which have parameters and exit.
> embergenome --parvars
nonparvars
Display the names of all variations which do not have parameters (weight only) and exit.
> embergenome --nonparvars
regvars
Display the names of all supported regular variations and exit.
> embergenome --regvars
prevars
Display the names of all supported pre variations and exit.
> embergenome --prevars
postvars
Display the names of all supported post variations and exit.
> embergenome --postvars
Clone
clone_all
All flames in the specified file will be read and printed.
Used with: --template, --offsetx, --offsety
.
When used with these, it is an efficient way to change certain values for all flames in a file. However, when used without any of them, this function is the same as making a copy of the file.
Template only:
> embergenome --clone_all=C:\yourflames\test.flame --template=C:\yourflames\template.flame > out.flame
Offsets only:
> embergenome --clone_all=C:\yourflames\test.flame --offsetx=0.5 --offsety=0.5 > out.flame
Template and offsets:
> embergenome --clone_all=C:\yourflames\test.flame --template=C:\yourflames\template.flame --offsetx=0.5 --offsety=0.5 > out.flame
Animate
Print every flame in a file at whole time steps increasing by one.
If every flame in the file has integer time steps which sequentially increase by one, then this will merely print out the file. It only takes special action to interpolate the flames if the times are not integers and sequentially increasing, such as 0, 2, 4, 6 or 0, 1.4, 2.7, 5.
If only a certain subsection of the file is desired, specify the start and end times to process using --begin
and --end
.
Used with: --template, --stagger, --begin, --end
.
Print the frames at unit steps:
> embergenome --animate=C:\yourflames\test.flame > out.flame
Print the frames at unit steps between 5 and 10 inclusive:
> embergenome --animate=C:\yourflames\test.flame --begin=5 --end=10 > out.flame
Print the frames at unit steps between 5 and 10 inclusive, and apply a template:
> embergenome --animate=C:\yourflames\test.flame --template=C:\yourflames\template.flame --begin=5 --end=10 > out.flame
Sequence
Generating a sequence using EmberGenome is the way animations are created on the command line. For doing so in Fractorium, see the Library tab.
It starts with an input file containing multiple flames which are the keyframes in the animation. It then interpolates and optionally rotates each keyframe and outputs the resulting flame Xmls as a final animation sequence. This sequence can then be used by EmberAnimate or the Fractorium Final Render dialog to render every frame of the animation with motion blur.
Generating an animation sequence from a flame file consists of rotating each keyframe for a specified number of frames, then interpolating and optionally rotating to the next keyframe. This repeats until the last keyframe is reached.
The following steps happen for each keyframe:
Rotate the keyframe --loops
(0 or more) times, using --loopframes
frames per loop. Therefore the number of frames spent looping is equal to --loopframes * --loops
.
Interpolate from the keyframe to the next keyframe, using --interpframes
frames, and also rotate --interploops
(0 or more) times while interpolating. Therefore the number of frames per loop while interpolating will be --interpframes / --interploops
.
The greater the value for --loopframes
and --interpframes
, the slower the animation will appear to move, which can provide more of a surreal, dream-like state.
The greater the value for --interploops
, the faster the rotations will be during interpolation.
If rotating is not desired, it can be omitted by specifying --loops=0
and --interploops=0
.
Note that --stagger
affects how interpolation is done and is therefore used with --animate
, --sequence
and --inter
. When interpolating between two flames, all of the xforms are interpolated at once. Sometimes it can be interesting to structure the process in a “staggered” way instead. The value for --stagger
is a decimal number between 0 and 1 and governs the xform interpolation behavior like so:
0 (default): xforms will interpolate all at once.
0.5: the interpolation of each xform is staggered so that when the first xform is half done, the second one starts, and so on.
1: each xform interpolates consecutively with no overlap.
Used with: --template, --stagger, --loops, --loopframes, --interpframes, --interploops, --startcount, --padding
.
loops [1]
The number of times the xforms of a keyframe will do a 360 degree rotation before moving on to the next interpolation step. Note that only xforms which have the animate flag set to true will be rotated.
Set to 0 to omit rotation before interpolating.
loopframes [20]
The number of frames for each loop specified by --loops
.
interpframes [20]
The number of frames used to interpolate from one keyframe to the next.
interploops [1]
The number of times the xforms will do a 360 degree rotation while interpolating from one keyframe to the next. Note that only xforms which have the animate flag set to true will be rotated.
Set to 0 to omit rotation while interpolating.
Rotate each keyframe once, using the default of 20 steps for each rotation and interpolation, do not rotate while interpolating:
> embergenome --sequence=C:\yourflames\test.flame --loops=1 --loopframes=20 --interpframes=20 --interploops=0 > out.flame
Rotate each keyframe twice, using 60 steps for each rotation and interpolation, do not rotate while interpolating. This will give a more slowly moving animation because of the greater number of frames:
> embergenome --sequence=C:\yourflames\test.flame --loops=2 --loopframes=60 --interpframes=60 --interploops=0 > out.flame
Perform no rotations which will make the entire sequence interpolations, and use 40 steps per interpolation:
> embergenome --sequence=C:\yourflames\test.flame --loops=0 --interpframes=40 --interploops=0 > out.flame
Perform no rotations which will make the entire sequence interpolations, use 40 steps per interpolation, and interpolate each xform individually:
> embergenome --sequence=C:\yourflames\test.flame --loops=0 --interpframes=40 --interploops=0 --stagger=1 > out.flame
Rotate each keyframe twice, using 40 steps for each rotation, and rotate twice during interpolation using a total of 40 frames, 20 for each rotation:
> embergenome --sequence=C:\yourflames\test.flame --loops=2 --loopframes=40 --interpframes=40 --interploops=2 > out.flame
Interpolate or rotate
These are mostly useful as debugging tools to see what the flames at a given point in an animation will look like.
Used with: --template, --stagger, --frame, --loopframes, --interpframes
.
Both --inter
and --rotate
will apply --template
if present after their respective operations have been performed.
The default values for --frame
and --loopframes
are 0 and 20, respectively.
startcount [0]
Start the names of the output flames at the specified value.
> embergenome --sequence=C:\yourflames\test.flame --loops=1 --loopframes=20 --startcount=1000 > out.flame
padding [0 (auto)]
Pad the names of the output flames with zeroes such that they are always this length. If omitted, the amount of padding needed is automatically calculated.
> embergenome --sequence=C:\yourflames\test.flame --loops=1 --loopframes=20 --padding=6 > out.flame
inter
Interpolate between exactly two flames at a frame which is a percentage of the distance between them. Include optional rotation with the interpolation. Print three output flames interpolated before, at and after the specified frame.
The input file specified by --inter
must contain exactly two flames.
--interpframes
specifies the number of steps between the two flames, default 20.
--interploops
specifies the number of rotations that would be done during a full interpolation, default 1.
--frame
specifies the 0-based step within --interpframes
to interpolate, default 0.
Note that if --frame
is left to its default of 0, then only two flames will be produced since it cannot interpolate backward before 0.
Print flames at the 0th and 1st steps out of 20 steps between the two flames in the input file:
> embergenome --inter=C:\yourflames\test2flames.flame > out.flame
Print flames at the 0th, 1st and 2nd steps out of 20 steps between the two flames in the input file:
> embergenome --inter=C:\yourflames\test2flames.flame --frame=1 > out.flame
Print flames at the 14th, 15th and 16th steps out of 60 steps between the two flames in the input file:
> embergenome --inter=C:\yourflames\test2flames.flame --frame=15 --interpframes=60 > out.flame
Print flames at the 14th, 15th and 16th steps out of 60 steps between the two flames in the input file and stagger the xform interpolation with 50% overlap:
> embergenome --inter=C:\yourflames\test2flames.flame --frame=15 --interpframes=60 --stagger=0.5 > out.flame
rotate
Rotate the affines of a single flame backward and forward by a specified amount, starting at a specific rotation. Print three output flames rotated backward, at (unchanged) and forward.
The input file specified by --rotate
must contain exactly one flame.
Similar to --inter
, the starting point to rotate from is specified as a percentage of a 360 degree rotation, --frame / --loopframes
. The amount to rotate by is specified by how many steps the 360 degree rotation is divided by, --loopframes
.
Print the input flame rotated 0 and 18 (360 / default --loopframes
of 20) degrees:
> embergenome --rotate=C:\yourflames\test.flame > out.flame
Print the input flame rotated 0, 18 and 36 degrees degrees:
> embergenome --rotate=C:\yourflames\test.flame --frame=1 > out.flame
Print the input flame rotated 90, 100 and 110 degrees:
> embergenome --rotate=C:\yourflames\test.flame --frame=10 --loopframes=36 > out.flame
Repeat
--repeat
works with the options --clone
, --mutate
, and --cross
and is used for generating new flames derived from the ones in the passed in file. The specified operation will be performed --repeat
(default 1) number of times, printing the result each time.
The behavior of the options available under --repeat
is also governed by --tries, --speed, --maxxforms, --avg, --black, --white
.
clone
Clone and print a random flame from the file for each repetition. The variations in the xforms are limited to 5 and the number of xforms is limited to --maxxforms
if specified.
Clone a random flame in the file:
> embergenome --clone=C:\yourflames\test.flame > out.flame
Clone a random flame in the file and limit to the number of xforms to 6:
> embergenome --clone=C:\yourflames\test.flame --maxxforms=6 > out.flame
Clone 5 random flames from the file:
> embergenome --clone=C:\yourflames\test.flame --repeat=5 > out.flame
mutate, cross, random
--mutate
, --cross
and random behave differently than --clone
. When they create a flame, they test the output to see if it covered a significant number of pixels. If there aren’t enough colored pixels, it assumes it was a bad flame and makes another attempt. It will continue this process until it has tried --tries
(default 10) number of times or has created an image with sufficient coverage.
The exact logic the loop uses to decide whether to try again is whether the average value of all pixels is less than --avg
(default 20), or the percentage of black pixels is less than --black
(default 1%), or the percentage of white pixels is greater than --white
(default 5%). If any of those are true and the number of attempts is less than --tries
, then another attempt is made.
If --mutate
or --cross
are specified, then the center offset of the flame is adjusted 50% of the time. If they are not specified, then it’s adjusted every time.
When rendering to test outputs, use --flam3_compat
to use flam3/Apophysis formulas for the following variations: cos, cosh, cot, coth, csc, csch, sec, sech, sin, sinh, tan, tanh, else use Chaotica formulas when omitted.
The colors in the palette will also be randomly adjusted if --mutate
and --color_palette
were not specified.
mutate
all_vars
Create a random flame, then iterate through the original flame’s xforms. For each xform, if any variation is present only in the original or the random flame’s xform at that index (XOR), clear the variations of the original flame’s xform and replace them with the variations from the random flame’s xform. If no pairs of xforms met this condition, try the process again with a new random flame. Repeat this until the conditions are met for at least one xform.
> embergenome --mutate=C:\yourflames\test.flame --method=all_vars > out.flame
one_xform
Create a random flame, then copy the affine values from the first xform in it to a random xform in the original flame. If the original had less than 2 xforms, then only copy the translation values (C & F), else copy all values of the affine.
> embergenome --mutate=C:\yourflames\test.flame --method=one_xform > out.flame
add_symmetry
Add symmetry to the flame which is randomly reflective, rotational or both.
> embergenome --mutate=C:\yourflames\test.flame --method=add_symmetry > out.flame
post_xforms
25% chance of copying the post affine from the first xform to the rest, or do one of the following:
50% chance of rotating the each affine by a random amount, and rotating each post affine by the opposite amount.
33% chance of scaling each affine by a random amount, and scaling each post affine by the inverse amount.
16% chance of translating each affine by a random amount, and translating each post affine by the opposite amount.
> embergenome --mutate=C:\yourflames\test.flame --method=post_xforms > out.flame
color_palette
Improve the colors of the flame by randomly adjusting the palette and/or xform color indices then doing test renders in a loop and analyzing the output image. The loop will keep track of the flame which produced the image with the broadest range of colors for the final output. Note that this will take much longer than most of the other options this program supports since it is performing many test renders.
If --color_palette
was not specified and was not randomly chosen, it will randomly be applied after the specified operation has been performed.
> embergenome --mutate=C:\yourflames\test.flame --method=color_palette > out.flame
delete_xform
Delete a random xform from the flame. Note that the final xform is a candidate for random deletion if present.
> embergenome --mutate=C:\yourflames\test.flame --method=delete_xform > out.flame
all_coefs
Create a random flame, then increment each affine value in the original flame by --speed
multiplied by the corresponding value in the random flame’s xform at the same index. This applies to the original flame’s final xform if present.
Increment using the default value for --speed
(0.1):
> embergenome --mutate=C:\yourflames\test.flame --method=all_coefs > out.flame
Increment using a larger value for --speed
:
> embergenome --mutate=C:\yourflames\test.flame --method=all_coefs --speed=2 > out.flame
random
Randomly pick one of the above methods when --mutate
is used without a specific method being supplied.
> embergenome --mutate=C:\yourflames\test.flame > out.flame
cross
Crossing takes two input files and picks a random flame from each and performs a cross on them. The type of crossing done is specified with the options --union
, --interpolate
and --alternate
. If no cross method is specified, then one of the three methods is chosen at random.
union
Copy all of the non-final xforms from the second flame to the first.
> embergenome --cross0=C:\yourflames\test0.flame --cross1=C:\yourflames\test1.flame --method=union > out.flame
interpolate
Interpolate at a random time between the two flames.
> embergenome --cross0=C:\yourflames\test0.flame --cross1=C:\yourflames\test1.flame --method=interpolate > out.flame
alternate
Randomly copy xforms from each flame into the final flame.
> embergenome --cross0=C:\yourflames\test0.flame --cross1=C:\yourflames\test1.flame --method=alternate > out.flame
random
Randomly choose one of the above methods.
> embergenome --cross0=C:\yourflames\test0.flame --cross1=C:\yourflames\test1.flame > out.flame
random
If no input file is specified, then a random flame is created.
> embergenome > out.flame
This can be combined with --repeat
to create multiple random flames:
> embergenome --repeat=5 > out.flame