Skip to content
GMT
03 · Tutorial · 5 min read

Working with Formulas

Switching fractals, parameters A–F, and saving scenes you love.

What's a fractal formula?

A fractal formula is an iteration rule. For every point in 3D space, the rule is applied over and over — typically dozens of times — asking a simple question at each step: does this point stay put, or does it fly off to infinity? The boundary between those two outcomes is the fractal.

The Mandelbulb's rule is roughly "raise the point to the 8th power in spherical coordinates, then add a constant." The Mandelbox's rule is "fold space in on itself, then scale it outward." The Menger Sponge's is "repeatedly cut away the middle of every cube." Each rule is just a few lines of math, but iterated, they carve out structures with infinite detail.

GMT ships with 40+ built-in rules and you can import hundreds more through the Formula Workshop.

Switching formulas

Open the Formula tab in the right dock and click the dropdown at the top. A gallery opens with thumbnail previews, grouped by category:

  • Featured Fractals — Mandelbulbs and other power-based classics
  • Geometric & Folding — box folds, sponges, polyhedra, IFS fractals
  • Hybrids & Experiments — unusual combinations of folds and power functions
  • Systems — the Modular node-graph builder (covered in its own tutorial)

Click any thumbnail to load that formula with its default preset.

Parameters A–F

Every formula exposes up to six named parameters — A, B, C, D, E, F. Each one maps to a mathematical constant inside the shader, and dragging it dramatically changes the shape.

For the Mandelbulb, A is usually the power (default 8 — the classic "Mandelbulb" shape). Push it higher for more tentacles, lower for softer organic forms. Try values between 2 and 14 to see the full range.

  • Drag the slider to sweep through values
  • Right-click the slider for a menu: reset to default, copy the current value, keyframe it, or jump to its help entry

Presets

Many formulas ship with multiple preset configurations — not just parameters, but camera, lighting, coloring, and fog all tuned to work together. Look for the preset selector below the formula dropdown. Flipping through these is a great way to see what a formula is capable of before tweaking yourself.

Input rotation, constant offset, and Julia mode

Three pre-iteration controls shape the formula from the outside:

  • Local Rotation — rotates the coordinate system before the formula runs. Most impactful on box-folded fractals (Amazing Box, Menger, polyhedra) where the folding planes are axis-aligned: rotating the input makes the folds cut at diagonal angles and produces completely different shapes from the same base rule.
  • Constant offset — adds a fixed vector into the iteration each step. Subtle but powerful — a small offset can pull the whole fractal into a new configuration without changing the formula itself.
  • Julia mode — the iteration normally uses each pixel's own position as the added constant. Flip Julia mode on and every point in space iterates with the same user-chosen constant instead. The result is a Julia-set variant of the formula, which often looks radically different from the base version. Pair with different constant-offset values to explore a whole family of shapes at once.

Saving scenes (the GMF format)

GMT's primary save format is .gmf (GPU Mandelbulb Format). Open System Menu → Save Preset. A .gmf file contains everything:

  • The formula's GLSL shader code (so custom or imported formulas survive)
  • All parameter values
  • Camera position and rotation
  • Every feature's settings: lighting, coloring, quality, fog, animations

To load: System Menu → Load Preset — or just drop the .gmf file onto the app window. You can also drop a .png snapshot onto the window; snapshots have the GMF embedded in their metadata.

GMF files are plain text. You can open one in any text editor and see both the shader code and the scene JSON. They're also AI-editable — you can paste a .gmf into an LLM and ask it to modify the formula.

Sharing via URL

The System Menu → Copy Link option encodes the current scene into a URL. Anyone who opens that link sees exactly your scene. Limits:

  • URLs don't work for Workshop-imported custom formulas — the shader code is too large. Save a .gmf and share that instead.
  • Very long animations may have keyframes auto-stripped to fit; a warning appears when this happens.