How can I draw lines on the edges of objects?

6k Views Asked by At

I'm making a unity SteamVR game.

I want to achieve an unlit art style reminiscent of Antichamber.

I want to draw lines on the edges of objects, but I couldn't find an online solution that was not outdated and that worked.

Here is a picture from antichamber.
Here is a picture from antichamber.

You can see that every object has a line across all of it's edges.

How can I achieve this effect?

2

There are 2 best solutions below

6
On

I want to draw lines on the edges of objects

This free asset promises to do just that.

"Supports outlines with variable thickness, color, that work in Editor, Ortho and Perspective cameras."

Source: https://assetstore.unity.com/packages/vfx/shaders/toon-shader-free-21288

2
On

Yo can do this with Unity's "Edge Detect Effect Normals" which is part of Unity's image effects and is included in their Standard Assets. You can get it here.


There is also a new image effect for Unity called "Post Processing Stack" which is really faster than the one I linked above and you can get that here. Edge Detect is not included in the new "Post Processing Stack" image effects but if you decide to use the new Post Processing Stack, you can get the ported version of "Edge Detect Effect Normals" here.

Any one of these effects can draw lines on edges of objects.