Custom Formulas & the Workshop
Loading Fragmentarium .frag files and custom GLSL.
Why the Workshop?
The built-in formula library has 40+ shapes, but the fractal community has been publishing new distance estimators for years. GMT's Formula Workshop is a library of hundreds of community fractals from:
- Fragmentarium — a classic 3D fractal environment with a massive example library
- Distance Estimator Compendium (DEC) — Jon Baker's curated catalogue of distance estimators
The Workshop converts them on the fly into formulas GMT can render.
Opening the Workshop
Open the Formula dropdown in the right dock and choose Formula Workshop (or use the System Menu shortcut). A dedicated window opens with a code editor and a formula library.
Finding a formula
- Search — type a name, artist, or tag in the search bar
- Browse — click the Frag or DEC filter buttons to narrow by source
- Surprise me — the two dice buttons pick a random formula
Click any result to load it. The viewport updates immediately.
Badge colors — what they mean
Each formula in the library has a small colored badge indicating how it will render:
- Green "Iteration" — the formula runs as a single step inside GMT's main iteration loop. This is the richer mode — you can combine it with engine folds (hybrid box fold, sphere fold) and even interlace it with another formula for hybrid fractals.
- Cyan "Standalone" — the formula is a self-contained distance estimator that runs as one unit. Renders correctly on its own but can't be interlaced or mixed with engine folds.
If you're just exploring, either badge renders fine. The distinction matters when you want to build hybrid or layered fractals.
Custom imports
Two ways to bring in your own formula:
- Paste a
.fragor GLSL source directly into the Workshop's code editor - Drop a
.fragfile onto the Workshop window
GMT auto-detects the formula's signature and maps its parameters to on-screen A–F sliders so you can tweak them like a built-in. If the detection fails, the editor shows warnings — usually a name mismatch or a missing standard function.
The Mode selector (Auto / Iteration / Standalone)
At the bottom of the Workshop is a Mode selector. Leave it on Auto — GMT picks the right rendering path per formula automatically.
Force a specific mode only if you're debugging why a formula doesn't render as expected. Iteration mode is stricter about formula shape; if Auto picks Standalone but you want Iteration, there's usually a reason (the formula doesn't emit a per-step z update that GMT can hook).
The Show Broken toggle
By default, formulas that can't render in either mode are hidden. The Show Broken toggle reveals them — useful if you're a formula author debugging compatibility or curious what doesn't work yet.
Saving imported formulas
When you save a scene with an imported formula, GMT embeds the full GLSL in the .gmf file. Load that file anywhere — the custom formula comes with it. This is why .gmf files work even for formulas that aren't built into the app.
Where to find more
- 3Dickulus's Fragmentarium Examples — the original source for most Frag formulas in the Workshop
- Jon Baker's Distance Estimator Compendium — technical writeups of the algorithms behind the DEC library
- r/GMT_fractals — the community shares new formulas and techniques