feat: add additional render options (noise threshold, denoising, max bounces)

This commit is contained in:
2026-06-03 01:04:41 +02:00
parent 024f6f9ad4
commit d2f4af51e1
6 changed files with 43 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -111,7 +111,13 @@ class SCENERENDERER_OT_render_all(bpy.types.Operator):
c = scene.cycles
c.samples = 1 if settings["test_mode"] else settings["samples"]
c.use_adaptive_sampling = settings["use_noise_threshold"]
if c.use_adaptive_sampling:
c.adaptive_threshold = settings["noise_threshold"]
c.use_denoising = settings["use_denoising"]
if hasattr(c, 'max_bounces'):
c.max_bounces = settings["max_bounces"]
if settings["exposure"] != 0.0:
scene.view_settings.exposure = settings["exposure"]
scene.cycles.film_exposure = 2.0 ** settings["exposure"]
@@ -180,6 +186,10 @@ class SCENERENDERER_OT_render_all(bpy.types.Operator):
"skip_existing": settings.skip_existing,
"use_cpu": settings.use_cpu,
"samples": settings.samples,
"use_noise_threshold": settings.use_noise_threshold,
"noise_threshold": settings.noise_threshold,
"use_denoising": settings.use_denoising,
"max_bounces": settings.max_bounces,
"exposure": settings.exposure,
"look": settings.look,
}

View File

@@ -17,7 +17,18 @@ class SCENERENDERER_PT_panel(bpy.types.Panel):
row.prop(settings, "skip_existing", toggle=True)
layout.prop(settings, "use_cpu")
layout.prop(settings, "samples")
box = layout.box()
box.label(text="Cycles Render", icon='SCENE_DATA')
box.prop(settings, "samples")
row = box.row()
row.prop(settings, "use_noise_threshold", text="Noise Threshold")
sub = row.row()
sub.active = settings.use_noise_threshold
sub.prop(settings, "noise_threshold", text="")
box.prop(settings, "use_denoising")
box.prop(settings, "max_bounces")
box = layout.box()
box.label(text="Color", icon='SHADING_RENDERED')

View File

@@ -22,6 +22,26 @@ class SceneRendererSettings(bpy.types.PropertyGroup):
description="Cycles render samples",
default=4096, min=1, max=65536,
)
use_noise_threshold: bpy.props.BoolProperty(
name="Use Noise Threshold",
description="Stop sampling when the noise is below this threshold",
default=True,
)
noise_threshold: bpy.props.FloatProperty(
name="Noise Threshold",
description="Noise threshold for adaptive sampling",
default=0.01, min=0.0001, max=1.0, precision=4,
)
use_denoising: bpy.props.BoolProperty(
name="Use Denoising",
description="Enable denoising for final render",
default=True,
)
max_bounces: bpy.props.IntProperty(
name="Max Bounces",
description="Total maximum number of light bounces",
default=12, min=0, max=1024,
)
exposure: bpy.props.FloatProperty(
name="Exposure",
description="Exposure boost in stops",