---
name: blender
description: Make your own 3D footage, stills and frame sequences with Blender, run headless from the shell (`blender -b -P script.py`), for Claude Code, Codex or Cursor. Use when a page, hero, ad or video needs a rendered 3D object, a sculptural loop, a scroll-scrubbed frame sequence, a product shot, or when someone says "Blender", "render this in 3D", "make our own footage" or "3D loop".
metadata:
  license: AGPL-3.0-or-later
  copyright: "2026 DevTribe Labs"
  homepage: https://github.com/DevDadTribe/toolbox
---

# Blender, headless

Blender is free and open source. On a Mac install it with `brew install --cask blender`; on
Windows and Linux use the installer from blender.org. Put the `blender` command on your PATH.

## Check it first

```bash
blender -b --python-expr "import bpy; print('PY_OK', bpy.app.version_string)" 2>&1 | grep PY_OK
```

Missing on a Mac: `brew install --cask blender`. Update: `brew upgrade --cask blender`.

## How to use it

- Always headless: `blender -b -P scene.py -- --out /tmp/job/frames --frames 1-120`. Never open the
  app window from an agent. Arguments after `--` reach the script through `sys.argv`.
- Build the whole scene in Python (`bpy`): objects, materials, lights, camera, animation. Keep the
  script in the project (for example `scripts/blender/<shot>.py`) so the render can be redone; the
  rendered frames are output, not source.
- Engine: `EEVEE` (`BLENDER_EEVEE_NEXT` in 4.2+; read `bpy.app.version` and pick the enum that
  exists) for fast looks; `CYCLES` with `device='GPU'` and Metal for glass, caustics and soft
  light. Start at 32 to 64 samples with denoise on; raise only if the frame shows noise.
- Test one frame at low size before the full run (`--frames 1 --scale 0.25`). A 120-frame Cycles run
  can take many minutes: run it in the background and wait on it, never in a blocking loop.
- Web output: render PNG, then encode. Frame sequences for scroll-scrub templates: WebP at quality
  80 with `cwebp` or PIL, 1600 to 1920 wide on desktop and a 900-wide set for phones. Loops:
  `ffmpeg -framerate 30 -i f_%04d.png -c:v libx264 -crf 20 -pix_fmt yuv420p -movflags +faststart`
  plus a VP9 or AV1 WebM. Keep a poster frame for reduced motion and slow networks.
- Lighting and materials for realistic objects: read `product-studio-lighting` first (softbox
  reflections, rim light, ground shadow).
- Look at the result yourself before showing anyone. A render you did not look at is not checked.

## Taste rules

- Abstract and sculptural for client sites: light, glass, fabric, metal, smoke, fire. No people,
  bodies or faces made in 3D. Real photos of the client come from the client.
- Use the project's DESIGN.md colours in the materials and lights, by hex.
- Short and seamless: loops close on their first frame; scroll sequences end on a still that can hold.
