blender-render-automation
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "blender-render-automation" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-2f271a3a72dc61ebf0fe73cd8eae963fa476ccd97efd56cc6c2b8a286424cedf. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Automate Blender rendering via the command line. Intended for scenarios that need rendering setup, batch scene renders, configuring Cycles or EEVEE, camera and lighting setup, rendering animations, creating materials and shaders, or building a rendering pipeline with Blender Python scripts.
Introduction source: third_party · TerminalSkills · 1.0.0 Reference
SkillPi interpretation
- Limits and differences
- track = camera.constraints.new(type='TRACK_TO') track.target = bpy.data.objects["MySubject"]
- Testing
- Not tested
Browse files
Frontmatter
name: blender-render-automation
description: >-
Automate Blender rendering from the command line. Use when the user wants to
set up renders, batch render scenes, configure Cycles or EEVEE, set up
cameras and lights, render animations, create materials and shaders, or
build a render pipeline with Blender Python scripting.
license: Apache-2.0
compatibility: >-
Requires Blender 3.0+. GPU rendering requires compatible CUDA, OptiX, or
HIP device. Run: blender --background --python script.py
metadata:
author: terminal-skills
version: "1.0.0"
category: automation
tags: ["blender", "rendering", "cycles", "eevee", "3d"]Blender Render Automation
Overview
Automate Blender's rendering pipeline from the terminal. Configure render engines (Cycles/EEVEE), set up cameras and lighting, create materials, and batch render scenes or animations — all headlessly via Python scripts.
Instructions
1. Configure the render engine
import bpy
scene = bpy.context.scene
# Cycles (ray-traced, production quality)
scene.render.engine = 'CYCLES'
cycles = scene.cycles
cycles.samples = 256
cycles.use_denoising = True
cycles.denoiser = 'OPENIMAGEDENOISE'
cycles.device = 'GPU'
prefs = bpy.context.preferences.addons['cycles'].preferences
prefs.compute_device_type = 'CUDA' # or 'OPTIX', 'HIP'
prefs.get_devices()
for device in prefs.devices:
device.use = True
# EEVEE (fast, real-time)
scene.render.engine = 'BLENDER_EEVEE_NEXT'
eevee = scene.eevee
eevee.taa_render_samples = 64
2. Output resolution and format
render = bpy.context.scene.render
render.resolution_x = 1920
render.resolution_y = 1080
render.resolution_percentage = 100
render.image_settings.file_format = 'PNG' # PNG, JPEG, OPEN_EXR, TIFF
render.image_settings.color_mode = 'RGBA'
render.film_transparent = True # transparent background
3. Cameras and lighting
import math
from mathutils import Vector
# Camera
bpy.ops.object.camera_add(location=(7, -6, 5))
camera = bpy.context.active_object
target = Vector((0, 0, 1))
direction = target - camera.location
camera.rotation_euler = direction.to_track_quat('-Z', 'Y').to_euler()
cam_data = camera.data
cam_data.lens = 50
cam_data.dof.use_dof = True
cam_data.dof.focus_distance = 5
cam_data.dof.aperture_fstop = 2.8
bpy.context.scene.camera = camera
# Track-to constraint (auto-aim)
track = camera.constraints.new(type='TRACK_TO')
track.target = bpy.data.objects["MySubject"]
# Area light
bpy.ops.object.light_add(type='AREA', location=(0, -4, 3))
area = bpy.context.active_object
area.data.energy = 500
area.data.size = 2
# HDRI environment lighting
world = bpy.context.scene.world or bpy.data.worlds.new("World")
bpy.context.scene.world = world
world.use_nodes = True
nodes = world.node_tree.nodes
links = world.node_tree.links
nodes.clear()
bg = nodes.new('ShaderNodeBackground')
env = nodes.new('ShaderNodeTexEnvironment')
output = nodes.new('ShaderNodeOutputWorld')
env.image = bpy.data.images.load("/path/to/hdri.hdr")
links.new(env.outputs['Color'], bg.inputs['Color'])
links.new(bg.outputs['Background'], output.inputs['Surface'])
4. Create materials
def create_pbr_material(name, color, metallic=0.0, roughness=0.5):
mat = bpy.data.materials.new(name)
mat.use_nodes = True
bsdf = mat.node_tree.nodes.get("Principled BSDF")
bsdf.inputs['Base Color'].default_value = (*color, 1)
bsdf.inputs['Metallic'].default_value = metallic
bsdf.inputs['Roughness'].default_value = roughness
return mat
def create_glass_material(name, color=(1, 1, 1), ior=1.45):
mat = bpy.data.materials.new(name)
mat.use_nodes = True
bsdf = mat.node_tree.nodes.get("Principled BSDF")
bsdf.inputs['Base Color'].default_value = (*color, 1)
bsdf.inputs['Transmission Weight'].default_value = 1.0
bsdf.inputs['Roughness'].default_value = 0.0
bsdf.inputs['IOR'].default_value = ior
return mat
obj = bpy.data.objects["MyCube"]
obj.data.materials.append(create_pbr_material("BlueMetal", (0.1, 0.3, 0.8), metallic=1.0, roughness=0.2))
5. Render frames and animations
# Single frame
scene.render.filepath = "/tmp/render_output.png"
bpy.ops.render.render(write_still=True)
# Animation as image sequence
scene.frame_start = 1
scene.frame_end = 250
scene.render.fps = 24
scene.render.filepath = "/tmp/anim/frame_"
bpy.ops.render.render(animation=True)
# Animation as video
scene.render.filepath = "/tmp/animation.mp4"
scene.render.image_settings.file_format = 'FFMPEG'
scene.render.ffmpeg.format = 'MPEG4'
scene.render.ffmpeg.codec = 'H264'
bpy.ops.render.render(animation=True)
CLI:
blender scene.blend --background --render-output /tmp/frame_ --render-frame 1
blender scene.blend --background --frame-start 1 --frame-end 100 --render-anim
6. Batch render multiple cameras
import os
output_dir = "/tmp/renders"
os.makedirs(output_dir, exist_ok=True)
scene = bpy.context.scene
for cam in [obj for obj in bpy.data.objects if obj.type == 'CAMERA']:
scene.camera = cam
scene.render.filepath = os.path.join(output_dir, f"{cam.name}.png")
bpy.ops.render.render(write_still=True)
Examples
Example 1: Product shot render pipeline
User request: "Set up a clean studio render for a 3D product"
Output: Script that clears the scene, imports the product OBJ, creates a white backdrop with PBR material, sets up three-point lighting (key area light, fill, rim), adds a camera with Track-To constraint aimed at the product, configures Cycles at 128 samples with denoising, transparent background (RGBA), and renders at 2000x2000.
Example 2: Batch render turntable animation
User request: "Render a 360-degree turntable of my model — 36 frames"
Output: Script that creates a camera, loops 36 steps around the model at equal angular intervals using cos/sin, renders each frame with Cycles + denoising to a numbered PNG sequence, then provides the ffmpeg command to assemble into an MP4.
Guidelines
- Always use
--backgroundfor headless rendering. - Cycles is physically accurate but slow. EEVEE is fast but approximate. Use EEVEE for previews, Cycles for final output.
- Enable denoising to get clean results with fewer samples — 128-256 with denoising often matches 1000+ without.
- For GPU rendering, call
prefs.get_devices()after settingcompute_device_type. - Render animations as image sequences (PNG), not directly to video. If a render crashes mid-way, you keep completed frames.
- Use
film_transparent = Trueand RGBA for renders needing transparent backgrounds. - HDRI environment maps produce the most realistic lighting. Free HDRIs at Poly Haven.
- The Principled BSDF handles most materials — adjust Base Color, Metallic, Roughness, and Transmission.
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供完整的 Blender 命令行自动化渲染解决方案,覆盖渲染引擎配置、相机灯光、材质创建、批量渲染等核心需求
- 适用于产品渲染、动画输出、3D 制作等高频刚需场景,显著提升工作效率
Highlights
- 触发描述精准完整,明确涵盖设置渲染、批量渲染、配置 Cycles/EEVEE、相机灯光、动画渲染等多种场景
- 边界清晰,不易与其他 Skill 重叠
Areas to improve
-
缺少 When to Use 显式章节 Reported severity: Minor
文档虽有 description 字段描述使用场景,但未在正文中设立独立的 When to Use 章节
Recommendation: 建议在 Overview 后增加 When to Use 章节,更清晰地引导用户使用
-
文档较长 Reported severity: Minor
主文档约 480 行,接近 500 行限制
Recommendation: 可考虑将部分代码示例移至独立文件,或适当精简说明文字
Highlights
- 结构清晰,分 6 个步骤详细说明,每步含完整代码示例
- 提供两个端到端示例(产品渲染、360 度动画),frontmatter 完整规范
Highlights
- 工具来源明确(Blender Python API),参数设置准确
- 覆盖主要异常处理(如目录创建),CLI 命令准确可靠
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.