Communitygithub.com

martin-martinel/blender-studio

A proven Blender 5.3 production playbook for macOS (Apple Silicon) - driving the live Blender through the blender-mcp add-on (or its raw socket when the MCP tools aren't loaded), headless renders that don't hang, where files may be written, rigging an AI-generated animal/character mesh with numpy skin weights + IK legs, and photoreal product look-dev recipes (crystal glass, liquids with physically tuned absorption, ice, GN condensation droplets, marble, studio product lighting, bokeh). Use for any Blender scene, render, animation or 3D motion piece, alongside blender-core and the other blender-* skills.

What is blender-studio?

blender-studio is a Claude Code agent skill that a proven Blender 5.3 production playbook for macOS (Apple Silicon) - driving the live Blender through the blender-mcp add-on (or its raw socket when the MCP tools aren't loaded), headless renders that don't hang, where files may be written, rigging an AI-generated animal/character mesh with numpy skin weights + IK legs, and photoreal product look-dev recipes (crystal glass, liquids with physically tuned absorption, ice, GN condensation droplets, marble, studio product lighting, bokeh). Use for any Blender scene, render, animation or 3D motion piece, alongside blender-core and the other blender-* skills.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/martin-martinel/claude-skill-atlas/tree/HEAD/bundled/blender-studio

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Blender studio (macOS)

Written and tested on an Apple M4 Mac (10-core GPU, Metal, 16 GB RAM). Blender 5.3 lives at /Applications/Blender.app/Contents/MacOS/Blender (not on PATH). If the user keeps projects on an external drive, ask where and use that folder. Read blender-core for API details; this skill covers what has already been proven to work on a Mac.

1. Pick how to run Blender

SituationUse
User wants to watch / iterate on a sceneLive Blender via the blender MCP tools (execute_blender_code, look)
MCP tools not loaded this session (server added mid-session)scripts/bmcp.py <file.py> — sends code to the add-on socket 127.0.0.1:9876
Animation renders, batch work, heavy scenesHeadless: Blender -b scene.blend -P script.py -- args

Live-Blender rules (learned the hard way):

  • Blender must be frontmost. Commands run on a main-thread timer that stalls while the app is in the background (a build sat queued 10+ min). bmcp.py runs open -a Blender first; do the same before MCP calls if one hangs.
  • If the socket refuses, Blender is closed: open -a Blender (the add-on auto-starts its server).
  • GUI Blender may not be allowed to write to an external drive (macOS privacy permissions). If a save fails, render/save into the session scratchpad, then cp to the project folder. Headless Blender launched from the shell usually can write to the drive.
  • Wrap socket calls in timeout, and check progress (CPU via ps) within a minute of starting anything long.

2. Rendering that doesn't hang

  • Never bpy.ops.render.render(animation=True) headless — it stalled after frame 1 at 0% CPU. Loop frames instead: scripts/render_frames.py (-- <pct> <samples> <prefix> <first> <last>; skips frames that exist, so it resumes). Then ffmpeg -framerate 30 -i prefix_%04d.png -c:v libx264 -crf 16 -pix_fmt yuv420p out.mp4.
  • Measured on an M4: EEVEE 1080p ≈ 4 s/frame (1.5M-tri dog + 500k grass blades); Cycles GPU 1080p glass still, 400 samples adaptive ≈ 2 min. Test at 40–50 % resolution and 12–64 samples first.
  • Cycles GPU: prefs.compute_device_type='METAL', enable all devices, scene.cycles.device='GPU'. Use AgX + "Medium High Contrast" look.
  • Long final renders (>10–15 min locally) are candidates for a rented RTX GPU (4090/5090/L40S; not H100/A100 — no RT cores benefit for Cycles).

3. Getting models

  • Text/image → textured GLB: Higgsfield generate_3d (tripo_3d standard = 5 credits; preflight with get_cost:true and tell the user the cost). Output is ~1.5M tris, 2K PBR textures, Z-up, ~1 m long, centred at origin.
  • Poly Haven / Sketchfab / Poly Pizza via the MCP search_assets + import_asset.
  • After import: measure world bounds, find landmarks (head/tail/feet) with numpy on vertex coords, and render 4 orthographic-ish previews before rigging.

4. Rigging a generated mesh (worked on a 750k-vert French bulldog)

Heat-weighting chokes on dense AI meshes. Instead compute weights in numpy from landmarks and write them as quantized vertex-group batches — see references/rig-generated-mesh.md (full recipe + code). Key points:

  • Smoothstep regions: legs = (below body height) × (within radius of leg column); tail = sphere around the nub; head/ears by x/z thresholds; split the rest hips/chest with a sigmoid along the spine. Normalize so weights sum to 1.
  • Write with vg.add(indices, level/40, 'REPLACE') per quantized level (40 levels) — seconds, not minutes.
  • Legs: 2-bone chains + IK to unparented foot bones, lock_ik_x/y so knees only bend in the sagittal plane, and give straight legs a slight rest bend so IK knows the fold direction.
  • Print every bone's local axes before animating (bone.matrix_local.to_3x3().col[i]). Vertical bones with roll 0 have local Z = world Y, so a forward leg swing is a local-Z rotation; signs of pitch on the body/head bones were wrong on the first pass.
  • Animate procedurally: per-frame Python keyframes from functions of t (wag, wiggle, play-bow window, bounding gait with planted feet). Feet stay planted by computing plant positions per cycle.

5. Photoreal look-dev recipes

See references/lookdev-recipes.md and the complete working scene examples/whiskey_still_life.py (crystal tumbler, whiskey, ice sphere, condensation, black marble, decanter, bokeh, product lighting). Highlights:

  • Lathe glassware from a dense (r, z) profile with bmesh.ops.spin — no subsurf, smooth shading, real wall thickness, rounded rim arc.
  • Liquids: overlap the liquid 0.3 mm into the glass wall; colour with Volume Absorption, choosing colour/density from the target transmittance (see recipe math) rather than guessing — guessing gave pink, then red.
  • Condensation: Geometry Nodes on the glass object — Distribute Points with a selection (outer radius, height band, noise > 0.47), instance tiny ico spheres scaled (s, s, 0.42 s) on the face rotation, water material.
  • Product lighting: rim/back softbox, thin strip for one edge highlight, weak front fill, a small backlight card behind the liquid (camera-invisible, glossy-invisible, tracked to camera), and black flags (camera-invisible) beside the glass for dark edge lines.
  • Bokeh: small emissive spheres 2.4–3.1 m behind, f/2.8 at 85 mm, 7 blades; keep emission moderate so AgX doesn't wash them grey.

6. Check your work

Always render a test from the delivery camera and look at it (Read the PNG or MCP look) before the final. Critique it like a DP: framing, colour of liquids/skin, distracting reflections (a bright rectangle once turned out to be a light card's reflection — project objects into camera with world_to_camera_view to find culprits), horizon seams, edge definition.

Individual skills in this repo

This repo contains 1 individual skill — each has its own dedicated page.

Related Skills