Part I. Key frame animation with Oxidizer
By Ralf Flicker.This is Part I of an introduction to fractal flame animation with Oxidizer (0.5.9.2). For certain flam3 animation features that are well-documented on the electric sheep wiki (henceforth ESW) I will provide the links for these, and give only a brief description here. Genome parameters and Lua functions are highlighted on their first appearance.
Table of contents
Overview
Before diving into the details of animating flames with Oxidizer, let's catalog the different steps and options along the way, as an overview. There are two principal steps in making animations with Oxidizer:
- Creating a temporal sequence of genomes
- Rendering (and optionally encoding)
The genome sequence can be of two basic types:
1a. Key frames for interpolation
1b. All frames sequenced
1b. All frames sequenced
The second case is most practically done with a script, although a couple of special cases are also built into Oxidizer. In the first case, flam3 does the interpolation between key frames for you, while in the second you can have full control over every frame in Oxidizer. Rendering can also be done by two principally different methods:
2a. To a predefined movie format
2b. To image frames
2b. To image frames
In the second case, an additional step is required to encode the movie with some external software. The advantage of this method is that you have the uncompressed raw frames and can re-encode the movie into different formats without loss of quality. In the first case, you obtain an already compressed movie, and if the encoding wasn't as great as you had hoped, there's no way to improve it afterward.
Since 1b is a more advanced and rather large topic involving the use of scripts, this tutorial is divided into two parts, where Part I covers 1a, 2a and 2b, the scripting-free approach to rendering fractal flame animations with Oxidizer. Thereafter, Part II is focused exclusively on 1b and how to sequence animations with scripts.
Making a sequence of key frames
![]() |
| Figure 1. List of genomes as key frames for animation (genome: sequence4.flam3). |
| Morphing of the key frame sequence in Fig 1. |
You can morph between all available genome parameters in this way, or, as mentioned, between completely different genomes. Fig. 1 shows an example of a morphing sequence between four different genomes (i.e. three morphs), spaced 80 frames apart. The corresponding 240-frame movie is shown in the video clip inserted below this paragraph.
From version 0.5.9.2 Oxidizer also has a built-in option to generate a complete sequence of frames out of a key frame sequence, which can be used to create Electric Sheep style loops and "edges". A loop in this case is a rotation of the affine Xform triangles, and an edge is what I have called a morph, that is, a transition between two different genomes. These options are invoked via the "Replace" action under the File menu, and include "Loop From Current Genome" (makes a single loop) and "Loop From All Genomes" (makes a sequence of loops and edges).
Making a key frame sequence or a sequence of loops and edges is no more difficult than that, but there are some caveats to be aware of (see "Morphing pitfalls" below). Before rendering the sequence, we need to think about interpolation settings and motion blur, which are genome parameters that only apply when rendering animations.
Interpolation modes

These are found under the Image tab in the Flame Edit window. Flam3 has a variety of both spatial and temporal interpolation modes. The spatial interpolation_type selector governs how the affine and post transformations (that is, the Xform triangles) are morphed into each other. The Linear mode moves the nodes of the triangles in straight lines, while Log follows arc-like paths (straight lines in polar coordinates). Log also implements additional features, which you can read about on the ESW on interpolation. It seems to be the view that Log generally improves smoothness, and should be used by default, although there may arise situations where it causes trouble instead, and you need to switch back to Linear.
![]() |
| Figure 2. Comparison of linear and smooth (tension=0) temporal interpolation across four key frames at time steps 0, 10, 20 and 30, with corresponding parameter values 0.2, 1, 0 and 0.75. |
Catmull-Rom splines have one drawback: they require boundary conditions in order to be calculated. To calculate the CR spline between frame n and n+1, one needs to know the values at n-1 and n+2 also. This is why, in Oxidizer, the first frame and the last two frames are always set to Linear by default, because these frames do not have sufficient frames either before or after them to provide boundary conditions for the Smooth calculation. One can of course circumvent this by adding stationary frames at the beginning and the end of the sequence, and then discard those from the rendered movie (in the 2b rendering method).
Motion blur
A nice feature of flam3 is its motion blur for animation (found under the Render tab in Oxidizer), of which there is a good description already at the ESW. Motion blur adds another type of transition effect between consecutive frames, which can help to smooth out the motion or produce interesting special effects. Each frame is subdivided into a number of sub-frames given by Temporal Samples, which are (linear) interpolations from the current frame toward its neighbors, so as to blend them together. The sub-frames are rendered independently and added together, weighted by a Temporal Filter function. The available filter functions are Box, Gaussian and Exponent. The first two take the additional parameter Filter Width, which determines the range of the interpolation (in number of frames). Exponent creates a ramped filter, and takes the additional parameter Filter Exponent which specifies the steepness and direction of the ramp. A potential caveat of this method is that the rendering Quality is also subdivided between the temporal samples, so the quality of each sub-frame is only a fraction of what the original would have been without motion blur. This can sometimes lead to a loss of brightness in high-velocity parts of the image. One may have to compensate for these effects by upping the rendering quality.
![]() | ![]() | ![]() |
| Figure 3. Motion blur on a Sierpinski triangle rotating at the fearsome rate of 40 degrees per frame (equivalent to 200 rpm at 30 fps), with filter exponents of 3 (center) and 10 (right). | ||
Genome morphology
When designing animations it is useful to keep in mind what the various transformations in the genome does, and what we might expect from animating the various parameters. Here's an executive summary:
- Flame: visual representation of the genome attractor
- Genome: union of Xforms
- Xform: generates an attractor by applying coordinate transformations:
- Affine transformation
- Variations
- Post transformation
- Final-Xform: turns the Xform into a "master" attractor
The Xform attractors are blended together in the image by their Xform weights (with the exception of the final-xform). Animating Xform weights will therefore mostly produce the effect of changing the strength or the presence of different attractors, without changing their shape (see movie clip below). The shape of an Xform attractor is produced by its affine linear transformation and the non-linear variations applied afterward. The Post transformation is a final linear transformation that scales, rotates and moves the attractor produced by the first two passes through the affine transformations and the variations. Generally, the variations and affine transformations are the most interesting targets for animation, as they will produce the most visible dynamics of the attractors. If the final-Xform is enabled, that Xform will not be blended with the rest, but will instead act as a "master" attractor and cause the other Xforms to become mapped onto the final-xform attractor, or "wrapped around" it, like a nonlinear camera distorts an image. Because the final-xform has such a massive impact on the image, one should be careful when animating final-xforms (see below).
| Xform blending. | Variation morph. |
Morphing pitfalls
There are some Xform states that can have undesirable effects on the image, which we want to avoid. Things to look out for when morphing genomes include:
- align Xforms that are Final-Xform
- avoid triangle reflections
- avoid driving common variations through zero
It is prudent (but often not possible) to try to avoid animating the discrete parameters of the genome, as that can cause jumps from one state to another, and flam3 has to compensate for that with various tricks. Such parameters include the final-xform and the genome symmetry, and certain variations parameters that may be sensible to keep as whole numbers (e.g. ngon sides, flower petals, pie slices etc). All of these can of course be morphed, but if we're thinking about designing an animation sequence, we may keep these issues in mind to achieve a better design.
A triangle reflection means that the triangle formed by the P1 and P2 vectors of the source xform can not be rotated into the target triangle without at some point turning into a single line, i.e., the angle between P1 and P2 passes through either 0 or 180 degrees. Since P1 and P2 represent the scaling of the two spatial dimensions x and y, when the vectors fall on a line one dimension has effectively disappeared. If this happens in a final-xform or in a post transform with a large weight, the effect on the image can be dramatic.
Also, in xforms that have a large effect on the image, it can sometimes be a bad idea to animate certain variation weights through zero; that is, starting from a positive value and ending at a negative (or vice versa), where the weight has to pass through zero. This is very dependent on the particular variation and overall genome composition, but if you see twitches and sudden jumps in otherwise smooth animations, they may be due to such zero-crossings.
So if we spot any particularly troublesome instances of these cases, what can we do about it? To avoid triangle reflections, check the genomes if you can flip over the troublesome triangle in one of them, and still have an equivalent image scene. Same with the variation weights: several variations are symmetric around zero, meaning that they look exactly the same for positive as for negative weights. In such cases make them both (source and target genome) have the same sign. Alternatively, you can try reordering the Xforms in one of the genomes. In ordinary still renderings the Xform order does not matter, but in animation it does, because of the transition from one set of Xforms to another will look very different depending on which source Xforms are morphed into which target Xforms. Currently we can do this in Oxidizer with a script (see Part II of this tutorial).
| No reordering. | Xforms reordered. |
Render movie
The first animation option is to render the sequence directly to a movie, which requires you to specify the video format, the frame rate, and encoding quality in advance. The pros and cons of this option include:
+ simple, fast and no-hassle
+ handled entirely at the Oxidizer level, requiring no external applications
– computer needs to keep the entire movie in memory while rendering, which puts high-definition rendering out of the question
– if the computer crashes you run the risk of losing the whole job
– if the movie quality didn't come out to your satisfaction, it is normally not possible to improve by tweaking or re-encoding an already compressed movie
+ handled entirely at the Oxidizer level, requiring no external applications
– computer needs to keep the entire movie in memory while rendering, which puts high-definition rendering out of the question
– if the computer crashes you run the risk of losing the whole job
– if the movie quality didn't come out to your satisfaction, it is normally not possible to improve by tweaking or re-encoding an already compressed movie
Also, in case you happen to own better video and encoding tools (e.g. Final Cut Pro or Compressor), you will probably want to use these instead for the final compression of the movie. To animate an Oxidizer genome sequence by rendering it to a video format, select "Render Movie..." from the Render pull-down menu (alternatively, click the "Animate" icon in the toolbar or the "Animate" button on the Oxidizer main window). In the Save dialogue that appears:
- navigate to a location where you want to save the movie
- type in a file name (including extension) in the Save As field
- from the pull-down menu at the bottom, select a video format
- click the Options button to specify the movie and encoder setting
The last two steps may require some experimentation if you are not familiar with the various video formats and already know what settings to use for good results. Figure 4 below shows an example of a standard setting for the QuickTime movie format. The Options button in the Save As dialogue opens the Movie Settings window (on the left in Fig.4), where you can bring up the Size and Video Filter windows (not shown). To compress the movie into the same dimensions as the image frames, leave the Size setting on "Compressor native." The Settings button opens the Video Compression Settings window (on the right in Fig. 4), showing some suggested encoder settings.
![]() |
| Figure 4. Standard video compression settings (click on image for full-size version) for the QuickTime movie format. |
Render to frames
By rendering to frames instead, you do not commit to a specific movie encoding or filtering setting, and can defer that choice to later - and also redo the compression with different settings until you get the best result. Another advantage for large animations is that you can keep adding frames to the movie later on by just rendering more frames and re-encoding the movie. To use this option, select "Render Movie as Stills..." from the Render pull-down menu (or click the "Stills" icon in the toolbar). In the Save dialogue that appears:
- click on New Folder to create a folder for the frames
- in the Save As field, type in an image name prefix (for instance "img-")
- select an image format, either PNG or JPEG

The PNG format will give the highest quality frames, although some video encoders appear to do a better compression job if presented with frames that have somewhat reduced color depth. If you experience twitchy motions when trying to encode a PNG sequence, render to the JPEG image format instead at 100% quality. For all practical purposes the image quality is as good as perfect, and the video encoder might do a better job. If you do not plan on rendering the whole sequence at once, enter the First Frame and Last Frame values to specify the range. This feature is great for examining the motion blur settings, as you can render a single frame of the sequence that will contain animation features that do not appear in ordinary still renderings.
Lastly, when the frames are rendered, you need to use some external software for compositing and compressing the movie. The absolute easiest way for non-experts is to shell out $30 for QuickTime Pro (if you do not own it already), and do the following:
- select Open Image Sequence from the File menu (or shift-cmd-O)
- navigate to the first frame of your image sequence and click OK
- choose frame rate
Now you have the uncompressed movie on the highest quality that the individual frames allow, and can compress it down to various video formats using the Export function. Even better if you have something like Compressor (part of Final Cut Studio) to do the filtering and encoding. On the freeware side of things, there are probably several packages that could do the same job and offer additional popular codecs, although some may require the Mac user to be a little Linux savvy to install and operate. The only package that I am currently aware of is MEncoder. Below is shown a command-line example of how to composite a 25-fps (frames per second) AVI movie out of all JPEG files of the current folder:
mencoder "mf://*.jpg" -mf fps=25 -ovc lavc -o ./dest.avi
This section has to end here for the moment, until someone with more hands-on experience with MEncoder can supply more detailed information for how to use it properly, and what it's features are.
This is the end of Part I of the animation tutorial: continue to Part II to keep reading about sequencing animations with Lua scripts.






There are no comments on this page. [Add comment]