blender-rendering
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRendering
渲染
The execution model is in . Scene lighting and cameras are in .
blender-coreblender-lighting-lookdev执行模型位于 。场景 lighting 和 cameras 位于 。
blender-coreblender-lighting-lookdevOne call
一键调用
scripts/render_batch.py -- --engine CYCLES --preset final --res 1920 1080 --out //render/hero_#### --frames 1
scripts/render_batch.py -- --preset preview --frames 1-120 --format MP4 --out //render/turntable
scripts/render_batch.py -- --cameras CamA CamB CamC --format EXR_MULTI --out //render/shots/Presets: (Cycles 64 spp, threshold 0.05, 50% res; EEVEE 16), (512 spp, 0.01; EEVEE 128 + raytracing), (1024 spp, transparent background). GPU is picked automatically (OptiX > CUDA > HIP > Metal > oneAPI), and the denoiser matches (OptiX or OpenImageDenoise).
previewfinalproductscripts/render_batch.py -- --engine CYCLES --preset final --res 1920 1080 --out //render/hero_#### --frames 1
scripts/render_batch.py -- --preset preview --frames 1-120 --format MP4 --out //render/turntable
scripts/render_batch.py -- --cameras CamA CamB CamC --format EXR_MULTI --out //render/shots/预设:(Cycles 64 spp、threshold 0.05、50% resolution;EEVEE 16)、(512 spp、0.01;EEVEE 128 + raytracing)、(1024 spp、transparent background)。GPU 会自动选择(OptiX > CUDA > HIP > Metal > oneAPI),denoiser 也会与之匹配(OptiX 或 OpenImageDenoise)。
previewfinalproductEngine choice
引擎选择
| Engine | Use | Notes |
|---|---|---|
| Cycles | final quality, product, archviz, glass/SSS/caustics, baking | path tracer; set the GPU; adaptive sampling + denoise |
| EEVEE (5.x, ex-"Next") | fast look-dev, stylized, motion graphics, previews | ray-traced reflections/GI ( |
| Workbench | playblasts, clay/matcap reviews, QA sheets | instant, no lighting accuracy |
Engine ids: |
| 引擎 | 用途 | 备注 |
|---|---|---|
| Cycles | 最终质量、产品渲染、archviz、玻璃/SSS/caustics、baking | path tracer;设置 GPU;adaptive sampling + denoise |
| EEVEE(5.x,原名为“Next”) | 快速 look-dev、stylized、motion graphics、previews | ray-traced reflections/GI( |
| Workbench | playblasts、clay/matcap reviews、QA sheets | 即时渲染,不保证 lighting accuracy |
引擎 ID: |
Cycles quality levers (ordered by impact)
Cycles 质量控制项(按影响大小排序)
- Adaptive sampling (0.01 final / 0.05 preview) + denoise (OIDN with albedo+normal passes,
adaptive_threshold). Raising samples alone is the least efficient fix.denoising_input_passes="RGB_ALBEDO_NORMAL" - Light paths: interiors need diffuse bounces ≥ 4. Product shots: total 12, glossy 4, transmission 8–12 for glass. Clamp indirect 5–10 kills fireflies at a small energy cost.
- Light tree (, on) for many lights. Path guiding (CPU only) for difficult indirect light.
use_light_tree - Fewer, larger lights beat many small ones. Emissive meshes are noisier than area lights.
- Persistent data () speeds up animations and turntables. Use
render.use_persistent_data(max subdivision, texture limit) for previews.simplify - 5.2: texture cache (,
render.use_texture_cache) cuts memory in texture-heavy scenes by generatinguse_auto_generate_texture_cachemip tiles..tx
- Adaptive sampling(final 为 0.01 / preview 为 0.05)+ denoise(OIDN,使用 albedo+normal passes,
adaptive_threshold)。仅提高 samples 是效率最低的修复方式。denoising_input_passes="RGB_ALBEDO_NORMAL" - Light paths:室内场景需要 diffuse bounces ≥ 4。产品镜头:total 12、glossy 4,glass 使用 transmission 8–12。Clamp Indirect 设为 5–10,可消除 fireflies,且只需付出少量 energy cost。
- Light tree(,on)适用于大量 lights。Path guiding(仅 CPU)适用于难以处理的 indirect light。
use_light_tree - 少量但更大的 lights 优于许多小型 lights。Emissive meshes 比 area lights 产生的 noise 更多。
- Persistent data()可加快 animations 和 turntables 的渲染。previews 使用
render.use_persistent_data(max subdivision、texture limit)。simplify - 5.2:texture cache(、
render.use_texture_cache)可通过生成use_auto_generate_texture_cachemip tiles,降低 texture-heavy scenes 的内存占用。.tx
Color management (decide once per project)
Color management(每个项目只需决定一次)
- AgX (default): photographic, handles bright highlights. Looks: ,
AgX - Punchy...- Base Contrast - Khronos PBR Neutral: shows albedo faithfully. Use it for product/e-commerce and asset reviews, and to match three.js .
NeutralToneMapping - Standard: graphics/UI/texture output that must match pixel values.
- ACES 1.3 / 2.0: VFX pipelines (plates, other DCCs).
- Use exposure (), not light power, for global brightness tweaks. Display device sRGB, or Display P3 / Rec.2100 for HDR delivery.
view_settings.exposure
- AgX(默认):摄影级效果,可妥善处理明亮 highlights。Looks:、
AgX - Punchy...- Base Contrast - Khronos PBR Neutral:忠实呈现 albedo。适用于产品/电商和资产审阅,也可匹配 three.js 的 。
NeutralToneMapping - Standard:用于必须匹配 pixel values 的 graphics/UI/texture output。
- ACES 1.3 / 2.0:适用于 VFX pipelines(plates、其他 DCCs)。
- 全局亮度微调应使用 exposure(),而不是 light power。显示设备使用 sRGB;交付 HDR 时使用 Display P3 / Rec.2100。
view_settings.exposure
Output formats
输出格式
- Stills: PNG 8/16-bit (RGBA when the film is transparent) or JPEG for web previews.
- Comp/VFX: EXR multilayer (, DWAA 16-bit) with passes (Denoising Data, Cryptomatte, AO, Mist, Z). 5.0 renamed passes:
EXR_MULTI,Diffuse Color, etc.Depth - Video: render frames first (PNG/EXR), then encode (FFmpeg or the VSE), because a crash mid-MP4 loses everything. Direct MP4 is fine for previews. Set before
image_settings.media_type(5.0+).file_format - Transparent: + PNG/EXR. A glass-only alpha needs
film_transparent=True.film_transparent_glass
- 静帧:PNG 8/16-bit(film 透明时使用 RGBA),或使用 JPEG 生成 web previews。
- Comp/VFX:EXR multilayer(、DWAA 16-bit),包含 passes(Denoising Data、Cryptomatte、AO、Mist、Z)。5.0 将 passes 重命名为
EXR_MULTI、Diffuse Color等。Depth - 视频:先渲染 frames(PNG/EXR),再进行 encode(FFmpeg 或 VSE),因为 MP4 编码中途崩溃会导致全部内容丢失。previews 可以直接输出 MP4。5.0+ 需在设置 之前设置
file_format。image_settings.media_type - 透明输出:+ PNG/EXR。仅含 glass 的 alpha 需要
film_transparent=True。film_transparent_glass
Compositor (5.0+ API)
合成器(Compositor,5.0+ API)
python
ng = bpy.data.node_groups.new("Comp", "CompositorNodeTree"); scene.compositing_node_group = ng
ng.interface.new_socket("Image", in_out="OUTPUT", socket_type="NodeSocketColor")
rl, glare, out = ng.nodes.new("CompositorNodeRLayers"), ng.nodes.new("CompositorNodeGlare"), ng.nodes.new("NodeGroupOutput")
ng.links.new(rl.outputs["Image"], glare.inputs["Image"]); ng.links.new(glare.outputs["Image"], out.inputs[0])There's no Composite node anymore: the group output is the final image. Many node options are now input sockets (Glare , , ), so them with . File Output node: , , .
TypeThresholdStrength--describeblender-geometry-nodes/scripts/gn_builder.pydirectoryfile_namefile_output_itemspython
ng = bpy.data.node_groups.new("Comp", "CompositorNodeTree"); scene.compositing_node_group = ng
ng.interface.new_socket("Image", in_out="OUTPUT", socket_type="NodeSocketColor")
rl, glare, out = ng.nodes.new("CompositorNodeRLayers"), ng.nodes.new("CompositorNodeGlare"), ng.nodes.new("NodeGroupOutput")
ng.links.new(rl.outputs["Image"], glare.inputs["Image"]); ng.links.new(glare.outputs["Image"], out.inputs[0])已不再有 Composite node:group output 即为最终图像。许多 node options 现在都是 input sockets(Glare 的 、、),因此可使用 的 对其进行说明。File Output node 的参数:、、。
TypeThresholdStrengthblender-geometry-nodes/scripts/gn_builder.py--describedirectoryfile_namefile_output_itemsCLI rendering (render farms, CI)
CLI 渲染(render farms、CI)
- renders an animation.
blender -b scene.blend -E CYCLES -o //out/frame_#### -F PNG -s 1 -e 120 -arenders a single frame. Python args go after-f 10.-- - (or CUDA/HIP/METAL/ONEAPI) selects the device without Python.
-- --cycles-device OPTIX - Split frames across machines with , or with Placeholders + No Overwrite (
-s/-e,render.use_placeholder) on shared storage.use_overwrite=False
- 渲染 animation。
blender -b scene.blend -E CYCLES -o //out/frame_#### -F PNG -s 1 -e 120 -a渲染单帧。Python args 放在-f 10之后。-- - (或 CUDA/HIP/METAL/ONEAPI)可在不调用 Python 的情况下选择 device。
-- --cycles-device OPTIX - 可通过 将 frames 分配到不同机器,也可以在共享存储上使用 Placeholders + No Overwrite(
-s/-e、render.use_placeholder)。use_overwrite=False
Gotchas
常见陷阱
- enum under-reports (add-on engines). Assign in try/except (the script does).
scene.render.engine - EEVEE in background still needs a GPU context. In CI without a GPU, use Cycles CPU or Workbench.
- writes
bpy.ops.render.render(write_still=True). Withoutrender.filepath, the result only lives inwrite_still.Render Result - Noise in glass/caustics: enable caustics only if needed (), raise transmission bounces, or fake it with Thin Wall (5.2) for windows.
caustics_refractive - Fireflies: clamp indirect, a filter glossy / blur glossy (0.5–1), and bigger light sources.
blur_glossy
- enum 的报告不完整(可能遗漏 add-on engines)。请在 try/except 中赋值(脚本已这样处理)。
scene.render.engine - EEVEE 在 background 模式下仍需要 GPU context。在没有 GPU 的 CI 环境中,请使用 Cycles CPU 或 Workbench。
- 会写入
bpy.ops.render.render(write_still=True)。不使用render.filepath时,结果只存在于write_still中。Render Result - 玻璃/caustics 中的 noise:仅在需要时启用 caustics(),提高 transmission bounces,或在 windows 中使用 Thin Wall (5.2) 进行模拟。
caustics_refractive - Fireflies:使用 Clamp Indirect、filter glossy / blur glossy(0.5–1),并采用更大的 light sources。
blur_glossy