Render with Blender on a headless VM: background mode, Cycles CPU, robust frame output, and common gotchas.
./install.sh headless-blendername: "headless-blender" description: "Render with Blender on a headless VM: background mode, Cycles CPU, robust frame output, and common gotchas."
Render on machines with no display. Assumes Blender 4.x+ installed.
bash
blender -b scene.blend -o //frames/frame-#### -f 1 # single frame
blender -b scene.blend -o //frames/frame-#### -s 1 -e 120 -a # animation
-b is background mode (no UI). Always render image sequences (PNG), then encode video from frames with ffmpeg -- if a render dies at frame 87, you keep 86 frames instead of nothing.
bash
ffmpeg -y -framerate 24 -i frames/frame-%04d.png \
-c:v libx264 -pix_fmt yuv420p out.mp4
python
scene.render.engine = 'CYCLES'
scene.cycles.device = 'CPU'
blender binary fails to start (missing libEGL etc.), a wrapper that forces software GL (Mesa) fixes startup; rendering still goes through Cycles CPU.default_value on shader sockets are interpreted as linear -- sRGB values you paste in will render washed out. Convert intended sRGB colors to linear first.publisher key c0936777faf077f4a5f686970647e9ef3f9c799774f04ab9df243ba4ef3ba3d6
No ratings yet — be the first to rate it.