diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-10-21 18:42:15 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-10-26 15:56:43 +0300 |
commit | 75704091fccb92774790f6451efe4e1d00174dad (patch) | |
tree | c011d5301dd2755c704320bf3a244dff47f5e9d0 /intern/cycles/blender/addon | |
parent | eb1fed9d60a03cc5f9e648a1efaf89019bc2d8bd (diff) |
Cycles: add additive AO support through Fast GI settings
Add a Fast GI Method, either Replace for the existing behavior, or Add
to add ambient occlusion like the old world settings.
This replaces the old Ambient Occlusion settings in the world properties.
Diffstat (limited to 'intern/cycles/blender/addon')
-rw-r--r-- | intern/cycles/blender/addon/properties.py | 13 | ||||
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 8 |
2 files changed, 19 insertions, 2 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index 2a51e0be2a4..0f92238015d 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -125,6 +125,11 @@ enum_texture_limit = ( ('8192', "8192", "Limit texture size to 8192 pixels", 7), ) +enum_fast_gi_method = ( + ('REPLACE', "Replace", "Replace global illumination with ambient occlusion after a specified number of bounces"), + ('ADD', "Add", "Add ambient occlusion to diffuse surfaces"), +) + # NOTE: Identifiers are expected to be an upper case version of identifiers from `Pass::get_type_enum()` enum_view3d_shading_render_pass = ( ('', "General", ""), @@ -724,6 +729,14 @@ class CyclesRenderSettings(bpy.types.PropertyGroup): description="Approximate diffuse indirect light with background tinted ambient occlusion. This provides fast alternative to full global illumination, for interactive viewport rendering or final renders with reduced quality", default=False, ) + + fast_gi_method: EnumProperty( + name="Fast GI Method", + default='REPLACE', + description="Fast GI approximation method", + items=enum_fast_gi_method + ) + ao_bounces: IntProperty( name="AO Bounces", default=1, diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 0ed2dd24f2e..facf1b08676 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -465,8 +465,7 @@ class CYCLES_RENDER_PT_light_paths_fast_gi(CyclesButtonsPanel, Panel): layout.active = cscene.use_fast_gi col = layout.column(align=True) - col.prop(cscene, "ao_bounces", text="Viewport Bounces") - col.prop(cscene, "ao_bounces_render", text="Render Bounces") + col.prop(cscene, "fast_gi_method", text="Method") if world: light = world.light_settings @@ -474,6 +473,11 @@ class CYCLES_RENDER_PT_light_paths_fast_gi(CyclesButtonsPanel, Panel): col.prop(light, "ao_factor", text="AO Factor") col.prop(light, "distance", text="AO Distance") + if cscene.fast_gi_method == 'REPLACE': + col = layout.column(align=True) + col.prop(cscene, "ao_bounces", text="Viewport Bounces") + col.prop(cscene, "ao_bounces_render", text="Render Bounces") + class CYCLES_RENDER_PT_motion_blur(CyclesButtonsPanel, Panel): bl_label = "Motion Blur" |