diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2018-11-26 18:49:56 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2018-11-26 19:31:18 +0300 |
commit | c0816cd03b42399e75a285d5e5dd1319e5054f17 (patch) | |
tree | 563c3c6a3025cc5a81f6a99cfc3306ff99898922 /release | |
parent | 9238b7308a3f0b2716237b36dbe9fe16ce4e041c (diff) |
Workbench: Add Curvature overlay for better visibility of surface detail for e.g. sculpting
The approach is fairly simple, just apply an edge detection filter to the view normal and scale the brightness based on that.
The overlay is disabled at object boundaries to avoid dark lines around objects.
Generally, this implementation follows the proposal of @monio at https://blender.community/c/rightclickselect/J9bbbc.
The changes are:
- Dynamic filter radius (on high-DPI displays, a radius of two is used)
- Options to reduce the strength of both ridges and valleys
- Tweaked function for the strength reduction (the original method actually had a local maximum, resulting in a brighter line inside valleys)
- Multiplication for blending instead of overlay, which doesn't work reliably with scene-referred intensities
- Renamed to point out the distinction between it and the SSAO-based cavity overlay
Reviewers: jbakker
Reviewed By: jbakker
Subscribers: billreynish, manitwo, linko, monio
Differential Revision: https://developer.blender.org/D3617
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index d8dcd94902b..07b71136d8b 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -4325,16 +4325,25 @@ class VIEW3D_PT_shading_options(Panel): row.active = not shading.show_xray row.prop(shading, "show_cavity") - if shading.show_cavity: - sub = col.row(align=True) - sub.active = not shading.show_xray and shading.show_cavity - sub.prop(shading, "cavity_ridge_factor") - sub.prop(shading, "cavity_valley_factor") - sub.popover( - panel="VIEW3D_PT_shading_options_ssao", - icon='PREFERENCES', - text="" - ) + if shading.show_cavity and not shading.show_xray: + row.prop(shading, "cavity_type", text="Type") + + if shading.cavity_type in {'WORLD', 'BOTH'}: + col.label(text="World Space") + sub = col.row(align=True) + sub.prop(shading, "cavity_ridge_factor", text="Ridge") + sub.prop(shading, "cavity_valley_factor", text="Valley") + sub.popover( + panel="VIEW3D_PT_shading_options_ssao", + icon='PREFERENCES', + text="" + ) + + if shading.cavity_type in {'SCREEN', 'BOTH'}: + col.label(text="Screen Space") + sub = col.row(align=True) + sub.prop(shading, "curvature_ridge_factor", text="Ridge") + sub.prop(shading, "curvature_valley_factor", text="Valley") row = layout.split() row.prop(shading, "show_object_outline") |