I'd like to shade the edges of my objects darker, like a toon shader, based on abrupt Z depth transitions to neighboring pixels -- in other words wherever the Z gradient is high, darken the image. I imagine that can be done in the compositor (?), but can it be done in object space in the material shader editor?
$\begingroup$
$\endgroup$
6
-
$\begingroup$ Can you show an example of result? $\endgroup$– CarloJan 19, 2021 at 20:31
-
$\begingroup$ Added a couple of samples of what I'm looking for. $\endgroup$– GaryOJan 19, 2021 at 20:50
-
$\begingroup$ Have you tried freestyle? $\endgroup$– susuJan 19, 2021 at 20:54
-
$\begingroup$ blender.stackexchange.com/questions/192498/… $\endgroup$– susuJan 19, 2021 at 20:56
-
$\begingroup$ I have tried using Fresnel but that's only based on the normal (dot product of normal and eye vectors), not Z distance discontinuity, so it doesn't pick up edges of a flat object. Works OK for spheres though. $\endgroup$– GaryOJan 19, 2021 at 21:13
|
Show 1 more comment