Skip to main content

Moraine

English | 日本語

observatory with its dome open and a telescope star chart room inside the observatory dune buggy with its front wheels turned lake diorama

Moraine is an AI-native procedural modeling tool for real-time 3D assets. It lets you build, refine, and extend 3D assets together with an AI agent — the agent writes the recipe, tests verify your declared requirements, you decide what they become.

Tell your agent what you want to build, not how to model it. Point at a part in the viewer and ask for a change, explore variations, or reuse the asset in something larger. Moraine handles the geometry and verifies your declared requirements as the asset evolves, so you can keep building on what you've made instead of starting over.

▶ Watch the 2-minute demo, with Claude Code as the agent

demo video thumbnail: a small pier deck growing into a long pier with a roofed shelter

the roles of the human, the AI agent, and Moraine, and what passes between them: requests and responses, recipes and reports, interactions and the 3D view

Build, Refine, Extend

Build

You describe what you want to build and what must hold, and the agent writes the recipe: a script in Starlark, a Python dialect, that defines a graph of operations such as primitives, cuts, arrays, placements, and materials. Your declared requirements, dimensions and contacts among them, are kept in a separate, human-owned file. The tool generates the geometry, verifies the requirements, and feeds the result back. The agent edits the recipe until every requirement passes, and you judge the result in the viewer. The modular spaceship corridor below is one module placed five times, with pipes, light fixtures, lockers, and roof equipment. The tool verifies its two declared requirements: a clear bore width of 2.0 meters and height of 2.4 meters.

a modular spaceship corridor, five modules, seen into its open end

The recipe, as the agent writes it. No hand editing needed. This excerpt creates and places the corridor's deck.

deck_box = mo.box(
    id = "deck_box",
    size = [
        BORE_W - 2 * (RIB_DEPTH + DECK_GAP),
        DECK_T,
        MODULE_LEN - 2 * DECK_END_GAP,
    ],
)
deck_on_floor = mo.place(
    hull_floor, deck_box,
    id = "deck_on_floor",
    anchor = "bore_floor",
    mode = "on_top",
)

Refine

Most of the work is refinement, and you can direct it from the viewer. Pin the spot you want to work on and tell the agent what should change there. The agent reads the pinned part and updates the recipe where that part is defined. After the change, the tool still verifies the requirements, and you inspect the updated model and decide whether to accept it. Below, the human pinned one of the roof equipment boxes and said what to do with it. Parameters you want in your own hands go on a panel in the viewer. Drag the deck's roughness, reroll a wear seed, or step the locker count. The Accept button makes your pick part of the asset, and the tool verifies the requirements again under the value you chose.

the corridor in the viewer, a plain equipment box on the roof pinned the same view, a fan grille set into every equipment box
Before: a plain equipment box, pinned in the viewer. The request: add vents or a grille to it, in a metal material. After: a fan grille set into every box, with louvers on the sides. The same camera view.

Extend

A finished asset becomes a building block for the next. You can reuse a part by reference and override the knobs it exposes, so one part yields a family of variants. Its declared requirements travel with it. You can also declare requirements for how the parts connect, and the tool verifies them alongside the original requirements. The pressurized hub below grows three arms from the corridor, each with its own locker count, equipment, and wear. The bore width and height requirements carry into every arm. New requirements are verified where each arm docks into the hub: that the shell seats on its port and the decks meet at the threshold.

a pressurized hub with three corridors, seen from above, each arm with a different number of roof equipment units from inside the hub, the port where one arm docks: the corridor continues beyond it, its deck meeting the hub deck at the threshold
The hub: one corridor, reused three times by reference, each arm with knob values of its own. The grilles added during refinement appear on every arm. Where an arm docks into the hub, seen from inside. The new requirements at this joint are verified alongside those carried from the corridor.

Journal: The agent keeps a journal for each project, recording why design choices were made, which variants you rejected, and the corrections you made. The agent reads the journal before working, so your earlier decisions shape the next round, and future sessions or colleagues can continue the work instead of starting over. The corridor's journal records why the bore is 2.0 m wide — to let two people pass — and why the first grille design was rejected: it more than doubled the triangle count, so the agent proposed four simpler alternatives and the human chose one larger fan.

Rendering with a path tracer

Finished assets export as glTF 2.0 with materials and instancing preserved.

These images were rendered with a path tracer from the exported files of the assets above, with the agent-authored materials, normal maps, and emissive surfaces intact.

inside the pressurized hub, path traced: the glazed roof, the light ring, two corridor arms

Inside the hub: the glazed roof, the light ring, and two of the arms.

the lake diorama, path traced: the rock wall and the conifers reflected in the water

The lake diorama: the rock wall and the conifers reflected in the water.

Get started

You need:

  • An AI coding agent that can edit files and run commands in a terminal, such as Claude Code or Codex.
    • Any such agent works, and Moraine itself calls no model.
  • Windows, or macOS on Apple silicon, with Python 3.12 or later.
    • Every dependency ships as a binary wheel, so there is nothing to compile.

Install Moraine once and use it from every workspace:

uv tool install moraine3d
moraine init my-workspace
cd my-workspace

init scaffolds a workspace with AGENTS.md for your rules and the authoring guide for the agent. AGENTS.md ships in English and is yours: ask the agent to translate it, and write your rules in your own language. The authoring guide for the agent remains in English. Open the workspace in your agent, then follow the tour to build your first asset, from a short request to a glTF export.

The shipped skill can do this setup for you:

  • Claude Code: run /plugin marketplace add ms-elk/moraine, then /plugin install moraine@moraine.
  • Codex: run codex plugin marketplace add ms-elk/moraine, then codex plugin add moraine@moraine.

In a new session, ask your agent to set up Moraine in the directory you want the workspace in.

To upgrade Moraine:

uv tool upgrade moraine3d
moraine init          # at the root of each workspace

init updates the workspace's copy of the authoring guide and leaves AGENTS.md and your assets as they are. With the skill, you can ask your agent to upgrade Moraine instead.

Sample workspace

ms-elk/moraine-sample-workspace is a complete Moraine workspace built around a railway station scene assembled from reusable assets. It includes the recipes, the human-defined requirements, journals, and requests, with one commit per round documenting how the kit was built and refined.

Explore the assets in the viewer, then ask your agent for a change. Moraine verifies the result against the declared requirements.

Documentation

Document What it covers
Tour Your first asset, from a request to a glTF export
Examples Shipped examples, from a single box to textured buildings and scatter fields
Reference The asset format, the operators and assertions, the CLI, the journal
Agent guide What the agent reads before authoring
DESIGN Moraine's design document

License

Apache-2.0. See LICENSE. Bundled third-party software is listed in THIRD_PARTY_NOTICES.md.

The Moraine logo is licensed under CC BY-ND 4.0.

Metadata

Release files for moraine3d 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for moraine3d 0.3.0
File Size Uploaded Provenance Actions
moraine3d-0.3.0.tar.gz 1.3 MB With provenance Details for moraine3d-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for moraine3d 0.3.0
File Interpreter ABI Platform Actions
moraine3d-0.3.0-py3-none-any.whl Python 3 none any Details for moraine3d-0.3.0-py3-none-any.whl

Total release size: 2.3 MB

Release files / moraine3d-0.3.0.tar.gz

Download URL moraine3d-0.3.0.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
9c70fa7e2fc1690debad011ab273511bb7664de0bf47c74d599d5d6f4cd2e557
BLAKE2b-256 checksum
How to use checksums
c176e5d01467ae1fa62d8efb8edced9cd52c20f21cdafd4ffe8ddb0fd635579c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / moraine3d-0.3.0-py3-none-any.whl

Download URL moraine3d-0.3.0-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c1c61c9a55c15ae5bd6672d61c98169f6843a57a10443e825fd2536469cae292
BLAKE2b-256 checksum
How to use checksums
b98625e208a17cf7e8cf135e3012a9c8bf88029eb03d45c416842cc2a8ba232c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for moraine3d 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for moraine3d-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page