Eevee: Some changes to the Render / Render layers settings panel.

- Separate the Post Processes settings into sub panel.
- Rename "Viewport Anti-Aliasing" to sampling & super-sampling as it also reduce the noise of other effects.
- Remove Temporal Anti-Aliasing toggle and make it always active unless the number of samples is 1.
This commit is contained in:
Clément Foucault 2017-10-03 18:30:36 +02:00
parent 57c323b5d3
commit 9422db7796
5 changed files with 208 additions and 96 deletions

View File

@ -587,8 +587,9 @@ class RENDER_PT_clay_collection_settings(RenderButtonsPanel, Panel):
col.prop(props, "hair_brightness_randomness")
class RENDER_PT_eevee_poststack_settings(RenderButtonsPanel, Panel):
bl_label = "Post Process Stack"
class RENDER_PT_eevee_ambient_occlusion(RenderButtonsPanel, Panel):
bl_label = "Ambient Occlusion"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
@ -596,35 +597,18 @@ class RENDER_PT_eevee_poststack_settings(RenderButtonsPanel, Panel):
scene = context.scene
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
def draw_header(self, context):
scene = context.scene
props = scene.layer_properties['BLENDER_EEVEE']
col = layout.column()
col.prop(props, "gtao_enable")
col.prop(props, "motion_blur_enable")
col.prop(props, "dof_enable")
col.prop(props, "bloom_enable")
class RENDER_PT_eevee_postprocess_settings(RenderButtonsPanel, Panel):
bl_label = "Post Process Settings"
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
def poll(cls, context):
scene = context.scene
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
self.layout.prop(props, "gtao_enable", text="")
def draw(self, context):
layout = self.layout
scene = context.scene
props = scene.layer_properties['BLENDER_EEVEE']
layout.active = props.gtao_enable
col = layout.column()
col.label("Ambient Occlusion:")
col.prop(props, "gtao_use_bent_normals")
col.prop(props, "gtao_denoise")
col.prop(props, "gtao_bounce")
@ -632,19 +616,82 @@ class RENDER_PT_eevee_postprocess_settings(RenderButtonsPanel, Panel):
col.prop(props, "gtao_distance")
col.prop(props, "gtao_factor")
col.prop(props, "gtao_quality")
col.separator()
col.label("Motion Blur:")
class RENDER_PT_eevee_motion_blur(RenderButtonsPanel, Panel):
bl_label = "Motion Blur"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
def poll(cls, context):
scene = context.scene
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
def draw_header(self, context):
scene = context.scene
props = scene.layer_properties['BLENDER_EEVEE']
self.layout.prop(props, "motion_blur_enable", text="")
def draw(self, context):
layout = self.layout
scene = context.scene
props = scene.layer_properties['BLENDER_EEVEE']
layout.active = props.motion_blur_enable
col = layout.column()
col.prop(props, "motion_blur_samples")
col.prop(props, "motion_blur_shutter")
col.separator()
col.label("Depth of Field:")
class RENDER_PT_eevee_depth_of_field(RenderButtonsPanel, Panel):
bl_label = "Depth of Field"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
def poll(cls, context):
scene = context.scene
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
def draw_header(self, context):
scene = context.scene
props = scene.layer_properties['BLENDER_EEVEE']
self.layout.prop(props, "dof_enable", text="")
def draw(self, context):
layout = self.layout
scene = context.scene
props = scene.layer_properties['BLENDER_EEVEE']
layout.active = props.dof_enable
col = layout.column()
col.prop(props, "bokeh_max_size")
col.prop(props, "bokeh_threshold")
col.separator()
col.label("Bloom:")
class RENDER_PT_eevee_bloom(RenderButtonsPanel, Panel):
bl_label = "Bloom"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
def poll(cls, context):
scene = context.scene
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
def draw_header(self, context):
scene = context.scene
props = scene.layer_properties['BLENDER_EEVEE']
self.layout.prop(props, "bloom_enable", text="")
def draw(self, context):
layout = self.layout
scene = context.scene
props = scene.layer_properties['BLENDER_EEVEE']
layout.active = props.bloom_enable
col = layout.column()
col.prop(props, "bloom_threshold")
col.prop(props, "bloom_knee")
col.prop(props, "bloom_radius")
@ -655,6 +702,7 @@ class RENDER_PT_eevee_postprocess_settings(RenderButtonsPanel, Panel):
class RENDER_PT_eevee_volumetric(RenderButtonsPanel, Panel):
bl_label = "Volumetric"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
@ -687,6 +735,7 @@ class RENDER_PT_eevee_volumetric(RenderButtonsPanel, Panel):
class RENDER_PT_eevee_screen_space_reflections(RenderButtonsPanel, Panel):
bl_label = "Screen Space Reflections"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
@ -705,6 +754,7 @@ class RENDER_PT_eevee_screen_space_reflections(RenderButtonsPanel, Panel):
props = scene.layer_properties['BLENDER_EEVEE']
col = layout.column()
col.active = props.ssr_enable
col.prop(props, "ssr_refraction")
col.prop(props, "ssr_halfres")
col.prop(props, "ssr_ray_count")
@ -717,6 +767,7 @@ class RENDER_PT_eevee_screen_space_reflections(RenderButtonsPanel, Panel):
class RENDER_PT_eevee_shadows(RenderButtonsPanel, Panel):
bl_label = "Shadows"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
@ -735,8 +786,9 @@ class RENDER_PT_eevee_shadows(RenderButtonsPanel, Panel):
col.prop(props, "shadow_high_bitdepth")
class RENDER_PT_eevee_antialiasing(RenderButtonsPanel, Panel):
bl_label = "Viewport Anti Aliasing"
class RENDER_PT_eevee_sampling(RenderButtonsPanel, Panel):
bl_label = "Sampling"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
@ -750,12 +802,12 @@ class RENDER_PT_eevee_antialiasing(RenderButtonsPanel, Panel):
props = scene.layer_properties['BLENDER_EEVEE']
col = layout.column()
col.prop(props, "taa_enable")
col.prop(props, "taa_samples")
class RENDER_PT_eevee_global_illumination(RenderButtonsPanel, Panel):
bl_label = "Global Illumination"
class RENDER_PT_eevee_indirect_lighting(RenderButtonsPanel, Panel):
bl_label = "Indirect Lighting"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
@ -789,13 +841,15 @@ classes = (
RENDER_PT_bake,
RENDER_PT_clay_layer_settings,
RENDER_PT_clay_collection_settings,
RENDER_PT_eevee_volumetric,
RENDER_PT_eevee_screen_space_reflections,
RENDER_PT_eevee_poststack_settings,
RENDER_PT_eevee_postprocess_settings,
RENDER_PT_eevee_sampling,
RENDER_PT_eevee_shadows,
RENDER_PT_eevee_antialiasing,
RENDER_PT_eevee_global_illumination,
RENDER_PT_eevee_indirect_lighting,
RENDER_PT_eevee_screen_space_reflections,
RENDER_PT_eevee_ambient_occlusion,
RENDER_PT_eevee_volumetric,
RENDER_PT_eevee_motion_blur,
RENDER_PT_eevee_depth_of_field,
RENDER_PT_eevee_bloom,
)
if __name__ == "__main__": # only for live edit.

View File

@ -150,8 +150,9 @@ class RENDERLAYER_PT_clay_settings(RenderLayerButtonsPanel, Panel):
col.template_override_property(layer_props, scene_props, "ssao_samples")
class RENDERLAYER_PT_eevee_poststack_settings(RenderLayerButtonsPanel, Panel):
bl_label = "Post Process Stack"
class RENDERLAYER_PT_eevee_ambient_occlusion(RenderLayerButtonsPanel, Panel):
bl_label = "Ambient Occlusion"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
@ -159,6 +160,14 @@ class RENDERLAYER_PT_eevee_poststack_settings(RenderLayerButtonsPanel, Panel):
scene = context.scene
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
def draw_header(self, context):
scene = context.scene
scene_props = scene.layer_properties['BLENDER_EEVEE']
layer = bpy.context.render_layer
layer_props = layer.engine_overrides['BLENDER_EEVEE']
self.layout.template_override_property(layer_props, scene_props, "gtao_enable", text="")
def draw(self, context):
layout = self.layout
scene = context.scene
@ -167,30 +176,6 @@ class RENDERLAYER_PT_eevee_poststack_settings(RenderLayerButtonsPanel, Panel):
layer_props = layer.engine_overrides['BLENDER_EEVEE']
col = layout.column()
col.template_override_property(layer_props, scene_props, "gtao_enable")
col.template_override_property(layer_props, scene_props, "motion_blur_enable")
col.template_override_property(layer_props, scene_props, "dof_enable")
col.template_override_property(layer_props, scene_props, "bloom_enable")
class RENDERLAYER_PT_eevee_postprocess_settings(RenderLayerButtonsPanel, Panel):
bl_label = "Post Process Settings"
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
def poll(cls, context):
scene = context.scene
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
scene = context.scene
scene_props = scene.layer_properties['BLENDER_EEVEE']
layer = bpy.context.render_layer
layer_props = layer.engine_overrides['BLENDER_EEVEE']
col = layout.column()
col.label("Ambient Occlusion:")
col.template_override_property(layer_props, scene_props, "gtao_use_bent_normals")
col.template_override_property(layer_props, scene_props, "gtao_denoise")
col.template_override_property(layer_props, scene_props, "gtao_bounce")
@ -198,19 +183,94 @@ class RENDERLAYER_PT_eevee_postprocess_settings(RenderLayerButtonsPanel, Panel):
col.template_override_property(layer_props, scene_props, "gtao_distance")
col.template_override_property(layer_props, scene_props, "gtao_factor")
col.template_override_property(layer_props, scene_props, "gtao_quality")
col.separator()
col.label("Motion Blur:")
class RENDERLAYER_PT_eevee_motion_blur(RenderLayerButtonsPanel, Panel):
bl_label = "Motion Blur"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
def poll(cls, context):
scene = context.scene
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
def draw_header(self, context):
scene = context.scene
scene_props = scene.layer_properties['BLENDER_EEVEE']
layer = bpy.context.render_layer
layer_props = layer.engine_overrides['BLENDER_EEVEE']
self.layout.template_override_property(layer_props, scene_props, "motion_blur_enable", text="")
def draw(self, context):
layout = self.layout
scene = context.scene
scene_props = scene.layer_properties['BLENDER_EEVEE']
layer = bpy.context.render_layer
layer_props = layer.engine_overrides['BLENDER_EEVEE']
col = layout.column()
col.template_override_property(layer_props, scene_props, "motion_blur_samples")
col.template_override_property(layer_props, scene_props, "motion_blur_shutter")
col.separator()
col.label("Depth of Field:")
class RENDERLAYER_PT_eevee_depth_of_field(RenderLayerButtonsPanel, Panel):
bl_label = "Depth Of Field"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
def poll(cls, context):
scene = context.scene
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
def draw_header(self, context):
scene = context.scene
scene_props = scene.layer_properties['BLENDER_EEVEE']
layer = bpy.context.render_layer
layer_props = layer.engine_overrides['BLENDER_EEVEE']
self.layout.template_override_property(layer_props, scene_props, "dof_enable", text="")
def draw(self, context):
layout = self.layout
scene = context.scene
scene_props = scene.layer_properties['BLENDER_EEVEE']
layer = bpy.context.render_layer
layer_props = layer.engine_overrides['BLENDER_EEVEE']
col = layout.column()
col.template_override_property(layer_props, scene_props, "bokeh_max_size")
col.template_override_property(layer_props, scene_props, "bokeh_threshold")
col.separator()
col.label("Bloom:")
class RENDERLAYER_PT_eevee_bloom(RenderLayerButtonsPanel, Panel):
bl_label = "Bloom"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
def poll(cls, context):
scene = context.scene
return scene and (scene.render.engine in cls.COMPAT_ENGINES)
def draw_header(self, context):
scene = context.scene
scene_props = scene.layer_properties['BLENDER_EEVEE']
layer = bpy.context.render_layer
layer_props = layer.engine_overrides['BLENDER_EEVEE']
self.layout.template_override_property(layer_props, scene_props, "bloom_enable", text="")
def draw(self, context):
layout = self.layout
scene = context.scene
scene_props = scene.layer_properties['BLENDER_EEVEE']
layer = bpy.context.render_layer
layer_props = layer.engine_overrides['BLENDER_EEVEE']
col = layout.column()
col.template_override_property(layer_props, scene_props, "bloom_threshold")
col.template_override_property(layer_props, scene_props, "bloom_knee")
col.template_override_property(layer_props, scene_props, "bloom_radius")
@ -221,6 +281,7 @@ class RENDERLAYER_PT_eevee_postprocess_settings(RenderLayerButtonsPanel, Panel):
class RENDERLAYER_PT_eevee_volumetric(RenderLayerButtonsPanel, Panel):
bl_label = "Volumetric"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
@ -257,6 +318,7 @@ class RENDERLAYER_PT_eevee_volumetric(RenderLayerButtonsPanel, Panel):
class RENDERLAYER_PT_eevee_screen_space_reflections(RenderLayerButtonsPanel, Panel):
bl_label = "Screen Space Reflections"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
@ -292,6 +354,7 @@ class RENDERLAYER_PT_eevee_screen_space_reflections(RenderLayerButtonsPanel, Pan
class RENDERLAYER_PT_eevee_shadows(RenderLayerButtonsPanel, Panel):
bl_label = "Shadows"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
@ -312,8 +375,9 @@ class RENDERLAYER_PT_eevee_shadows(RenderLayerButtonsPanel, Panel):
col.template_override_property(layer_props, scene_props, "shadow_high_bitdepth")
class RENDERLAYER_PT_eevee_antialiasing(RenderLayerButtonsPanel, Panel):
bl_label = "Viewport Anti Aliasing"
class RENDERLAYER_PT_eevee_sampling(RenderLayerButtonsPanel, Panel):
bl_label = "Sampling"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
@ -329,12 +393,12 @@ class RENDERLAYER_PT_eevee_antialiasing(RenderLayerButtonsPanel, Panel):
layer_props = layer.engine_overrides['BLENDER_EEVEE']
col = layout.column()
col.template_override_property(layer_props, scene_props, "taa_enable")
col.template_override_property(layer_props, scene_props, "taa_samples")
class RENDERLAYER_PT_eevee_global_illumination(RenderLayerButtonsPanel, Panel):
bl_label = "Global Illumination"
class RENDERLAYER_PT_eevee_indirect_lighting(RenderLayerButtonsPanel, Panel):
bl_label = "Indirect Lighting"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE'}
@classmethod
@ -359,13 +423,15 @@ classes = (
RENDERLAYER_UL_renderviews,
RENDERLAYER_PT_views,
RENDERLAYER_PT_clay_settings,
RENDERLAYER_PT_eevee_poststack_settings,
RENDERLAYER_PT_eevee_postprocess_settings,
RENDERLAYER_PT_eevee_screen_space_reflections,
RENDERLAYER_PT_eevee_volumetric,
RENDERLAYER_PT_eevee_sampling,
RENDERLAYER_PT_eevee_shadows,
RENDERLAYER_PT_eevee_antialiasing,
RENDERLAYER_PT_eevee_global_illumination,
RENDERLAYER_PT_eevee_indirect_lighting,
RENDERLAYER_PT_eevee_screen_space_reflections,
RENDERLAYER_PT_eevee_ambient_occlusion,
RENDERLAYER_PT_eevee_volumetric,
RENDERLAYER_PT_eevee_motion_blur,
RENDERLAYER_PT_eevee_depth_of_field,
RENDERLAYER_PT_eevee_bloom,
)
if __name__ == "__main__": # only for live edit.

View File

@ -510,7 +510,7 @@ void EEVEE_effects_init(EEVEE_SceneLayerData *sldata, EEVEE_Data *vedata)
}
}
if (BKE_collection_engine_property_value_get_bool(props, "taa_enable")) {
if (BKE_collection_engine_property_value_get_int(props, "taa_samples") != 1) {
float persmat[4][4], viewmat[4][4];
enabled_effects |= EFFECT_TAA | EFFECT_DOUBLE_BUFFER;

View File

@ -313,7 +313,6 @@ static void EEVEE_scene_layer_settings_create(RenderEngine *UNUSED(engine), IDPr
BKE_collection_engine_property_add_int(props, "gi_diffuse_bounces", 3);
BKE_collection_engine_property_add_bool(props, "taa_enable", true);
BKE_collection_engine_property_add_int(props, "taa_samples", 8);
BKE_collection_engine_property_add_bool(props, "ssr_enable", false);

View File

@ -2572,7 +2572,6 @@ RNA_LAYER_ENGINE_EEVEE_GET_SET_FLOAT(ssr_firefly_fac)
RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(shadow_method)
RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(shadow_size)
RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(shadow_high_bitdepth)
RNA_LAYER_ENGINE_EEVEE_GET_SET_BOOL(taa_enable)
RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(taa_samples)
RNA_LAYER_ENGINE_EEVEE_GET_SET_INT(gi_diffuse_bounces)
@ -6185,24 +6184,18 @@ static void rna_def_scene_layer_engine_settings_eevee(BlenderRNA *brna)
prop = RNA_def_property(srna, "gi_diffuse_bounces", PROP_INT, PROP_NONE);
RNA_def_property_int_funcs(prop, "rna_LayerEngineSettings_Eevee_gi_diffuse_bounces_get",
"rna_LayerEngineSettings_Eevee_gi_diffuse_bounces_set", NULL);
RNA_def_property_ui_text(prop, "Bounces", "Number of time the light is reinjected inside light grids, "
"0 disable indirect diffuse light");
RNA_def_property_ui_text(prop, "Diffuse Bounces", "Number of time the light is reinjected inside light grids, "
"0 disable indirect diffuse light");
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_SceneLayerEngineSettings_update");
/* Temporal Anti-Aliasing */
prop = RNA_def_property(srna, "taa_enable", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_LayerEngineSettings_Eevee_taa_enable_get",
"rna_LayerEngineSettings_Eevee_taa_enable_set");
RNA_def_property_ui_text(prop, "Temporal Anti-Aliasing", "Enable temporal anti-aliasing (only used by viewport)");
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_SceneLayerEngineSettings_update");
/* Temporal Anti-Aliasing (super sampling) */
prop = RNA_def_property(srna, "taa_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_funcs(prop, "rna_LayerEngineSettings_Eevee_taa_samples_get",
"rna_LayerEngineSettings_Eevee_taa_samples_set", NULL);
RNA_def_property_ui_text(prop, "Samples", "Minimum number of temporal samples, unlimited if 0");
RNA_def_property_ui_text(prop, "Viewport Samples", "Number of temporal samples, unlimited if 0, "
"disabled if 1");
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, "rna_SceneLayerEngineSettings_update");