Blender Syntax Rendering 标志

Blender Syntax Rendering

组织
Impertio-Studio
blender-syntax-rendering

Use when configuring render settings or automating renders in Blender Python. Prevents the version pitfall of using 'BLENDER_EEVEE' (renamed to 'BLENDER_EEVEE_NEXT' in 4.2). Covers render engine selection (EEVEE/Cycles/Workbench), output format setup, camera configuration, batch rendering, and scene.render.* settings. Keywords: render, EEVEE, Cycles, Workbench, render settings, output format, camera, batch render, scene.render, BLENDER_EEVEE_NEXT, resolution, render from script, set render resolution, save image.

概览

发布者Impertio-Studio
代码仓库Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package
技能名称blender-syntax-rendering
星标数
44
复刻数
5
附带文件
3
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 3 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 Impertio-Studio 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Blender Syntax Rendering AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/tree/main/skills/blender/syntax/blender-syntax-rendering
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package.git /tmp/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package
mkdir -p .claude/skills
cp -r /tmp/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/skills/blender/syntax/blender-syntax-rendering .claude/skills/blender-syntax-rendering
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Blender Syntax Rendering,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Blender Syntax Rendering。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Blender Syntax Rendering 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

blender-syntax-rendering

Quick Reference

Critical Warnings

NEVER use 'BLENDER_EEVEE' in Blender 4.2-4.4 — the identifier is 'BLENDER_EEVEE_NEXT' in those versions.

NEVER call bpy.ops.render.render() without write_still=True for still images — the render completes but the image is never saved to disk.

NEVER set Cycles GPU device without calling cycles_prefs.get_devices() first — the device list is empty until explicitly refreshed.

NEVER use scene.use_nodes = True in Blender 5.0+ — the compositor is always active; the attribute is deprecated.

NEVER use scene.node_tree in Blender 5.0+ — use scene.compositing_node_group instead.

NEVER use eevee.use_gtao in Blender 5.0+ — use view_layer.eevee.ambient_occlusion_distance instead.

ALWAYS use the version-safe EEVEE selection pattern when targeting multiple Blender versions.

EEVEE Engine Identifier Matrix

Blender VersionEngine IdentifierNotes
3.0 - 4.1'BLENDER_EEVEE'Original EEVEE
4.2 - 4.4'BLENDER_EEVEE_NEXT'Rewritten EEVEE engine
5.0+'BLENDER_EEVEE'Identifier reverted to original

Render Engine Decision Tree

What render engine does the task require?
├── Photo-realistic / ray-traced → CYCLES
│   └── GPU available?
│       ├── Yes → cycles.device = 'GPU' (call get_devices() first)
│       └── No  → cycles.device = 'CPU'
├── Real-time / fast preview → EEVEE (use version-safe pattern)
│   └── Blender version?
│       ├── 3.x / 4.0-4.1 / 5.0+ → 'BLENDER_EEVEE'
│       └── 4.2 - 4.4            → 'BLENDER_EEVEE_NEXT'
└── Solid/wireframe viewport look → WORKBENCH
    └── scene.render.engine = 'BLENDER_WORKBENCH'

Render Pass Names (5.0 Changes)

Old Name (3.x / 4.x)New Name (5.0+)
"DiffCol""Diffuse Color"
"GlossCol""Glossy Color"
"TransCol""Transmission Color"
"IndexMA""Material Index"
"IndexOB""Object Index"
"Z""Depth"

Essential Patterns

Pattern 1: Version-Safe EEVEE Selection

ALWAYS use this pattern when targeting multiple Blender versions:

python
# Blender 3.x / 4.x / 5.x: Version-safe EEVEE selection
import bpy
scene = bpy.context.scene

if bpy.app.version >= (5, 0, 0):
    scene.render.engine = 'BLENDER_EEVEE'
elif bpy.app.version >= (4, 2, 0):
    scene.render.engine = 'BLENDER_EEVEE_NEXT'
else:
    scene.render.engine = 'BLENDER_EEVEE'

Pattern 2: Render Settings Configuration

python
# Blender 3.x / 4.x / 5.x: Configure render output
scene = bpy.context.scene
render = scene.render

# Resolution
render.resolution_x = 1920
render.resolution_y = 1080
render.resolution_percentage = 100  # Scale factor (1-100)

# Output format
render.image_settings.file_format = 'PNG'   # 'PNG','JPEG','OPEN_EXR','TIFF','BMP'
render.image_settings.color_mode = 'RGBA'   # 'BW', 'RGB', 'RGBA'
render.image_settings.color_depth = '16'    # '8', '16', '32' (format-dependent)
render.image_settings.compression = 15      # PNG compression (0-100)

# Output path
render.filepath = "/tmp/render_output/frame_"

# Frame range
scene.frame_start = 1
scene.frame_end = 250
scene.frame_step = 1
render.fps = 24

Pattern 3: Cycles Configuration

python
# Blender 3.x / 4.x / 5.x: Cycles setup
scene.render.engine = 'CYCLES'
cycles = scene.cycles

# Device selection
cycles.device = 'GPU'  # 'CPU' or 'GPU'

# Sampling
cycles.samples = 256
cycles.preview_samples = 64
cycles.use_adaptive_sampling = True
cycles.adaptive_threshold = 0.01

# Denoiser
cycles.use_denoising = True
cycles.denoiser = 'OPENIMAGEDENOISE'  # 'OPENIMAGEDENOISE' or 'OPTIX'

# Light paths
cycles.max_bounces = 12
cycles.diffuse_bounces = 4
cycles.glossy_bounces = 4
cycles.transmission_bounces = 12
cycles.transparent_max_bounces = 8

Pattern 4: Cycles GPU Setup

ALWAYS call get_devices() before enabling GPU devices:

python
# Blender 3.x / 4.x / 5.x: Cycles GPU configuration
prefs = bpy.context.preferences
cycles_prefs = prefs.addons['cycles'].preferences

# Set compute type FIRST
cycles_prefs.compute_device_type = 'CUDA'  # 'CUDA','OPTIX','HIP','ONEAPI','METAL'

# ALWAYS refresh device list before enabling
cycles_prefs.get_devices()

# Enable all available devices
for device in cycles_prefs.devices:
    device.use = True

Pattern 5: Camera Creation and Configuration

python
# Blender 3.x / 4.x / 5.x: Camera setup
cam_data = bpy.data.cameras.new("RenderCamera")
cam_obj = bpy.data.objects.new("RenderCamera", cam_data)
bpy.context.collection.objects.link(cam_obj)  # REQUIRED: link to collection

# Set as active scene camera
scene.camera = cam_obj

# Lens
cam_data.type = 'PERSP'        # 'PERSP', 'ORTHO', 'PANO'
cam_data.lens = 35.0            # Focal length in mm (perspective only)
cam_data.ortho_scale = 10.0     # Orthographic scale (ortho only)

# Clipping
cam_data.clip_start = 0.1
cam_data.clip_end = 1000.0

# Position and orientation
cam_obj.location = (10.0, -10.0, 8.0)
cam_obj.rotation_euler = (1.1, 0.0, 0.785)

Pattern 6: Depth of Field

python
# Blender 3.x / 4.x / 5.x: Depth of field
cam_data.dof.use_dof = True
cam_data.dof.focus_object = bpy.data.objects.get("FocusTarget")
cam_data.dof.aperture_fstop = 2.8

# Sensor settings
cam_data.sensor_width = 36.0   # mm
cam_data.sensor_height = 24.0  # mm

Common Operations

Render a Still Image

python
# Blender 3.x / 4.x / 5.x: Render and save a still image
scene = bpy.context.scene
scene.render.filepath = "/tmp/output.png"
scene.render.image_settings.file_format = 'PNG'
bpy.ops.render.render(write_still=True)  # write_still=True is REQUIRED

Render an Animation

python
# Blender 3.x / 4.x / 5.x: Render animation sequence
scene = bpy.context.scene
scene.frame_start = 1
scene.frame_end = 250
scene.render.filepath = "/tmp/renders/anim_"
bpy.ops.render.render(animation=True)

Batch Render Multiple Cameras

python
# Blender 3.x / 4.x / 5.x: Batch render from all cameras
import bpy

scene = bpy.context.scene
cameras = [obj for obj in bpy.data.objects if obj.type == 'CAMERA']

for cam in cameras:
    scene.camera = cam
    scene.render.filepath = f"/tmp/renders/{cam.name}_"
    bpy.ops.render.render(write_still=True)

Headless Rendering (Command Line)

bash
# Render with a script (no GUI)
blender --background scene.blend --python render_script.py
python
# render_script.py
import bpy
scene = bpy.context.scene
scene.render.filepath = "/tmp/headless_render.png"
bpy.ops.render.render(write_still=True)

Create Light Sources

python
# Blender 3.x / 4.x / 5.x: Light types
# Point light
point_data = bpy.data.lights.new("PointLight", type='POINT')
point_data.energy = 1000.0      # Watts
point_data.shadow_soft_size = 0.25
point_data.color = (1.0, 0.95, 0.9)
point_obj = bpy.data.objects.new("PointLight", point_data)
bpy.context.collection.objects.link(point_obj)

# Sun light
sun_data = bpy.data.lights.new("SunLight", type='SUN')
sun_data.energy = 5.0
sun_data.angle = 0.00918  # Angular diameter in radians

# Area light
area_data = bpy.data.lights.new("AreaLight", type='AREA')
area_data.shape = 'RECTANGLE'  # 'SQUARE','RECTANGLE','DISK','ELLIPSE'
area_data.size = 2.0
area_data.size_y = 1.0         # Only for RECTANGLE/ELLIPSE
area_data.energy = 500.0

# Spot light
spot_data = bpy.data.lights.new("SpotLight", type='SPOT')
spot_data.spot_size = 0.785    # Cone angle in radians
spot_data.spot_blend = 0.15    # Soft edge (0=hard, 1=fully soft)

Light Type Reference

TypeStringUse Case
Point'POINT'Omnidirectional (lamps, bulbs)
Sun'SUN'Directional (exteriors); position irrelevant, only rotation matters
Spot'SPOT'Cone-shaped (stage lighting, flashlights)
Area'AREA'Surface-emitting (soft shadows, interiors)

EEVEE-Specific Settings (Version-Dependent)

python
# Blender 4.2+: EEVEE settings via scene.eevee
eevee = scene.eevee

# Shadows
eevee.shadow_cube_size = '1024'
eevee.shadow_cascade_size = '2048'

# Ray tracing (4.2+)
eevee.ray_tracing_method = 'SCREEN'  # 'SCREEN' or 'PROBE'

# Ambient Occlusion
# Blender 4.x:
#   eevee.use_gtao = True            # REMOVED in 5.0
#   eevee.gtao_distance = 1.0        # REMOVED in 5.0
# Blender 5.0+:
#   view_layer.eevee.ambient_occlusion_distance = 1.0

Compositor Node Access (Version-Dependent)

python
# Blender 3.x / 4.x: Compositor node tree
scene.use_nodes = True           # Enable compositor  (DEPRECATED in 5.0)
tree = scene.node_tree           # Access node tree   (REMOVED in 5.0)

# Blender 5.0+: Compositor node group
tree = scene.compositing_node_group  # New accessor

Reference Links

Official Sources

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Blender Syntax Rendering AI 技能有什么作用?

Use when configuring render settings or automating renders in Blender Python. Prevents the version pitfall of using 'BLENDER_EEVEE' (renamed to 'BLENDER_EEVEE_NEXT' in 4.2). Covers render engine selection (EEVEE/Cycles/Workbench), output format setup, camera configuration, batch rendering, and scene.render.* settings. Keywords: render, EEVEE, Cycles, Workbench, render settings, output format, camera, batch render, scene.render, BLENDER_EEVEE_NEXT, resolution, render from script, set render resolution, save image.

为什么在 TypingMind 中使用 Blender Syntax Rendering?

因为您只需安装一次,就能搭配任何模型使用。Blender Syntax Rendering 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Blender Syntax Rendering?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/tree/main/skills/blender/syntax/blender-syntax-rendering。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Blender Syntax Rendering?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Blender Syntax Rendering 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Blender Syntax Rendering 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Blender Syntax Rendering AI 技能免费吗?

是的。Impertio-Studio 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇