Bleeding Outlines
Jump to heading What's the problem?
There are 2 outline effects in Linework that work kind of in a similar way: Soft Outline and Wide Outline. They both to these 3 steps.
- Render the silhouette of the objects
- Dilate/extend the silhouette
- Subtract original silhouette from the dilated/extended silhouette to get an outline and composite it with the scene
The dilation happens in screen-space, which means the outline will not always completely respect the configured Occlusion State. This is especially apparent for wide outlines.
In the example below, the outline is set to render When Not Occluded however the outline bleeds slightly into the other object in the scene.
Jump to heading Solutions and Workarounds
There is an option to mask out parts of the outline by assigning objects to render As Mask which will effectively mask out the outline. In the example below, the box is set to render As Mask and the outline is then occluded.
The downside of this is that this won't work well in the case where you also want outlines around the box.