.oogoo presets
04 Developers
oolonGoo's own preset format, written in WGSL: named buffers with feedback, compute passes and GPU particles, driven by the audio and a beat, bar and phrase clock.
In development
What it is
A .oogoo preset is a short TOML header, a line ---, then a WGSL body; every preset defines fn image(uv) to draw the picture. One extension covers three shapes: a single text file, a folder with modules and textures for bigger presets, and a zip package to share. The format is version oogoo = 1: new, and it may change.
How it relates to MilkDrop
.oogoo runs on its own engine beside the MilkDrop engine in oolonGoo, on the same GPU, and your .milk and .milk2 presets keep playing as before. It keeps MilkDrop's audio variables by name, fed by the same audio analysis, its noise textures, the previous frame and its blur chain, and MilkDrop's warp equations as one function call, worked out at every pixel rather than on a mesh.
What you can build
- Buffers with memory. Named buffers, 16-bit float by default, each keeping up to three previous frames for feedback, trails and simulations.
- Passes and loops. Fragment and compute passes that run every frame or on the beat, downbeat or phrase, and
[[loop]]groups repeated up to 256 times a frame for solvers such as reaction-diffusion. - GPU particles. You write them as a compute pass and an instanced draw, and
og::particleshelps with spawning, curl-noise flow, integration, wrap and bounce: the Ember Swarm example runs 65,536. - Audio and the music clock.
bass,midandtrebwith their_attversions, a level and hits for each band, and a beat, bar and phrase clock. - Audio textures. The spectrum, the waveform and a level trail holding each band's level over the last 256 frames.
- A standard library.
og::noise,og::sdf,og::camera,og::march,og::volume,og::color,og::warp,og::particles,og::blurandog::shadertoy: noise, shapes, cameras, ray marching, volumetric smoke, colour, warps, particles, blur, and Shadertoy-style names for porting by hand. - Params and quality tiers.
[[param]]knobs (slider,toggle,color,xy,dropdown,bang) that--paramsets, andog.qualityof 1.0, 0.7 or 0.4 at the Ultra, High and Performance tiers for scaling step counts.
Tools for authors
- Errors that point at the line. Each one names the file and line (shader errors add the column), with a hint when there is a usual cause.
- Lint without a GPU.
oolongoo oogoo lintchecks the header, passes and WGSL, and works out every expression at every quality tier. - Hot reload.
oolongoo oogoo playlistens to your system audio and reloads the preset each time you save; N and P step through a folder, 1, 2 and 3 switch tiers, and T shows pass timings. - The assembled shader.
oolongoo oogoo wgslprints the assembled WGSL module, andoogoo stdliblists the library. - Packages.
oolongoo packbuilds the zip package from a preset's folder and its textures, andunpackmakes the folder again.
A whole preset
In Ink Trails, the trail buffer keeps one previous frame. fn trail reads it through the warp, fades it and paints the waveform on top, and image tone-maps the result. That is the whole preset.
oogoo = 1
name = "Ink Trails"
author = "oolonGoo"
description = "MilkDrop-style feedback: the waveform painted into a warped, decaying trail."
[[buffer]]
name = "trail"
history = 1
---
#import og::warp
#import og::color
// A buffer named `trail` is produced by `fn trail`; `trail_prev` is last frame's picture.
fn trail(uv: vec2<f32>) -> vec4<f32> {
var w = og_warp_default();
w.zoom = 1.01 + 0.03 * og.bass_att;
w.rot = 0.004 * sin(og.time * 0.3) + 0.01 * (og.mid_att - 1.0);
w.warp = 0.6;
var c = trail_prev(og_warp_uv(uv, w)).rgb * 0.975;
let y = 0.5 + 0.18 * og_waveform(uv.x);
let line = 0.0015 / max(abs(uv.y - y), 0.0008);
let hue = og.time * 0.05 + uv.x * 0.3;
c += og_hsv2rgb(vec3<f32>(hue, 0.8, 1.0)) * line * (0.3 + og.band_level.x);
return vec4<f32>(c, 1.0);
}
fn image(uv: vec2<f32>) -> vec4<f32> {
return vec4<f32>(og_tonemap_aces(trail(uv).rgb * 1.2), 1.0);
}assets/oogoo/examples/01-ink-trails.oogoo, as it ships.Try it
After building from source, from the repository root, with oolongoo on your PATH (a source build leaves it in target/release):
cd assets/oogoo/examplesoolongoo oogoo play 01-ink-trails.oogoo # N and P step through the othersoolongoo oogoo render 01-ink-trails.oogoo --frames 300 --out framesoolongoo oogoo lint 07-slag.oogoooolongoo pack 07-slag.oogoo -o Slag.oogooWhere it stands
Today .oogoo presets play in the live window of oolongoo oogoo play and render headless, checked so far on Windows; the live player has not yet run on macOS or Linux. The desktop app registers the file type and adds opened .oogoo files to its library, but cannot play them yet.
Go further
The ten examples ship with the source, from a ten-line pulse to ray-marched molten iron, in the examples folder. The format specification has the full header reference, the og uniform and the library. The tools' flags are in the command-line reference, and questions from preset authors are welcome on the issue tracker.