Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2018-11-26 18:49:56 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2018-11-26 19:31:18 +0300
commitc0816cd03b42399e75a285d5e5dd1319e5054f17 (patch)
tree563c3c6a3025cc5a81f6a99cfc3306ff99898922 /source/blender/makesdna/DNA_view3d_types.h
parent9238b7308a3f0b2716237b36dbe9fe16ce4e041c (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 'source/blender/makesdna/DNA_view3d_types.h')
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index b1a19cb3edc..b06f94db064 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -144,6 +144,8 @@ typedef struct View3DShading {
char light;
char background_type;
+ char cavity_type;
+ char pad[7];
char studio_light[256]; /* FILE_MAXFILE */
char matcap[256]; /* FILE_MAXFILE */
@@ -163,6 +165,9 @@ typedef struct View3DShading {
float background_color[3];
+ float curvature_ridge_factor;
+ float curvature_valley_factor;
+
} View3DShading;
/* 3D Viewport Overlay settings */
@@ -406,6 +411,13 @@ enum {
V3D_SHADING_BACKGROUND_VIEWPORT = 2,
};
+/* View3DShading->cavity_type */
+enum {
+ V3D_SHADING_CAVITY_SSAO = 0,
+ V3D_SHADING_CAVITY_CURVATURE = 1,
+ V3D_SHADING_CAVITY_BOTH = 2,
+};
+
/* View3DOverlay->flag */
enum {
V3D_OVERLAY_FACE_ORIENTATION = (1 << 0),