Page MenuHome

Workbench: Add Curvature overlay for better visibility of surface detail for e.g. sculpting

Authored by Lukas Stockner (lukasstockner97) on Aug 17 2018, 7:38 AM.
"Love" token, awarded by d.viagi."Love" token, awarded by shonosh."Love" token, awarded by quollism."Love" token, awarded by manitwo."Mountain of Wealth" token, awarded by craig_jones."Love" token, awarded by Zen_YS."Love" token, awarded by julperado."Like" token, awarded by erickblender."Cup of Joe" token, awarded by charlie."Party Time" token, awarded by wo262."Love" token, awarded by monio.



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 @Bartosz Moniewski (monio) at
The changes are:

  • Radius of two pixels instead of one - might not be better, though, needs some feedback
  • 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

Diff Detail

rB Blender

Event Timeline

Fix property descriptions

Wo!262 (wo262) added a subscriber: Wo!262 (wo262).
Wo!262 (wo262) removed a subscriber: Wo!262 (wo262).

Radius of 2 pixels produce quite blurry image imho. 1 px radius bumps smallest details as intended. For big and medium forms we can use SSAO cavity. Both effects works great in conjunction.

1 pixel radius

2 pixel radius

Option to reduce ridges and valleys strength separately is great. However sliders are a bit hard to work with. Values between 0.0 and 0.5 have big influence on image, 0.5 to 1.0 are subtle and 1.0 to 2.0 are barely visible. This is especially visible on ridges. Maybe exponential remapping will help. In this 0-2 range factor*factor*0.5 should be good imho.

Thanks for the test! I didn't really have a good model for testing...

In your images radius 1 definitely looks better. On my laptop, though, radius 1 is almost invisible.
Therefore, I went for a compromise - the radius is controlled by the UI scale (just like Cycles viewport rendering resolution) - on "normal" screens you get radius 1, but for high-DPI screens and/or high zoom factors you get 2.

Regarding the controls - yeah, squared controls feel more natural. I skipped the 0.5 factor since the difference between 2 and 4 isn't that noticeable (since it appears in the numerator, the clamping vanishes for larger values anyways) and that way the default of 1 remains the same.

Reworked UI as suggested by @William Reynish (billreynish), I'm not sure how to clearly separate the two sets of ridge/valley controls though.

@Lukas Stockner (lukasstockner97): I think we can just label the sliders correctly so it’s clear what applies to what. But mostly it’s not a problem anyway because mostly you will use one or the other, not both methods.

Sorting out exact layout and names are trivial to tweak once this is committed. I think we should go ahead and add this.

Technically the patch is ok. So I will approve.

This revision is now accepted and ready to land.Nov 26 2018, 3:59 PM

Here's how I think we can solve the UI, for when you pick the screen-space method, the world space method, or both:

This revision was automatically updated to reflect the committed changes.