[Bf-blender-cvs] [15c2801aac3] blender2.8: Move EEVEE properties into scene
Dalai Felinto
noreply at git.blender.org
Wed May 16 23:16:16 CEST 2018
Commit: 15c2801aac333341f0993f53a714a66f9f2384b2
Author: Dalai Felinto
Date: Wed May 16 19:34:24 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB15c2801aac333341f0993f53a714a66f9f2384b2
Move EEVEE properties into scene
We handle doversion for the scene properties, but not for the
view layer overrides.
Overrides will be implemented in a different way via dynamic overrides.
For now this data is completely lost.
===================================================================
M release/scripts/startup/bl_ui/properties_render.py
M source/blender/blenkernel/intern/scene.c
M source/blender/blenloader/intern/versioning_280.c
M source/blender/draw/engines/eevee/eevee_bloom.c
M source/blender/draw/engines/eevee/eevee_depth_of_field.c
M source/blender/draw/engines/eevee/eevee_engine.c
M source/blender/draw/engines/eevee/eevee_lightprobes.c
M source/blender/draw/engines/eevee/eevee_lights.c
M source/blender/draw/engines/eevee/eevee_motion_blur.c
M source/blender/draw/engines/eevee/eevee_occlusion.c
M source/blender/draw/engines/eevee/eevee_private.h
M source/blender/draw/engines/eevee/eevee_render.c
M source/blender/draw/engines/eevee/eevee_screen_raytrace.c
M source/blender/draw/engines/eevee/eevee_subsurface.c
M source/blender/draw/engines/eevee/eevee_temporal_sampling.c
M source/blender/draw/engines/eevee/eevee_volumes.c
M source/blender/editors/space_view3d/space_view3d.c
M source/blender/makesdna/DNA_scene_types.h
M source/blender/makesrna/RNA_access.h
M source/blender/makesrna/intern/rna_layer.c
M source/blender/makesrna/intern/rna_scene.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index e6d5d9bf837..170f2627af5 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -475,13 +475,13 @@ class RENDER_PT_eevee_ambient_occlusion(RenderButtonsPanel, Panel):
def draw_header(self, context):
scene = context.scene
- props = scene.layer_properties['BLENDER_EEVEE']
+ props = scene.eevee
self.layout.prop(props, "gtao_enable", text="")
def draw(self, context):
layout = self.layout
scene = context.scene
- props = scene.layer_properties['BLENDER_EEVEE']
+ props = scene.eevee
layout.active = props.gtao_enable
col = layout.column()
@@ -503,13 +503,13 @@ class RENDER_PT_eevee_motion_blur(RenderButtonsPanel, Panel):
def draw_header(self, context):
scene = context.scene
- props = scene.layer_properties['BLENDER_EEVEE']
+ props = scene.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']
+ props = scene.eevee
layout.active = props.motion_blur_enable
col = layout.column()
@@ -528,13 +528,13 @@ class RENDER_PT_eevee_depth_of_field(RenderButtonsPanel, Panel):
def draw_header(self, context):
scene = context.scene
- props = scene.layer_properties['BLENDER_EEVEE']
+ props = scene.eevee
self.layout.prop(props, "dof_enable", text="")
def draw(self, context):
layout = self.layout
scene = context.scene
- props = scene.layer_properties['BLENDER_EEVEE']
+ props = scene.eevee
layout.active = props.dof_enable
col = layout.column()
@@ -553,13 +553,13 @@ class RENDER_PT_eevee_bloom(RenderButtonsPanel, Panel):
def draw_header(self, context):
scene = context.scene
- props = scene.layer_properties['BLENDER_EEVEE']
+ props = scene.eevee
self.layout.prop(props, "bloom_enable", text="")
def draw(self, context):
layout = self.layout
scene = context.scene
- props = scene.layer_properties['BLENDER_EEVEE']
+ props = scene.eevee
layout.active = props.bloom_enable
col = layout.column()
@@ -582,13 +582,13 @@ class RENDER_PT_eevee_volumetric(RenderButtonsPanel, Panel):
def draw_header(self, context):
scene = context.scene
- props = scene.layer_properties['BLENDER_EEVEE']
+ props = scene.eevee
self.layout.prop(props, "volumetric_enable", text="")
def draw(self, context):
layout = self.layout
scene = context.scene
- props = scene.layer_properties['BLENDER_EEVEE']
+ props = scene.eevee
layout.active = props.volumetric_enable
col = layout.column()
@@ -615,13 +615,13 @@ class RENDER_PT_eevee_subsurface_scattering(RenderButtonsPanel, Panel):
def draw_header(self, context):
scene = context.scene
- props = scene.layer_properties['BLENDER_EEVEE']
+ props = scene.eevee
self.layout.prop(props, "sss_enable", text="")
def draw(self, context):
layout = self.layout
scene = context.scene
- props = scene.layer_properties['BLENDER_EEVEE']
+ props = scene.eevee
col = layout.column()
col.prop(props, "sss_samples")
@@ -640,13 +640,13 @@ class RENDER_PT_eevee_screen_space_reflections(RenderButtonsPanel, Panel):
def draw_header(self, context):
scene = context.scene
- props = scene.layer_properties['BLENDER_EEVEE']
+ props = scene.eevee
self.layout.prop(props, "ssr_enable", text="")
def draw(self, context):
layout = self.layout
scene = context.scene
- props = scene.layer_properties['BLENDER_EEVEE']
+ props = scene.eevee
col = layout.column()
col.active = props.ssr_enable
@@ -671,7 +671,7 @@ class RENDER_PT_eevee_shadows(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
scene = context.scene
- props = scene.layer_properties['BLENDER_EEVEE']
+ props = scene.eevee
col = layout.column()
col.prop(props, "shadow_method")
@@ -692,7 +692,7 @@ class RENDER_PT_eevee_sampling(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
scene = context.scene
- props = scene.layer_properties['BLENDER_EEVEE']
+ props = scene.eevee
col = layout.column()
col.prop(props, "taa_samples")
@@ -712,7 +712,7 @@ class RENDER_PT_eevee_indirect_lighting(RenderButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
scene = context.scene
- props = scene.layer_properties['BLENDER_EEVEE']
+ props = scene.eevee
col = layout.column()
col.prop(props, "gi_diffuse_bounces")
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 2538a0c237b..f387ad0d4ef 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -826,6 +826,60 @@ void BKE_scene_init(Scene *sce)
/* SceneDisplay */
copy_v3_v3(sce->display.light_direction, (float[3]){-M_SQRT1_3, -M_SQRT1_3, M_SQRT1_3});
sce->display.shadow_shift = 0.1;
+
+ /* SceneEEVEE */
+ sce->eevee.gi_diffuse_bounces = 3;
+ sce->eevee.gi_cubemap_resolution = 512;
+ sce->eevee.gi_visibility_resolution = 32;
+
+ sce->eevee.taa_samples = 16;
+ sce->eevee.taa_render_samples = 64;
+
+ sce->eevee.sss_samples = 7;
+ sce->eevee.sss_jitter_threshold = 0.3f;
+
+ sce->eevee.ssr_quality = 0.25f;
+ sce->eevee.ssr_max_roughness = 0.5f;
+ sce->eevee.ssr_thickness = 0.2f;
+ sce->eevee.ssr_border_fade = 0.075f;
+ sce->eevee.ssr_firefly_fac = 10.0f;
+
+ sce->eevee.volumetric_start = 0.1f;
+ sce->eevee.volumetric_end = 100.0f;
+ sce->eevee.volumetric_tile_size = 8;
+ sce->eevee.volumetric_samples = 64;
+ sce->eevee.volumetric_sample_distribution = 0.8f;
+ sce->eevee.volumetric_light_clamp = 0.0f;
+ sce->eevee.volumetric_shadow_samples = 16;
+
+ sce->eevee.gtao_distance = 0.2f;
+ sce->eevee.gtao_factor = 1.0f;
+ sce->eevee.gtao_quality = 0.25f;
+
+ sce->eevee.bokeh_max_size = 100.0f;
+ sce->eevee.bokeh_threshold = 1.0f;
+
+ copy_v3_fl(sce->eevee.bloom_color, 1.0f);
+ sce->eevee.bloom_threshold = 0.8f;
+ sce->eevee.bloom_knee = 0.5f;
+ sce->eevee.bloom_intensity = 0.8f;
+ sce->eevee.bloom_radius = 6.5f;
+ sce->eevee.bloom_clamp = 1.0f;
+
+ sce->eevee.motion_blur_samples = 8;
+ sce->eevee.motion_blur_shutter = 1.0f;
+
+ sce->eevee.shadow_method = SHADOW_ESM;
+ sce->eevee.shadow_cube_size = 512;
+ sce->eevee.shadow_cascade_size = 1024;
+
+ sce->eevee.flag =
+ SCE_EEVEE_VOLUMETRIC_LIGHTS |
+ SCE_EEVEE_VOLUMETRIC_COLORED |
+ SCE_EEVEE_GTAO_BENT_NORMALS |
+ SCE_EEVEE_GTAO_BOUNCE |
+ SCE_EEVEE_TAA_REPROJECTION |
+ SCE_EEVEE_SSR_HALF_RESOLUTION;
}
Scene *BKE_scene_add(Main *bmain, const char *name)
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 4668241d9dd..9c0ad15831b 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -1104,5 +1104,187 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *main)
scene->toolsettings->transform_pivot_point = V3D_AROUND_CENTER_MEAN;
}
}
+
+ if (!DNA_struct_find(fd->filesdna, "SceneEEVEE")) {
+ for (Scene *scene = main->scene.first; scene; scene = scene->id.next) {
+ /* First set the default for all the properties. */
+
+ scene->eevee.gi_diffuse_bounces = 3;
+ scene->eevee.gi_cubemap_resolution = 512;
+ scene->eevee.gi_visibility_resolution = 32;
+
+ scene->eevee.taa_samples = 16;
+ scene->eevee.taa_render_samples = 64;
+
+ scene->eevee.sss_samples = 7;
+ scene->eevee.sss_jitter_threshold = 0.3f;
+
+ scene->eevee.ssr_quality = 0.25f;
+ scene->eevee.ssr_max_roughness = 0.5f;
+ scene->eevee.ssr_thickness = 0.2f;
+ scene->eevee.ssr_border_fade = 0.075f;
+ scene->eevee.ssr_firefly_fac = 10.0f;
+
+ scene->eevee.volumetric_start = 0.1f;
+ scene->eevee.volumetric_end = 100.0f;
+ scene->eevee.volumetric_tile_size = 8;
+ scene->eevee.volumetric_samples = 64;
+ scene->eevee.volumetric_sample_distribution = 0.8f;
+ scene->eevee.volumetric_light_clamp = 0.0f;
+ scene->eevee.volumetric_shadow_samples = 16;
+
+ scene->eevee.gtao_distance = 0.2f;
+ scene->eevee.gtao_factor = 1.0f;
+ scene->eevee.gtao_quality = 0.25f;
+
+ scene->eevee.bokeh_max_size = 100.0f;
+ scene->eevee.bokeh_threshold = 1.0f;
+
+ copy_v3_fl(scene->eevee.bloom_color, 1.0f);
+ scene->eevee.bloom_threshold = 0.8f;
+ scene->eevee.bloom_knee = 0.5f;
+ scene->eevee.bloom_intensity = 0.8f;
+ scene->eevee.bloom_radius = 6.5f;
+ scene->eevee.bloom_clamp = 1.0f;
+
+ scene->eevee.motion_blur_samples = 8;
+ scene->eevee.motion_blur_shutter = 1.0f;
+
+ scene->eevee.shadow_method = SHADOW_ESM;
+ scene->eevee.shadow_cube_size = 512;
+ scene->eevee.shadow_cascade_size = 1024;
+
+ scene->eevee.flag =
+ SCE_EEVEE_VOLUMETRIC_LIGHTS |
+ SCE_EEVEE_VOLUMETRIC_COLORED |
+ SCE_EEVEE_GTAO_BENT_NORMALS |
+ SCE_EEVEE_GTAO_BOUNCE |
+ SCE_EEVEE_TAA_REPROJECTION |
+ SCE_EEVEE_SSR_HALF_RESOLUTION;
+
+
+ /* If the file is pre-2.80 move on. */
+ if (scene->layer_properties == NULL) {
+ continue;
+ }
+
+ /* Now we handle eventual properties that may be set in the file. */
+#define EEVEE_GET_BOOL(_props, _name, _flag) \
+ { \
+ IDProperty *_idprop = IDP_GetPropertyFromGroup(_props, #_name); \
+ if (_idprop != NULL) { \
+ const int _value = IDP_Int(_idprop); \
+ if (_value) { \
+ scene->eevee.flag |= _f
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list