git:20260827.bc00d24 to git:20261010.b1a4c83

86 added, 78 removed. Audit A to A.

---
name: godmode-3d-creation
description: "Use when generating 3D meshes, executing text-to-CAD, or reconstructing scenes via TRELLIS, TripoSR, or Text-to-CAD local engines."
category: media-eventtech
---
- # 🧊 Godmode 3D Creation: MCP-First 3D Pipeline
+ # 🧊 Godmode 3D Creation: CLI-First & Local Engine 3D Pipeline
- You are the Mastermind for all 3D generation, modeling, and CAD workflows within the BDB Creator OS. This skill operates on an **MCP-First paradigm**, converting natural language prompts, concept images, or technical specifications into explicit JSON tool call payloads for 3D asset generation engines.
+ You are the Mastermind for all 3D generation, modeling, and CAD workflows within the BDB Creator OS. This skill operates on a **CLI-First and Real-MCP paradigm**, converting natural language prompts, concept images, or technical specifications into concrete terminal execution commands for local 3D engines, coupled with verified ecosystem MCP servers (Rhino, TouchDesigner, Unreal).
---
## 1. Engine & Local Backend Architecture
The core local 3D generation backends are hosted within the Creator Extension:
`bdb-dev-creator-extension/engines/3d/`
### Primary Engines & Local Modules:
+ * **TripoSR** (`engines/3d/triposr`): Ultra-fast single-image 3D reconstruction for rapid mesh prototyping (under 0.5s on CUDA, CPU-capable).
* **TRELLIS** (`engines/3d/trellis`): High-fidelity Image-to-3D generation producing 3D Gaussian Splats, textured UV meshes, and radiance fields.
- * **TripoSR** (`engines/3d/triposr`): Ultra-fast single-image 3D reconstruction for rapid mesh prototyping (under 0.5s execution time).
- * **Text-to-CAD** (`engines/3d/text-to-cad`): Parametric engineering modeling producing precise STEP, IGES, or B-Rep CAD files.
+ * **Text-to-CAD** (`engines/3d/text-to-cad`): Parametric engineering modeling using `build123d` and `cadpy` compiling to precise STEP, GLB, and STL files.
---
- ## 2. Concrete MCP Tool Call Specifications
+ ## 2. Concrete CLI Execution Specifications
- When executing 3D workflows, construct valid JSON payloads for the targeted MCP servers.
+ When executing 3D workflows, run concrete terminal commands directly against the local Python engines.
- ### A. TRELLIS MCP (`trellis_mcp`)
- Use `generate_3d_model` for high-quality Image-to-3D mesh generation, Gaussian Splats, and PBR textures.
+ ### A. TripoSR CLI (`engines/3d/triposr`)
+ Use `run.py` for instant single-image 3D mesh reconstruction for draft viewports, layout blocking, or real-time performance proxies.
- ```json
- {
- "tool": "generate_3d_model",
- "server": "trellis_mcp",
- "arguments": {
- "image_path": "./assets/concepts/hero_prop_concept.png",
- "output_format": "glb",
- "ss_sampling_steps": 12,
- "slat_sampling_steps": 12,
- "mesh_simplify": 0.95,
- "texture_size": 2048,
- "generate_color": true,
- "generate_normal": true,
- "output_dir": "./projects/stage_assets/models/"
- }
- }
+ ```bash
+ # High-quality GLB export with baked texture:
+ python engines/3d/triposr/run.py <image_path> --output-dir <output_dir> --model-save-format glb --bake-texture
+
+ # Rapid mesh generation (OBJ with vertex colors, <0.5s on CUDA):
+ python engines/3d/triposr/run.py <image_path> --output-dir <output_dir> --mc-resolution 256
+
+ # Hardware Fallback: CPU mode (when CUDA GPU is unavailable):
+ python engines/3d/triposr/run.py <image_path> --output-dir <output_dir> --model-save-format glb --bake-texture --device cpu
```
- ### B. TripoSR MCP (`triposr_mcp`)
- Use `rapid_mesh_generation` for instant single-image 3D mesh reconstruction intended for draft viewports or real-time performance proxies.
+ ### B. TRELLIS CLI (`engines/3d/trellis`)
+ Use `example.py` for high-quality Image-to-3D generation producing PBR textured meshes, radiance fields, and Gaussian Splats.
- ```json
- {
- "tool": "rapid_mesh_generation",
- "server": "triposr_mcp",
- "arguments": {
- "image_path": "./assets/concepts/quick_chair_sketch.png",
- "output_format": "obj",
- "mc_resolution": 256,
- "foreground_ratio": 0.85,
- "bake_texture": true,
- "output_path": "./projects/stage_assets/proxies/chair_proxy.obj"
- }
- }
+ ```bash
+ # High-fidelity Image-to-3D GLB generation:
+ python engines/3d/trellis/example.py --image <image_path> --output <output_dir/model.glb>
+
+ # Direct pipeline execution with custom parameters:
+ python -c "from PIL import Image; from trellis.pipelines import TrellisImageTo3DPipeline; from trellis.utils import postprocessing_utils; pipeline = TrellisImageTo3DPipeline.from_pretrained('microsoft/TRELLIS-image-large').cuda(); outputs = pipeline.run(Image.open('<image_path>')); glb = postprocessing_utils.to_glb(outputs['gaussian'][0], outputs['mesh'][0], simplify=0.95, texture_size=2048); glb.export('<output_dir/model.glb>')"
```
- ### C. Text-to-CAD MCP (`text_to_cad_mcp`)
- Use `generate_parametric_cad` to build precise CAD geometries, engineering parts, or architectural structures from textual dimensions and constraints.
+ ### C. Text-to-CAD CLI (`engines/3d/text-to-cad`)
+ Generate parametric CAD geometries and mechanical parts using `build123d` python scripts and the `step` compilation CLI.
- ```json
- {
- "tool": "generate_parametric_cad",
- "server": "text_to_cad_mcp",
- "arguments": {
- "prompt": "Aluminum stage truss mounting bracket with 50mm clamp holes and 5mm chamfered edges",
- "file_format": "step",
- "unit": "mm",
- "tolerance": 0.01,
- "output_dir": "./projects/stage_assets/cad/"
- }
- }
+ ```bash
+ # Step 1: Write parametric build123d script (<generator.py>):
+ # e.g., define geometry with build123d and export or pass to compiler
+
+ # Step 2: Compile generator script to STEP and GLB:
+ python engines/3d/text-to-cad/skills/cad/scripts/step <generator.py> -o <model.step> --glb <model.glb>
+
+ # Step 3: Inspect geometry facts and bounding planes (optional QA):
+ python engines/3d/text-to-cad/skills/cad/scripts/inspect refs <model.step> --facts --planes
```
---
- ## 3. Workflow Routing Logic
+ ## 3. Workflow Routing & Decision Flow
- Select the appropriate MCP tool based on input type and target use case:
+ Select the appropriate engine and command pipeline based on input fidelity and hardware availability:
- 1. **High-Fidelity Visual Props & Assets:**
- - Route concept image to `trellis_mcp` (`generate_3d_model`).
- - Output: `.glb` / `.gltf` with full PBR textures for Unreal Engine or TouchDesigner.
- 2. **Rapid Real-Time Proxies / Draft Meshes:**
- - Route quick sketch or photo to `triposr_mcp` (`rapid_mesh_generation`).
- - Output: Lightweight `.obj` for immediate stage layout placement.
+ 1. **Rapid Real-Time Proxies / Draft Meshes (<1s):**
+ - **Input:** Concept sketch, photo, or transparent PNG.
+ - **Primary Command:** TripoSR CLI (`python engines/3d/triposr/run.py <image_path> --output-dir <output_dir> --model-save-format glb --bake-texture`).
+ - **Output:** Lightweight `.glb` or `.obj` for immediate stage placement.
+
+ 2. **High-Fidelity Visual Props & Hero Assets:**
+ - **Input:** Refined visual concept image.
+ - **Primary Command:** TRELLIS CLI (`python engines/3d/trellis/example.py --image <image_path> --output <output_dir/model.glb>`).
+ - **Output:** PBR-textured `.glb` with UV maps for Unreal Engine or TouchDesigner.
+
3. **Parametric Engineering & Mechanical Parts:**
- - Route geometric specs to `text_to_cad_mcp` (`generate_parametric_cad`).
- - Output: Precise `.step` file suitable for Rhino NURBS editing or CNC fabrication.
+ - **Input:** Dimensioned engineering constraints or geometric specifications.
+ - **Primary Command:** Author Python `build123d` generator, then compile with `python engines/3d/text-to-cad/skills/cad/scripts/step <generator.py> -o <model.step> --glb <model.glb>`.
+ - **Output:** Valid `.step` CAD model and companion `.glb`.
+ ---
+ ## 4. Hardware Constraints & Resilient Fallback Matrix
+
+ Execute directly via verified fallback mechanisms when hardware constraints or specific geometry requirements dictate:
+
+ 1. **CUDA Acceleration Unavailable (CPU-Only Environments):**
+ - **TripoSR:** Run with `--device cpu`:
+ `python engines/3d/triposr/run.py <image_path> --output-dir <output_dir> --model-save-format glb --bake-texture --device cpu`
+ - **TRELLIS:** TRELLIS requires CUDA for local inference. If CUDA is absent or VRAM is under 16GB, route to ComfyUI 3D diffusion workflow on port 8188 via `comfyui-mcp` or use an external cloud inference API endpoint.
+
+ 2. **Parametric CAD & Complex NURBS Modeling:**
+ - **Primary Fallback:** If `build123d` is unsuitable for complex freeform surfaces, use **`bdb_rhino_mcp_fallback`** (Rhino Grasshopper solvers, NURBS surfaces, curves, boolean operations, STEP/IGES export).
+
+ 3. **High-Fidelity Scene Assembly & Spatial Staging:**
+ - Use real ecosystem MCPs: **`bdb_unreal_mcp`** or **`bdb_td_minddesigner`** (`create_3d_scene`, `create_point_cloud`) to arrange, light, and render generated 3D assets in real time.
+
+ ---
+
## Overview
- Godmode 3D Creation translates user prompts and concept images into explicit MCP tool payloads for local 3D engines like TRELLIS, TripoSR, and Text-to-CAD.
+ Godmode 3D Creation generates 3D assets, meshes, and CAD models using local Python CLI engines (TripoSR, TRELLIS, Text-to-CAD) and verified ecosystem MCP servers (Rhino, TouchDesigner, Unreal).
## When to Use
- - **Trigger:** The user asks to generate a 3D mesh, create a 3D Gaussian Splat, or construct a parametric CAD file.
- - **Exclude:** Do not use for creating 2D video timelines or live show topologies.
+ - **Trigger:** The user asks to generate a 3D mesh, create a 3D model from an image, or construct a parametric CAD file.
+ - **Exclude:** Do not use for 2D video editing or live show timeline control.
## Core Process
1. Identify the input type (sketch/photo for TripoSR, high-fidelity concept for TRELLIS, or dimensional specs for Text-to-CAD).
- 2. Construct the exact JSON payload for the target MCP server (`trellis_mcp`, `triposr_mcp`, or `text_to_cad_mcp`).
- 3. Call the MCP tool and save the resulting `.glb`, `.obj`, or `.step` file to the project directory.
+ 2. Check hardware availability (CUDA vs. CPU) and select the corresponding CLI invocation or fallback route.
+ 3. Execute the CLI command and verify the generated `.glb`, `.obj`, or `.step` output file on disk.
## Common Rationalizations
| Rationalization | Reality |
|---|---|
- | "I'll use TRELLIS for this quick draft." | TRELLIS takes time and resources; use TripoSR for sub-second rapid mesh generation instead. |
- | "I'll just guess the Text-to-CAD dimensions." | Parametric CAD requires strict units and tolerances; guessing leads to broken assemblies. |
- | "It previewed fine as an OBJ, we don't need textures." | High-fidelity assets require PBR textures and UV mapping; OBJ alone is insufficient for hero props. |
+ | "I'll use TRELLIS for this quick draft." | TRELLIS requires substantial VRAM and execution time; use TripoSR for rapid mesh generation. |
+ | "I'll just guess the Text-to-CAD dimensions." | Parametric CAD requires strict units and tolerances; write precise `build123d` code with explicit millimeters. |
+ | "It previewed fine as an OBJ, we don't need textures." | High-fidelity assets require PBR textures and UV mapping; use `--bake-texture` with GLB export. |
+ | "CUDA is missing, so 3D generation is impossible." | TripoSR supports `--device cpu`, and CAD generation via `build123d`/`step` requires no GPU. |
## Red Flags
- - Calling `trellis_mcp` for a rough layout proxy instead of `triposr_mcp`.
- - Passing vague natural language directly to Text-to-CAD without explicit millimeter dimensions.
- - Failing to check the output file existence after MCP tool execution.
+ - Constructing fictitious JSON payloads for nonexistent MCP servers instead of running CLI commands.
+ - Failing to pass `--device cpu` when running TripoSR on non-CUDA systems.
+ - Passing vague natural language directly to Text-to-CAD without explicit millimeter dimensions in the generator script.
+ - Failing to check that the output asset file exists on disk after execution.
## Verification
- - [ ] The correct MCP server was selected based on fidelity requirements.
- - [ ] Tool payload includes correct output format (e.g., `.glb`, `.step`).
- - [ ] The generated 3D asset file exists in the target directory.
-
+ - [ ] CLI execution command targets the correct local engine script.
+ - [ ] Appropriate device mode (`cuda` or `cpu`) is specified.
+ - [ ] Output format (`.glb`, `.obj`, `.step`) matches the target pipeline.
+ - [ ] The generated 3D asset file exists in the target output directory.