Blender Simulation

The Blender simulation surface lives in components/blender-simulation and is intentionally separate from the SOP converter pipeline. The converter still writes JSON artifacts such as 04-requirements.json; the Blender component consumes those artifacts only when a caller explicitly imports it.

Python Engine

Install the standalone Python engine when you want Blender script generation or rendering:

python -m pip install -e components/blender-simulation/py-engine

Then call the component wrapper from TypeScript. The Node.js layer only builds CLI arguments, starts the Python module, and parses structured JSON errors from stderr:

import { runBlenderSimulation } from "./components/blender-simulation/src/index.js";

await runBlenderSimulation({
  requirementsPath: "out/04-requirements.json",
  scriptOut: "out/blender-simulation.py",
  render: {
    outputPath: "out/e2e_blender_simulation.mp4",
    fps: 12,
    resolution: { x: 320, y: 240 }
  }
});

You can also use the component CLI wrapper:

npx tsx components/blender-simulation/scripts/run-simulation.ts out/04-requirements.json --script-out out/blender-simulation.py --render-output out/e2e_blender_simulation.mp4 --fps 12 --resolution 320x240

The generated Python configures Blender’s own video output, sets image_settings.media_type = 'VIDEO' before image_settings.file_format = 'FFMPEG', configures scene.render.ffmpeg, and calls bpy.ops.render.render(animation=True). The MP4 is written by Blender directly; no external system ffmpeg encode step is required for this path.

Boundary

Do not import Blender code from src/pipeline. Keep Blender rendering, asset layout, animation macros, and native video output inside components/blender-simulation/py-engine so the original CLI converter remains focused on SOP-to-requirements conversion.