feat: extend render options with resolution, bounces, clamping, denoiser, output format

Added properties:
- Resolution override (width, height, percentage)
- Min samples + time limit for adaptive sampling
- Denoiser type (OIDN / OptiX) + denoise input passes
- Individual light bounces (diffuse, glossy, transmission, transparent, volume)
- Clamping (direct, indirect)
- Film transparent toggle + pixel filter width
- Output format (PNG, JPEG, TIFF, EXR, EXR Multilayer)
- Color depth (8/16 bit)

Version bump to 2.0.0
This commit is contained in:
2026-06-03 18:43:29 +02:00
parent 7f5a70da8a
commit dc934fd3ac
5 changed files with 434 additions and 43 deletions

View File

@@ -2,6 +2,9 @@ import bpy
class SceneRendererSettings(bpy.types.PropertyGroup):
# --- General ---
test_mode: bpy.props.BoolProperty(
name="Test Mode",
description="Render only the first scene at 10% resolution with 1 sample",
@@ -17,11 +20,46 @@ class SceneRendererSettings(bpy.types.PropertyGroup):
description="Force CPU rendering instead of GPU",
default=False,
)
# --- Resolution ---
override_resolution: bpy.props.BoolProperty(
name="Override Resolution",
description="Override the per-scene resolution with a global value",
default=False,
)
resolution_x: bpy.props.IntProperty(
name="Resolution X",
description="Horizontal render resolution",
default=1920, min=1, max=32768,
)
resolution_y: bpy.props.IntProperty(
name="Resolution Y",
description="Vertical render resolution",
default=1080, min=1, max=32768,
)
resolution_percentage: bpy.props.IntProperty(
name="Resolution %",
description="Resolution scale percentage",
default=100, min=1, max=100,
subtype='PERCENTAGE',
)
# --- Sampling ---
samples: bpy.props.IntProperty(
name="Samples",
description="Cycles render samples",
name="Max Samples",
description="Maximum number of Cycles render samples",
default=4096, min=1, max=65536,
)
min_samples: bpy.props.IntProperty(
name="Min Samples",
description=(
"Minimum number of samples before adaptive sampling can stop. "
"Set to 0 to use Blender default"
),
default=0, min=0, max=65536,
)
use_noise_threshold: bpy.props.BoolProperty(
name="Use Noise Threshold",
description="Stop sampling when the noise is below this threshold",
@@ -32,16 +70,140 @@ class SceneRendererSettings(bpy.types.PropertyGroup):
description="Noise threshold for adaptive sampling",
default=0.01, min=0.0001, max=1.0, precision=4,
)
time_limit: bpy.props.FloatProperty(
name="Time Limit",
description=(
"Maximum render time per frame in seconds. "
"0 = no limit"
),
default=0.0, min=0.0, max=86400.0,
)
# --- Denoising ---
use_denoising: bpy.props.BoolProperty(
name="Use Denoising",
description="Enable denoising for final render",
default=True,
)
denoiser: bpy.props.EnumProperty(
name="Denoiser",
description="Which denoiser to use",
items=[
('OPENIMAGEDENOISE', "OpenImageDenoise", "Intel Open Image Denoise (CPU)"),
('OPTIX', "OptiX", "NVIDIA OptiX (GPU only)"),
],
default='OPENIMAGEDENOISE',
)
denoising_input_passes: bpy.props.EnumProperty(
name="Denoise Passes",
description="Passes used by the denoiser for better quality",
items=[
('RGB', "Color", "Use only color data"),
('RGB_ALBEDO', "Color + Albedo", "Use color and albedo data"),
('RGB_ALBEDO_NORMAL', "Color + Albedo + Normal",
"Use color, albedo, and normal data (best quality)"),
],
default='RGB_ALBEDO_NORMAL',
)
# --- Light Bounces ---
max_bounces: bpy.props.IntProperty(
name="Max Bounces",
name="Total",
description="Total maximum number of light bounces",
default=12, min=0, max=1024,
)
diffuse_bounces: bpy.props.IntProperty(
name="Diffuse",
description="Maximum number of diffuse bounces",
default=4, min=0, max=1024,
)
glossy_bounces: bpy.props.IntProperty(
name="Glossy",
description="Maximum number of glossy bounces",
default=4, min=0, max=1024,
)
transmission_bounces: bpy.props.IntProperty(
name="Transmission",
description="Maximum number of transmission bounces",
default=12, min=0, max=1024,
)
transparent_max_bounces: bpy.props.IntProperty(
name="Transparent",
description="Maximum number of transparent bounces",
default=8, min=0, max=1024,
)
volume_bounces: bpy.props.IntProperty(
name="Volume",
description="Maximum number of volume scattering bounces",
default=0, min=0, max=1024,
)
# --- Clamping ---
use_clamping: bpy.props.BoolProperty(
name="Use Clamping",
description="Clamp sample values to reduce fireflies",
default=False,
)
clamp_direct: bpy.props.FloatProperty(
name="Direct Light",
description=(
"Clamp value for direct light samples. "
"0 = no clamping"
),
default=0.0, min=0.0, max=1e8,
)
clamp_indirect: bpy.props.FloatProperty(
name="Indirect Light",
description=(
"Clamp value for indirect light samples. "
"0 = no clamping"
),
default=10.0, min=0.0, max=1e8,
)
# --- Film ---
film_transparent: bpy.props.BoolProperty(
name="Transparent Background",
description="Render the background as transparent",
default=True,
)
film_filter_width: bpy.props.FloatProperty(
name="Pixel Filter Width",
description="Pixel filter width for anti-aliasing",
default=1.5, min=0.01, max=10.0,
)
# --- Output ---
output_format: bpy.props.EnumProperty(
name="Format",
description="Output file format",
items=[
('PNG', "PNG", "PNG image with alpha support"),
('JPEG', "JPEG", "JPEG image (no alpha)"),
('TIFF', "TIFF", "TIFF image"),
('OPEN_EXR', "OpenEXR", "OpenEXR HDR image"),
('OPEN_EXR_MULTILAYER', "OpenEXR Multilayer",
"OpenEXR with all render passes"),
],
default='PNG',
)
color_depth: bpy.props.EnumProperty(
name="Color Depth",
description="Bit depth per channel",
items=[
('8', "8 bit", "8 bits per channel"),
('16', "16 bit", "16 bits per channel"),
],
default='16',
)
# --- Color Management ---
exposure: bpy.props.FloatProperty(
name="Exposure",
description="Exposure boost in stops",