Skip to content

Commit

Permalink
show some tile related warnings in halt condition panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Theverat committed Nov 26, 2018
1 parent b8f47d9 commit 021d26d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
4 changes: 2 additions & 2 deletions properties/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
)

AA_SAMPLE_DESC = (
"How many samples to compute per pass. Higher values increase memory usage, but lead to better performance. "
"How many AA samples to compute per pass. Higher values increase memory usage, but lead to better performance. "
"Note that this number is squared, so e.g. a value of 5 will lead to 25 samples per pixel after one pass"
)

Expand Down Expand Up @@ -120,7 +120,7 @@ class LuxCoreConfigTile(PropertyGroup):
Stored in LuxCoreConfig, accesss with scene.luxcore.config.tile
"""
# tilepath.sampling.aa.size
path_sampling_aa_size = IntProperty(name="Samples per Pass", default=3, min=1, soft_max=13,
path_sampling_aa_size = IntProperty(name="AA Samples", default=3, min=1, soft_max=13,
description=AA_SAMPLE_DESC)

# tile.size
Expand Down
21 changes: 21 additions & 0 deletions ui/halt.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,27 @@ def draw(layout, context, halt):
split.prop(halt, "samples")

config = context.scene.luxcore.config

if halt.use_samples and config.engine == "PATH" and config.use_tiles:
# some special warnings about tile path usage
aa = config.tile.path_sampling_aa_size
samples_per_pass = aa**2

if config.tile.multipass_enable and halt.samples % samples_per_pass != 0:
layout.label("Should be a multiple of %d" % samples_per_pass, icon=icons.WARNING)

if context.scene.luxcore.denoiser.enabled:
# Denoiser needs one warmup pass plus at least one sample collecting pass
min_samples = samples_per_pass * 2
else:
min_samples = samples_per_pass

if halt.samples < min_samples:
layout.label("Use at least %d samples!" % min_samples, icon=icons.WARNING)

if not config.tile.multipass_enable and halt.samples > min_samples:
layout.label("Samples halt condition overriden by disabled multipass", icon=icons.INFO)

is_adaptive_sampler = config.engine == "PATH" and config.sampler in {"SOBOL", "RANDOM"}
show_adaptive_sampling_props = halt.use_noise_thresh and is_adaptive_sampler

Expand Down

0 comments on commit 021d26d

Please sign in to comment.