imaginu
An AI-drivable procedural 3D asset compiler. JSON recipes โ deterministic, game-ready GLB for Babylon.js - meshes, PBR vertex colors, skeletal animation, and physics metadata. No textures to wrangle, no C dependencies, byte-identical every time.
๐ Live site & Babylon viewer ยท ๐ Docs ยท ๐ค Use it with your AI agent
What & why
imaginu compiles a small JSON recipe into a .glb asset you can drop
straight into a Babylon.js scene. It exists because describing an asset is far
cheaper than modeling one - especially for an AI agent, which can write a
recipe, look at a render, and iterate, all without a DCC tool.
LLMs are great at structured parameters and terrible at raw vertex data. imaginu is the bridge: the agent decides what ("a windswept autumn oak, seed 42") and imaginu produces the how (a crafted mesh with harmonious colors, correct normals, a skeleton, walk/idle clips, and a collider).
- AI-native.
imaginu schemaprints the full recipe contract as a cheat-sheet. An agent reads it, writes JSON, and compiles - the skill wires this into Claude Code / Codex. - Vertex-color PBR, no texture pipeline. Color lives in the mesh, so assets
are small, self-contained, and load anywhere glTF loads. (Baked procedural PBR
texture sets are available in the
customDSL when you want them.) - Deterministic. Same recipe + seed โ byte-identical GLB, on every OS. This is what lets worlds tile seamlessly and makes agent output reproducible.
- Zero C dependencies. Pure Rust (
glam,serde,clap,png,rand). Static cross-compilation - including fully static musl - is trivial. - Batteries included. A built-in software renderer lets you look at your output (PNG or MP4 turntable) without a GPU or a running engine.
Install
Prebuilt binary (no Rust needed):
|
With cargo:
From source:
&&
ffmpegon yourPATHis optional - needed only for video (imaginu showcase, world--flyover). Everything else is standalone.
60-second quickstart
# Compile a recipe to GLB and render a PNG to look at:
# The whole recipe contract, any time:
# A rigged, animated character:
# A rigged, animated monster (8 body plans + class presets):
# A themed, navigable dungeon (per-room GLBs + manifest.json + overview.png):
# A multi-phase boss encounter creature (5 archetypes, weak-point metadata):
# A seamless streaming world (manifest.json + one GLB per chunk):
# Verify structure:
Load it in Babylon.js like any glTF - colliders ride along in the extras:
const = await BABYLON.;
const physics = meshes.?.?.?.;
// โ { collider: { type: "capsule", radius, height }, mass, friction, restitution }
Recipe gallery
Each of these is one line of JSON. Full field reference: imaginu schema. A
boss is a multi-part, multi-phase, weak-point-tagged encounter creature (5
archetypes: hydra/colossus/lich/swarm_queen/dragon_lord) that places into
dungeon boss rooms and world POIs.
| Recipe | Result |
|---|---|
{"kind":"tree","style":"oak"} |
|
{"kind":"terrain","shape":"canyon"} |
|
{"kind":"terrain","shape":"mesa"} |
|
{"kind":"crystal","palette":"mystic"} |
|
{"kind":"character","class":"mage"} |
|
{"kind":"monster","body":"wyrm","class":"elemental"} |
|
{"kind":"monster","body":"arachnid","palette":"necrotic","eyes":6} |
|
{"kind":"monster","body":"aberration","class":"aberration"} |
|
{"kind":"dungeon","type":"crypt","size":"medium"} |
|
{"kind":"dungeon","type":"cavern","size":"medium"} |
|
{"kind":"boss","archetype":"hydra","element":"infernal"} |
|
{"kind":"boss","archetype":"lich","element":"necrotic"} |
|
{"kind":"boss","archetype":"colossus","element":"volcanic"} |
|
{"kind":"boss","archetype":"swarm_queen","element":"fungal"} |
|
{"kind":"boss","archetype":"dragon_lord","element":"arctic"} |
|
{"kind":"prop","prop":"barrel"} |
Whole worlds, too - Voronoi biome zones, traced rivers, A*-routed roads, and a POI solver placing cities/castles/dungeons, all seamless across chunk borders:
See the live site for these GLBs
running in a real Babylon.js viewer, plus looping video showcases. Recipes for
everything above live in gallery/recipes/ and
examples/.
๐ค Use it with your AI agent
imaginu ships a first-class agent skill so Claude Code or Codex can go from "make me a 3D oak tree" to a loadable GLB on its own - write recipe โ generate โ look at the PNG โ iterate.
# Claude Code:
See skill/imaginu/SKILL.md for the workflow and Codex
install instructions. The skill stays DRY against imaginu schema - the schema
command is the reference, the skill is the workflow.
Determinism & the seam law
Generation is a pure function of (recipe, seed). Two consequences you can rely
on:
- Reproducible output - the same recipe yields a byte-identical GLB anywhere. CI enforces this on every push (generate twice, diff bytes, on both Linux and macOS to guard a known platform float heisenbug).
- The seam law - terrain heights and colors are pure functions of world
coordinates, so adjacent world chunks share bit-identical edges and tile
with no cracks. Any chunk builds lazily (
--chunk x,z) or in parallel with identical output. This is what makes streaming worlds possible.
Architecture
Pure-Rust library (src/lib.rs) + CLI (src/main.rs), cleanly modular:
| Area | Modules |
|---|---|
| Recipes & errors | recipe, error |
| Generators | generators/{terrain,tree,rock,crystal,building,prop,character,custom} |
| Geometry | mesh, sdf, csg, subdiv, uv, noise |
| Rigging & animation | skinning, anim |
| Materials | palette, texture |
| Export & checking | gltf, validate, render |
| Worlds | world/{chunk,zones,erosion,network,poi,manifest,minimap,overview,model} |
Library entry points: imaginu::compile(recipe_json) and
imaginu::compile_to_glb(recipe_json), both returning Result<_, imaginu::Error>
- the public boundary returns errors instead of panicking on malformed JSON.
CLI reference
| Command | What it does |
|---|---|
generate |
Compile a recipe to a GLB (--preview for a PNG, --lods N for LODs) |
render |
Turntable PNGs, or animation frames with --animation <clip> |
showcase |
Loop-perfect turntable MP4 (needs ffmpeg) |
world |
Compile a world recipe to a chunk directory + manifest.json |
schema |
Print the full recipe cheat-sheet (the agent contract) |
validate / validate-world |
Byte-level structural validation |
Contributing
See CONTRIBUTING.md. The two rules: determinism is sacred
and render and look before claiming visual quality. cargo fmt --check,
cargo clippy --all-targets -- -D warnings, and cargo test must all be clean.
Changelog: CHANGELOG.md.
License
MIT ยฉ 2026 Victor Bona.