diff options
author | Sergey Sharybin <sergey@blender.org> | 2021-08-03 13:20:28 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2021-08-04 18:26:24 +0300 |
commit | c18d91918fbb18d8c0d2e95de210ba818937cd87 (patch) | |
tree | 1f12519ad0f9ad4dd815adebac61b5ac57e8f287 /intern/cycles/blender/addon | |
parent | 58ba75f9e3bfc4ff08dbd1f2ce269c65388dfcfd (diff) |
Cycles: More flexible GI Approximation AO distance control
The goal: allow to easily use AO approximation in scenes which combines
both small and large scale objects.
The idea: use per-object AO distance which will allow to override world
settings. Instancer object will "propagate" its AO distance to all its
instances unless the instance defines own distance (this allows to
modify AO distance in the shot files, without requiring to modify props
used in the shots.
Available from the new Fats GI Approximation panel in object properties.
Differential Revision: https://developer.blender.org/D12112
Diffstat (limited to 'intern/cycles/blender/addon')
-rw-r--r-- | intern/cycles/blender/addon/properties.py | 8 | ||||
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 21 |
2 files changed, 29 insertions, 0 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index 4cd75edee5f..70efb1054a2 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -1268,6 +1268,14 @@ class CyclesObjectSettings(bpy.types.PropertyGroup): default=0.1, ) + ao_distance: FloatProperty( + name="AO Distance", + description="AO distance used for approximate global illumination (0 means use world setting)", + min=0.0, + default=0.0, + subtype='DISTANCE', + ) + is_shadow_catcher: BoolProperty( name="Shadow Catcher", description="Only render shadows on this object, for compositing renders into real footage", diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index e9a4ce77080..8846c621529 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -1228,6 +1228,26 @@ class CYCLES_OBJECT_PT_shading_shadow_terminator(CyclesButtonsPanel, Panel): flow.prop(cob, "shadow_terminator_offset", text="Shading Offset") +class CYCLES_OBJECT_PT_gi_approximation(CyclesButtonsPanel, Panel): + bl_label = "Fast GI Approximation" + bl_context = "object" + bl_options = {'DEFAULT_CLOSED'} + + def draw(self, context): + layout = self.layout + layout.use_property_split = True + + scene = context.scene + ob = context.object + + cob = ob.cycles + cscene = scene.cycles + + col = layout.column() + col.active = cscene.use_fast_gi + col.prop(cob, "ao_distance") + + class CYCLES_OBJECT_PT_visibility(CyclesButtonsPanel, Panel): bl_label = "Visibility" bl_context = "object" @@ -2305,6 +2325,7 @@ classes = ( CYCLES_OBJECT_PT_motion_blur, CYCLES_OBJECT_PT_shading, CYCLES_OBJECT_PT_shading_shadow_terminator, + CYCLES_OBJECT_PT_gi_approximation, CYCLES_OBJECT_PT_visibility, CYCLES_OBJECT_PT_visibility_ray_visibility, CYCLES_OBJECT_PT_visibility_culling, |