diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-28 00:40:08 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-28 00:40:08 +0300 |
commit | 5445dda2956d64385b20874592b3305b7056505a (patch) | |
tree | 59975e804583931180994c24b0d3d04e485e7d0f /release/scripts/ui | |
parent | 478dc000b3d65af48422154769641a3ecbe071d8 (diff) |
Ambient Occlusion split up into:
Ambient occlusion: multiplied with direct lighting by default, add
is also still available and more blending methods might be added if
they are useful. This is fundamentally a non physical effect.
Environment lighting: always added as you would expect (though you can
subtract by specifying negative energy). This can be just white or take
colors or textures from the world.
Indirect lighting: only supported for AAO at the moment (and is still
too approximate), and also is always added. A factor is available to
specify how much is added, though value 1.0 is correct.
Also:
* Material ambient value now defaults to 1.0.
* Added Environment, Indirect and Emit pass.
* "Both" blending method is no longer available.
* Attenuation, sampling parameters are still shared, some could be split
up, though if they are different this would affect performance.
Diffstat (limited to 'release/scripts/ui')
-rw-r--r-- | release/scripts/ui/properties_render.py | 12 | ||||
-rw-r--r-- | release/scripts/ui/properties_world.py | 123 |
2 files changed, 89 insertions, 46 deletions
diff --git a/release/scripts/ui/properties_render.py b/release/scripts/ui/properties_render.py index 90f54851020..d837f5f1b79 100644 --- a/release/scripts/ui/properties_render.py +++ b/release/scripts/ui/properties_render.py @@ -137,11 +137,11 @@ class RENDER_PT_layers(RenderButtonsPanel): col.prop(rl, "pass_uv") col.prop(rl, "pass_mist") col.prop(rl, "pass_object_index") + col.prop(rl, "pass_color") if wide_ui: col = split.column() col.label() - col.prop(rl, "pass_color") col.prop(rl, "pass_diffuse") row = col.row() row.prop(rl, "pass_specular") @@ -150,16 +150,24 @@ class RENDER_PT_layers(RenderButtonsPanel): row.prop(rl, "pass_shadow") row.prop(rl, "pass_shadow_exclude", text="", icon='X') row = col.row() + row.prop(rl, "pass_emit") + row.prop(rl, "pass_emit_exclude", text="", icon='X') + row = col.row() row.prop(rl, "pass_ao") row.prop(rl, "pass_ao_exclude", text="", icon='X') row = col.row() + row.prop(rl, "pass_environment") + row.prop(rl, "pass_environment_exclude", text="", icon='X') + row = col.row() + row.prop(rl, "pass_indirect") + row.prop(rl, "pass_indirect_exclude", text="", icon='X') + row = col.row() row.prop(rl, "pass_reflection") row.prop(rl, "pass_reflection_exclude", text="", icon='X') row = col.row() row.prop(rl, "pass_refraction") row.prop(rl, "pass_refraction_exclude", text="", icon='X') - class RENDER_PT_shading(RenderButtonsPanel): bl_label = "Shading" COMPAT_ENGINES = {'BLENDER_RENDER'} diff --git a/release/scripts/ui/properties_world.py b/release/scripts/ui/properties_world.py index c4eaa049ce6..2633aeb6cc9 100644 --- a/release/scripts/ui/properties_world.py +++ b/release/scripts/ui/properties_world.py @@ -105,6 +105,7 @@ class WORLD_PT_world(WorldButtonsPanel): class WORLD_PT_mist(WorldButtonsPanel): bl_label = "Mist" + bl_default_closed = True COMPAT_ENGINES = {'BLENDER_RENDER'} def draw_header(self, context): @@ -135,6 +136,7 @@ class WORLD_PT_mist(WorldButtonsPanel): class WORLD_PT_stars(WorldButtonsPanel): bl_label = "Stars" + bl_default_closed = True COMPAT_ENGINES = {'BLENDER_RENDER'} def draw_header(self, context): @@ -166,77 +168,110 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel): COMPAT_ENGINES = {'BLENDER_RENDER'} def draw_header(self, context): - world = context.world - - self.layout.prop(world.ambient_occlusion, "enabled", text="") + light = context.world.lighting + self.layout.prop(light, "use_ambient_occlusion", text="") def draw(self, context): layout = self.layout - wide_ui = context.region.width > narrowui - ao = context.world.ambient_occlusion + light = context.world.lighting + + layout.active = light.use_ambient_occlusion + + split = layout.split() + split.prop(light, "ao_factor", text="Factor") + split.prop(light, "ao_blend_mode", text="") - layout.active = ao.enabled +class WORLD_PT_environment_lighting(WorldButtonsPanel): + bl_label = "Environment Lighting" + COMPAT_ENGINES = {'BLENDER_RENDER'} - layout.prop(ao, "gather_method", expand=True) + def draw_header(self, context): + light = context.world.lighting + self.layout.prop(light, "use_environment_lighting", text="") + + def draw(self, context): + layout = self.layout + light = context.world.lighting + + layout.active = light.use_environment_lighting split = layout.split() + split.prop(light, "environment_energy", text="Energy") + split.prop(light, "environment_color", text="") - col = split.column() - col.label(text="Attenuation:") - if ao.gather_method == 'RAYTRACE': - col.prop(ao, "distance") - col.prop(ao, "falloff") - sub = col.row() - sub.active = ao.falloff - sub.prop(ao, "falloff_strength", text="Strength") +class WORLD_PT_indirect_lighting(WorldButtonsPanel): + bl_label = "Indirect Lighting" + COMPAT_ENGINES = {'BLENDER_RENDER'} - if ao.gather_method == 'RAYTRACE': - if wide_ui: - col = split.column() + def draw_header(self, context): + light = context.world.lighting + self.layout.prop(light, "use_indirect_lighting", text="") - col.label(text="Sampling:") - col.prop(ao, "sample_method", text="") + def draw(self, context): + layout = self.layout + light = context.world.lighting - sub = col.column() - sub.prop(ao, "samples") + layout.active = light.use_indirect_lighting - if ao.sample_method == 'ADAPTIVE_QMC': - sub.prop(ao, "threshold") - sub.prop(ao, "adapt_to_speed", slider=True) - elif ao.sample_method == 'CONSTANT_JITTERED': - sub.prop(ao, "bias") + split = layout.split() + split.prop(light, "indirect_factor", text="Factor") + split.prop(light, "indirect_bounces", text="Bounces") - if ao.gather_method == 'APPROXIMATE': - if wide_ui: - col = split.column() +class WORLD_PT_gather(WorldButtonsPanel): + bl_label = "Gather" + COMPAT_ENGINES = {'BLENDER_RENDER'} - col.label(text="Sampling:") - col.prop(ao, "passes") - col.prop(ao, "error_tolerance", text="Error") - col.prop(ao, "pixel_cache") - col.prop(ao, "correction") + def draw(self, context): + layout = self.layout + light = context.world.lighting - col = layout.column() - col.label(text="Influence:") + layout.active = light.use_ambient_occlusion or light.use_environment_lighting or light.use_indirect_lighting - col.row().prop(ao, "blend_mode", expand=True) + layout.prop(light, "gather_method", expand=True) split = layout.split() col = split.column() - col.prop(ao, "energy") - col.prop(ao, "indirect_energy") + col.label(text="Attenuation:") + if light.gather_method == 'RAYTRACE': + col.prop(light, "distance") + col.prop(light, "falloff") + sub = col.row() + sub.active = light.falloff + sub.prop(light, "falloff_strength", text="Strength") - if wide_ui: + if light.gather_method == 'RAYTRACE': col = split.column() - col.prop(ao, "color") - col.prop(ao, "indirect_bounces") + + col.label(text="Sampling:") + col.prop(light, "sample_method", text="") + + sub = col.column() + sub.prop(light, "samples") + + if light.sample_method == 'ADAPTIVE_QMC': + sub.prop(light, "threshold") + sub.prop(light, "adapt_to_speed", slider=True) + elif light.sample_method == 'CONSTANT_JITTERED': + sub.prop(light, "bias") + + if light.gather_method == 'APPROXIMATE': + col = split.column() + + col.label(text="Sampling:") + col.prop(light, "passes") + col.prop(light, "error_tolerance", text="Error") + col.prop(light, "pixel_cache") + col.prop(light, "correction") bpy.types.register(WORLD_PT_context_world) bpy.types.register(WORLD_PT_preview) bpy.types.register(WORLD_PT_world) bpy.types.register(WORLD_PT_ambient_occlusion) +bpy.types.register(WORLD_PT_environment_lighting) +bpy.types.register(WORLD_PT_indirect_lighting) +bpy.types.register(WORLD_PT_gather) bpy.types.register(WORLD_PT_mist) bpy.types.register(WORLD_PT_stars) -bpy.types.register(WORLD_PT_custom_props)
\ No newline at end of file +bpy.types.register(WORLD_PT_custom_props) |