Cycles: fix sampling issue with certain (transparent) max bounce settings, and

tweak presets/defaults to use 128 instead of 1024.
This commit is contained in:
Brecht Van Lommel 2011-10-16 17:06:01 +00:00
parent 7b1ef0f416
commit 7600c687b2
3 changed files with 11 additions and 9 deletions

@ -55,16 +55,18 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
default=8, min=0, max=1024)
cls.diffuse_bounces = IntProperty(name="Diffuse Bounces", description="Maximum number of diffuse reflection bounces, bounded by total maximum",
default=1024, min=0, max=1024)
default=128, min=0, max=1024)
cls.glossy_bounces = IntProperty(name="Glossy Bounces", description="Maximum number of glossy reflection bounces, bounded by total maximum",
default=1024, min=0, max=1024)
default=128, min=0, max=1024)
cls.transmission_bounces = IntProperty(name="Transmission Bounces", description="Maximum number of transmission bounces, bounded by total maximum",
default=1024, min=0, max=1024)
default=128, min=0, max=1024)
cls.transparent_min_bounces = IntProperty(name="Transparent Min Bounces", description="Minimum number of transparent bounces, setting this lower than the maximum enables probalistic path termination (faster but noisier)",
default=8, min=0, max=1024)
cls.transparent_max_bounces = IntProperty(name="Transparent Max Bounces", description="Maximum number of transparent bounces",
default=8, min=0, max=1024)
cls.use_transparent_shadows = BoolProperty(name="Transparent Shadows", description="Use transparency of surfaces for rendering shadows",
default=True)
cls.film_exposure = FloatProperty(name="Exposure", description="Image brightness scale",
default=1.0, min=0.0, max=10.0)

@ -80,7 +80,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene)
kintegrator->blur_caustics = blur_caustics;
/* sobol directions table */
int dimensions = PRNG_BASE_NUM + (max_bounce + 2)*PRNG_BOUNCE_NUM;
int dimensions = PRNG_BASE_NUM + (max_bounce + transparent_max_bounce + 2)*PRNG_BOUNCE_NUM;
uint *directions = dscene->sobol_directions.resize(SOBOL_BITS*dimensions);
sobol_generate_direction_vectors((uint(*)[SOBOL_BITS])directions, dimensions);

@ -1,11 +1,11 @@
import bpy
cycles = bpy.context.scene.cycles
cycles.max_bounces = 1024
cycles.max_bounces = 128
cycles.min_bounces = 3
cycles.no_caustics = False
cycles.diffuse_bounces = 1024
cycles.glossy_bounces = 1024
cycles.transmission_bounces = 1024
cycles.diffuse_bounces = 128
cycles.glossy_bounces = 128
cycles.transmission_bounces = 128
cycles.transparent_min_bounces = 8
cycles.transparent_max_bounces = 1024
cycles.transparent_max_bounces = 128