Ink outlines post processing effect

Roblox developers today abuse Highlight instances to try and add ink-style object outlines to their game world. This has consistently led to people asking for the highlight limit to be raised, and leads to rendering inefficiencies as each highlight layer requires rendering a new layer of pixels to be traced around.

Instead of continuing down this path of hacky workarounds, I propose that a more general method for rendering ink outlines is implemented, that doesn’t require using heaps of highlights.

There are a few methods that render outlines based on screen contents:

1) Depth based

When there’s a significant depth discontinuity (or a discontinuity in the derivative of depth) then an outline is rendered.

2) Normal based

When there’s a discontinuity in normal direction, then an outline is rendered.

3) Vertex colour based

This one is more niche, but colours can be assigned on meshes to indicate distinct parts of a mesh. Where two colours meet, an outline is rendered.


While this would be great for creator expressivity, I could see some potential implementation issues. Not all graphics vendors support accessing the depth buffer, for example, and Roblox seems to use a forward+ rendering style that doesn’t easily expose per-pixel normal or vertex colour information, so those would likely have to be separately rasterised.

In the worst case, it’s not unreasonable to drop rendering of ink outlines entirely if the graphics vendor doesn’t support it.

In any case, I’m interested to hear what people think about this, since I’ve seen many people try to achieve this look through hacky means.

33 Likes

This would be a great chance to add another material. +1

5 Likes