(Top)
1 Getting Started
2 The Outline Node
2.1 How it works / How to use it
2.2 Limitations and Know Issues
2.2.1 Limitations
2.2.2 Known Issues (can be fixed)
3 Sockets
3.1 Input
3.1.1 Normal
3.1.2 Width
3.2 Output
3.2.1 Depth
3.2.2 Depth Hit Position
3.2.3 Negative Depth
3.2.4 Negative Depth Hit Position
3.2.5 Object (Cycles only)
3.2.6 Width WorldSpace Size
4 Q&A
The Outline Material Node is a new line rendering node for the Blender Eevee and Cycles render engines.
Until it gets integrated into the main version of Blender you can get it on Gumroad.
On the downloads you will find a build of Blender 2.82a with this patch applied and an example .blend file with several node groups that show how to use the Outline node.
Since the node is a work-in-progress, it's still not as easy to use as it could be. Instead, it provides as many options as possible to let users experiment and setup their own custom line styles.
To be able to use the node to its full capabilities, it's better to have a basic understanding of how it works under the hood.
The node works by calculating the depth difference between the point that is currently being shaded and the points in the screen at the left, rigth, top and down of it.
Instead of simply calculating the depth difference as is, it calculates the difference with the expected depth at the offsets, taking the shaded point normal into account.
For example, if the point being shaded is part of a plane, and the plane is not perpendicular to the camera, the points at the offsets will have different depths, so using the depth difference as is would yield unwanted results.
This also means that the larger the difference between the shading normal and the real geometry normal, the more incorrect are the results.
Then it checks all the depth diferences at the offsets - it separates the depths that are farther than expeceted (Depth), and the depths that are closer than expected (Negative Depth) - and outputs the largests ones.
The simplest way to use the node is to check if the depth is larger than some threshold (Math node > Greater Than) and then use the result as factor for a Mix RGB or Mix Shader node.
Notice how distant objects looks much better on the right image, after dividing the depth by Width WorldSpace Size and adjusting the threshold.
The normal used to calculate the expected depth at the offsets. If nothing is connected the default shading normal is used.
The size in screen-space of the offsets (in pixels).
The maximum depth difference where the real depth is farther than the expected depth. (in Blender units)
The delta vector between the point being shaded and the Depth hit point. (in Blender units)
The maximum depth difference where the real depth is closer than the expected depth. (in Blender units)
The delta vector between the point being shaded and the Negative Depth hit point. (in Blender units)
Outputs 1 if there is another object at (at least) one of the offsets, outputs 0 otherwise.
The size in world-space of the offsets (in Blender units).
TO DO