Advanced Outline/Toon Post Process Shader

Hello guys. I am looking for some help about creating a solid outline around my objects as well as drawing in their inline edges as well to create a drawn like effect.

I have tried the Unreal live-stream post process tutorial and the Toon shader that is included in the Unreal Toon Project. However, the results were not yet satisfying for my needs. ( Unreal Engine Livestream - Post Processing in UE4: Cel-Shading - Jan 4 - Live from Epic HQ - Announcements - Epic Developer Community Forums )

I am looking for a consistent outline in and out of the meshes because I have found especially difficult to get the inside lines working properly. I have recreated this project about edge detection ( Edge Detection PostProcess Feedbacks - Rendering - Epic Developer Community Forums ). And its almost working but still gives some weird result in certain angles and shapes. It uses world normals and scene depth to detect the edges.

I have some experience in Unreal but far from professional and I mostly do the ART part. However is there a way to achieve a consistent “in” and “out” lines around my visible edges? If yes is this the right approach or I should use a different technique? I am uploading a screenshot of where the line breaks.

I am using Unreal 4.20
Thanks in advance,
Excuse my grammar if there are any mistakes :slight_smile:

Somewhere in this video it covers a way to make inlines by tweeking the uv map.

Doing pp toon shading is nice for lighting from multiple angles. You could cel shading in each material that would give you a bit more control of the appearance.


Hi. Thanks for the answer. It looks like a great technique and I will dive more into it. However, the width of the line will be lost in long distance and since I want to create a scene that the player will be able to walk around it will lose consistency. I have already tried outlining through the textures and I have this particular issue. With post-processing, however, lines keep their size the same throughout the whole scene. That’s why I abandoned the texture approach.

Thanks again