glTF + .py

Blender 3D & Game

ForgeLab compiles a natural-language prompt into real Blender scenes two ways: a glTF round-trip (meshes, materials, scene) that Blender imports natively, and a blender_script export — a runnable .py that rebuilds the scene with native Blender objects and modifier stacks, then renders a finished product shot. OBJ (+ .mtl) and STL import are supported too; native .blend export is in progress.

The full workflow

generate_documentpreview_rendercritique_renderpatch_documentexport_document(tool='blender_script')run the .py in Blender → rendered PNG

Modifier stack — describe shapes, let Blender compute them

Objects can carry a Blender modifier stack — an ordered modifiers list of subsurf, bevel, boolean, and solidify entries that the Blender script exporter compiles to native obj.modifiers.new(...) calls (boolean targets are created first via a dependency sort and hidden from render).

Blender's own modifier evaluation computes the real smooth geometry when the script runs, so agents describe organic shapes as primitives + modifiers instead of hand-computing triangles: cube (or cylinder) + subsurf + bevel is the go-to pattern for a smooth rounded shape, and a boolean difference carves indents and cutouts (see examples/threed/organic_handle.forge.json).

Render-critique loop for iterative refinement

Agents can see what they built and fix it without Blender installed or a human checking screenshots. preview_render (the preview extra: matplotlib + numpy, pure pip) renders a document's triangle meshes flat-shaded from three angles into one PNG; critique_render sends that PNG — plus an optional reference image — to the vision model with the design intent and returns structured feedback. ForgeLab provides the primitives; the calling agent drives the loop:

preview_render("car.forge.json", "car.png")
critique_render("car.png", "a low-slung sports car with a long hood")
  -> {"matches_intent": false, "score": 6,
      "issues": [{"severity": "critical",
                  "description": "only three wheels are visible",
                  "likely_cause": "missing rear-left wheel object"}],
      "suggested_changes": ["add a fourth wheel at the rear-left"]}
patch_document(...)          # apply the suggested changes
preview_render(...)          # re-render
critique_render(...)         # re-judge; repeat until the score is acceptable

Previews draw the baked triangle geometry (modifier stacks are evaluated by Blender, so they show the base meshes). Check generation_status first: preview_render needs pip install "forgelab[preview]", and critique_render needs ANTHROPIC_API_KEY plus the agent extra.

blender_script — a finished product shot, not just geometry

export_document(tool='blender_script') writes a runnable .py that rebuilds the scene with native objects and the modifier stack, then sets up a complete product-render pipeline: a daylight-sky world, an 85mm 3/4 camera, a ground plane, and an auto-render to PNG — with a CYCLES / EEVEE PREVIEW toggle for fast iteration.

glTF interchange — Blender and Unreal

The glTF round-trip covers meshes, materials, and scene. Translucent materials (base-color alpha < 1) export alphaMode: "BLEND" — an earlier version silently exported glass and water as fully opaque because alphaMode was never set; fixed and confirmed by re-importing the exported file.

Unreal Engine needs no dedicated exporter: it natively imports glTF, so export_document(tool='gltf') and drag the .gltf into the Content Browser.

Built with Blender

Renders and screenshots coming soon — each slot says exactly what it will show.

A modern cottage

blender_script → runnable .pyAuto-rendered PNG

Design a wireless temperature sensor with ESP32, DHT22, USB-C power, and a 3D-printable enclosure

Part of a .forge.projectProduct-render pipeline

Install in 30 seconds

One installer covers all three domains — hardware, mechanical, and 3D. Hermes and OpenClaw setup prompts are on the home page.

Claude CodeThat's it. Ask Claude Code to design anything.
$ curl -fsSL https://raw.githubusercontent.com/andresparraarze/ForgeLab/main/scripts/install-claude-code.sh | bash
Codex CLIRun /mcp inside a Codex session to confirm ForgeLab's tools are listed.
$ curl -fsSL https://raw.githubusercontent.com/andresparraarze/ForgeLab/main/scripts/install-codex.sh | bash