Fluogen Help




Home



First generation

Technical documentation

Source code

Installing fonts



Fluogen


Introduction

For the theories on which this program is based, see FLT and MDNT.

You can find some technical documentation in the "Fluogen\Fluogen\Documentation" folder, in the source code archive.



First generation

To generate your first fluon, start Fluogen and press "O" to enter the configuration window, and change the following options:

  • Author: Text which will be embedded where possible, representing the author of the image or animation.

  • NftDecryptionKeyPrefix: Text added in front of the decrpytion keys used for NFTs.

  • GenerateAutoSaveFolder: The folder where all generated images and animations will be automatically stored.

  • ConvertColorspaceSourceProfileFilePath: The file path for the color profile of your computer display. If you don't know what a color profile is, leave this empty.

  • SignatureWriter/FontFilePath: The file path of the font which will be used to write the signature on the generated images.

  • AnimationPackerFilePath: The file path of FFMPEG executable. This is required to encode animations from the generated frames.

  • AnimationSignatureFontFilePath: The file path of the font which will be used to write the signature on the encoded animations. Note that this is used by a BAT file, which calls FFMEPG, and has a weird format, like: C\:/Fonts/Blacksword.otf

  • NftPackerFilePath: The file path of the NFT packer, 7-Zip by default, so for example: C:\Program Files\7-Zip\7zG.exe . If you don't want to generate NFTs, ignore this.

Press the "L" key to open a window that lets you select a fluon configuration. Pick any of the listed "flc" files and then press the "G" key to generate a medium-sized image. If you don't see any, navigate to the folder where Fluogen is, and go into the folder "DeployedScripts\FluonConfiguration"

If you want to generate an animation, change the type of the generation (from the "Generate" combo-box) to "Medium animation". Note that only some fluon configurations have an animation set, like "Julia -- Opportunities - Chocolate Eclipse.flc"

Press the "E" key to edit the fluon configuration. If you make any changes to the fluon configuration, you can press the "S" key to save them.

Press "F1" for a small help.



NFTs

When generating an image or animation in Fluogen, it's possible to switch to the NFT mode, from the "Generate" combo-box, before pressing the "Generate" button. For this mode to work, Fluogen's configuration has to be set up for NFTs (see the Configuration section).

The concept of NFT, as used in Fluogen, means that after generating an image or animation, called master, several derived images and animations are created from the master.

For example, for images, Fluogen creates several mosaics, with several combinations of columns and rows (like 9 * 6, 12 * 8, 24 * 18). For an animation, several of the generated frames are separately copied as highlight frames.

These images and animations are saved with multiple resolutions and types (PNG and JPG). For example, an NFT master has by default a resolution of 16K. From this, several lower resolution images are also created (like 8K, 4K, 2K, 1K). Similar for animations, and each animation is created with a separate video encoding (FFMPEG is used for this).

In the end, all the created files are packed in a zip file. Then, a separate console application processes this zip and computes, for example, its hash.

All the resulted files are copied in the "GenartAutoSaveFolder" folder, from where they can be used to create an NFT. So, Fluogen itself doesn't create an NFT, it creates the files that can be attached to an NFT, plus the description and relevant metadata. The zip file is also encrypted if it's desired to make the content readable only by the NFT owner.

However, the zip file can simply be given to anyone, without involving NFTs. For example, maybe someone needs animations with various resolutions, for various devices.



Technical documentation



Generation pipeline

Internal MDN domain composition:

  • Stratum = 2D Euclidean space, the computer display.

  • Compose the MDN domain from the stratum and the "Domain origin" fluon configuration.

Domain projector = Projects the MDN domain to another MDN (to simulate a different kind of domain space).

Fluon generator = Generates an MDN codomain (usually inside a loop):

  • MDN escaper = Condition to exit the loop.

MDN reducer = Reduces the MDN codomain to a scalar (or two) called reduced MDN:

  • An accumulator can gather data at every iteration of the loop.

  • MDN perturbator = Modifies the accumulated data.

Reduced MDN transfer functions = Basic operations that can be applied on the reduced MDN: scale, offset, transfer function. Order: "Inner", "Middle", "Outer".

Scalar reducer = Converts the reduced MDN scalar to a reduced scalar. Reducer of any real number to a smaller number, usually to a unitary number like [0...1] or [-1...1]. This should be treated as a compressor or repeater function, although this isn't a requirement and it's not enforced.

Color reducers (low range, high range, infinite range) = Converts the reduced scalar to a reduced color scalar (within [0...1]). These should be treated as a compressor or repeater function, although this isn't a requirement and it's not enforced. The infinite range color reducer must support supraunitary input values. The output value must be unitary (within [0...1]).

Color extractor = Converts the reduced color scalar to an RGB color, either using the configured palette or by computing it on the spot.

Palette = Creates and caches RGB colors (usually from a cylindrical colorspace like HSL).

The projectors, generators, escapers, reducers, extractors and palettes are C# scripts that anyone can write and load (by file name) in a fluon configuration file.



Color reducer

To minimize discontinuities:

  • Color reducers must work only with positive numbers.

  • To minimize discontinuities between color reducer ranges, the input values [0...1] should be mapped to the output values [0...1], or (for the asymptotic reducers) [0...+Infinity] -> [0...1]. Note that 0 input should always be 0 output. The low range and high range reducers should use the entire [0...1] output range.

  • The correct orientation of the output of the:

    • Negative infinite range reducer is [1...0] because it's unknown what value it has for "x" away from 0, so if the orientation were reversed, the continuity of the output would not be guaranteed at "x" = 0. The correct orientation of the output of the positive infinite range reducer is [0...1], for the same reason.

    • Low range and high range reducers is [0...1] because this increases the chances of continuity between reducers, since all reducers should have an output of 0 when "x" = 0.

If a different orientation is desired, use a "ReverseAll" kaleidoscope.



General legend for script descriptions

The following terms can be seen in the source code, but also in the descriptions from the fluon configuration window.

Fluon context: fc

Fluon configuration: fp

Pixel context: pc

Stratum coordinate for the horizontal axis: sx

Stratum coordinate for the vertical axis: sy

Iteration index (from 0) in a loop: i

Available scalars (specific to the involved script): s1, s2

Available MDNs (specific to the involved script): m1, m2

Domain: x

Codomain (carried through the iterated loop): y

Initial codomain (in the iterated loop): y0

Domain radius (always positive): x.r

Domain cartesian: x[ i ]

Domain angle: x.u[ i ]

Codomain radius (always positive): y.r

Codomain cartesian: y[ i ]

Codomain angle: x.u[ i ]

Previous-iteration codomain (in the iterated loop): yp

Escape threshold: et

Whether the codomain has escaped relative to the escape threshold: escaped

Escape value (from the iterated loop): ev

Previous-iteration escape value, so it's not actually escaped (from the iterated loop): evp

Reduced MDN (carried through an MDN reducer, initialized at 0, or through an MDN perturbator, or through a scalar reducer): a

Accumulate the reduced MDN (= the reduced MDN replaces "a" at every iteration); prefixes fluon configuration descriptions: Accumulate

Maximum iterations: mi

Realized iterations (until escape): ri

Reduced scalar: rs

Reduced color: rc

Constant PI: pi



Functions:

  • |x| = absolute value

  • x ^ p = power, always from the absolute value



Tips

Fractals usually use the "RadiusAbs" escaper with an "EscapeThreshold" higher than 0, which means that when the radius of the codomain exceeds "EscapeThreshold", the loop ends. Usually, the higher this is, the less color banding is visible.

If you get out of memory exceptions, and your computer has a low amount of RAM (like 8 GB), reduce the size of the image / animation frame to generate. The used resolution might be fine if the aspect ratio is 16:9 instead of 1:1.

In the file names of the fluon configurations, you can use "--", twice, to indicate that the text between the two occurrences must be used as a genart name.

You can compare fluon configuration files, as text files (the content is JSON data), to see what parameters are different, so as to see why the images they create are different.

You can see where interesting coordinates are for a fluon by creating an animation with the "TranslateXXX" or "ScanXXX" animation drivers:

  • The "TranslateXXX" driver goes across a line (between minimum and maximum coordinates) and creates a frame for each point in that line. You can then look over the frames and see which one is interesting. Then, you can look in the "FrameConfigurations" folder (of the animation folder), for the file with the same frame number. You can copy this file in the folder with fluon configurations and refine it further.

  • The "ScanXXX" driver goes across a plane (between minimum and maximum coordinates) and creates a frame for each point in that plane. Note that the number of frames is distributed over both the width and height of the plane, proportionally with the width and height, so for a square aspect ratio the width and height are split to the square root of the number of frames.



Performance

Calculations are much slower than in other fractal generation programs because Fluogen:

  • Works in 3 dimensions by default, instead of 2.

  • For multidimensional numbers, uses trigonometric functions (sin, atan), which are much slower (about 10 times) than arithmetic ones (addition, multiplication). Optimizations are made for certain operations. Fluogen is almost 16 times slower than Ultrafractal, for optimized multidimensional squaring (which doesn't use trigonometric functions), both without antialiasing.

  • Prefers flexibility over optimizations. For example, the implementation of the MDN numbers uses an array for the cartesian coordinates, to allow for any number of dimensions, and a class with an array is much slower than a structure with fixed fields.

  • If MDN is implemented as a "struct", optimized as a 3D vector, the performance is improved only about 18%

  • Is written in C#, which produces code that's slower than C++. Heap allocations take a significant part of the processing time of a pixel.

  • An MDN reducer with accumulator is executed for each iteration, so it can have a huge impact on performance.

Trigonometric functions are used because the multidimensional numbers library requires them in order to be able to work flexibly with any number of dimensions and equations.

Certain optimizations are implemented for Julia and Mandelbrot in 2 dimensions, which makes the performance better 2.5 times.



Smoothing effect

Multidimensional multiplication, specifically squaring, has a smoothing effect the more dimensions are used.

Due to this effect, smoothing can be applied on fractals that use multidimensional squaring, with little performance penalty (only that required to perform calculations in one more dimension). This effect allows ample adjustment for the level of smoothing.

The effect is applied only on visually jarring artifacts, but the general sharpness of the image is maintained; the disadvantage is made by slight distortions in some areas. With antialiasing, where multiple points have to be computed for every pixel, the entire image loses sharpness.

To apply this effect, for example on 2D Julia fractals, simply set the third dimension cartesian to a very small value (and adjust it for the desired level of smoothing). For maximum performance, the implementation of the squaring has to be optimized by using 3D vectors instead of MDN numbers (whose implementation in Fluogen uses an array for the cartesian coordinates).



Source code

The source code files for the MDN library is the "Mdn.cs" file from the C# source code archive. The C# library is naturally implemented, that is, you can write for example "y = (1 + x / n) ^ n" to represent the natural exponentiation (at limit). All operations are implemented so as to require the minimum number of conversions between cartesian and polar coordinates.



Installing fonts

After a new font is installed in the operating system, the application must be restarted if you want to use the font in it.







License | Contact