jpskill.com
🛠️ 開発・MCP コミュニティ

blender-render-automation

Blenderのレンダリング作業をコマンドラインから自動化し、シーンの一括処理やCycles/EEVEEの設定、カメラや照明の調整、アニメーション作成、マテリアル設定などを効率的に行うSkill。

📜 元の英語説明(参考)

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.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Blenderのレンダリング作業をコマンドラインから自動化し、シーンの一括処理やCycles/EEVEEの設定、カメラや照明の調整、アニメーション作成、マテリアル設定などを効率的に行うSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o blender-render-automation.zip https://jpskill.com/download/14694.zip && unzip -o blender-render-automation.zip && rm blender-render-automation.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/14694.zip -OutFile "$d\blender-render-automation.zip"; Expand-Archive "$d\blender-render-automation.zip" -DestinationPath $d -Force; ri "$d\blender-render-automation.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して blender-render-automation.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → blender-render-automation フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Blenderレンダー自動化

概要

Blenderのレンダリングパイプラインをターミナルから自動化します。レンダーエンジン(Cycles/EEVEE)の設定、カメラと照明のセットアップ、マテリアルの作成、シーンやアニメーションのバッチレンダリングを、すべてPythonスクリプトを使ってヘッドレスで行います。

手順

1. レンダリングエンジンの設定

import bpy

scene = bpy.context.scene

# Cycles (レイトレーシング、プロダクション品質)
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 (高速、リアルタイム)
scene.render.engine = 'BLENDER_EEVEE_NEXT'
eevee = scene.eevee
eevee.taa_render_samples = 64

2. 出力解像度とフォーマット

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  # 透明な背景

3. カメラと照明

import math
from mathutils import Vector

# カメラ
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 コンストレイント (自動照準)
track = camera.constraints.new(type='TRACK_TO')
track.target = bpy.data.objects["MySubject"]

# エリアライト
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 環境照明
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. マテリアルの作成

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. フレームとアニメーションのレンダリング

# 単一フレーム
scene.render.filepath = "/tmp/render_output.png"
bpy.ops.render.render(write_still=True)

# アニメーションを画像シーケンスとして
scene.frame_start = 1
scene.frame_end = 250
scene.render.fps = 24
scene.render.filepath = "/tmp/anim/frame_"
bpy.ops.render.render(animation=True)

# アニメーションをビデオとして
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. 複数のカメラのバッチレンダリング

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)

例 1: プロダクトショットのレンダリングパイプライン

ユーザーリクエスト: 「3D製品のクリーンなスタジオレンダリングをセットアップしてください」

出力: シーンをクリアし、製品のOBJをインポートし、PBRマテリアルで白い背景を作成し、3点照明(キーエリアライト、フィル、リム)をセットアップし、製品に向けたTrack-Toコンストレイント付きのカメラを追加し、Cyclesを128サンプルでデノイズ処理、透明な背景(RGBA)で設定し、2000x2000でレンダリングするスクリプト。

例 2: ターンテーブルアニメーションのバッチレンダリング

ユーザーリクエスト: 「モデルの360度ターンテーブルをレンダリングしてください — 36フレーム」

出力: カメラを作成し、cos / sinを使用して等間隔でモデルの周りを36ステップループし、各フレームをCycles + デノイズ処理で番号付きのPNGシーケンスにレンダリングし、MP4に組み立てるためのffmpegコマンドを提供するスクリプト。

ガイドライン

  • ヘッドレスレンダリングには、常に--backgroundを使用してください。
  • Cyclesは物理的に正確ですが、低速です。EEVEEは高速ですが、近似です。プレビューにはEEVEEを使用し、最終出力にはCyclesを使用してください。
  • デノイズ処理を有効にして、より少ないサンプルでクリーンな結果を得てください。デノイズ処理ありの128〜256サンプルは、デノイズ処理なしの1000以上のサンプルに匹敵することがよくあります。
  • GPUレンダリングの場合は、compute_device_typeを設定した後でprefs.get_devices()を呼び出してください。
  • アニメーションは、ビデオに直接レンダリングするのではなく、画像シーケンス(PNG)としてレンダリングしてください。レンダリングが途中でクラッシュした場合でも、完了したフレームは保持されます。
  • 透明な背景が必要なレンダリングには、film_transparent = TrueとRGBAを使用してください。
  • HDRI環境
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

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 --background for 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 setting compute_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 = True and 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.