Object outline in 4.14

I’ve been searching for some time for tutorial on object outlining:

There are pretty many tutorials on the youtube, but the problem is - all of them are outdated. Most famous are from 2014, most recent is from 9 months ago and they are outdated already - attached materials doesn’t work. I just want a minimal example on creating materials outlines, like the picture above. Could someone actually tell me how to do it from the beginning to the end?

1 Like

Found working tutorial: here, together with download link - here

1 Like

Nope. That doesn’t work in UE4.18. Almost all of the calls being made in that material don’t even exist in the newer version.

I was finally able to get the outline to work in 4.18.

I’ll try to explain how I did it…

I grabbed the material download from the site Ch3shireCat used: Tutorial – Creating outline effect around objects | Unreal Engine 4 blog

I moved the uasset files into a folder in my Unreal project folder.
(I had to open up the PP_Outliner_M uasset and manually re-enter the custom function calls for all the MF_ExtractDepth, MF_ConvolveTexture and MF_SampleSceneTextureNeighbourUVs functions since they didn’t automatically appear. Refer to the image at the above link for the PP_Outliner uasset)

In Unreal, open your level that will display the item to be outlined.
Add a PostProcessVolume to your level

  • check the “Infinite Extent (Unbound)”
    checkbox
  • Add an element to the “Post Process Materials” Array
  • “Choose” Asset Reference from dropdown
  • For the “None” dropdown, choose PP_Outliner_M material… NOT the
    PP_Outliner_inst material instance

Open up a static mesh object that you want to outline:

  • Check the “Render CustomDepth Pass”
    checkbox

Run your level and you should see the outlined object.

If you want to only show the outline when you’re looking at the item, just follow the tutorial at http://www.tomlooman.com/tutorial-multiplayer-supported-usableactor-system-in-blueprint/

Thank you so much! Just curious. How do I extend the distance before the static mesh lights up with an outline?

I believe it’s the MaxUseDistance variable that controls that. It’s used in the GetUsableActor function. I haven’t played around with the distance yet, but I will soon.

I got running 2 highlight materials in UE4.19.

1 - Soft Outlines: based on the SpiralBlur-Texture material function, which comes with the engine.
(used this tutorial: Rendering Soft outlines in Unreal Engine - Tom Looman), which, basically consists of taking the SpiralBlur-Texture material function and replacing the texture with the current tecture of the mesh inside the shader code.

Unfortunately, this does not work in VR, the effect gets displaced.

2 - Hard Outlines, from this tutorial: Tutorial – Creating outline effect around objects | Unreal Engine 4 blog
Download the content, get the functions into your project, re-set all functions and re-link all the broken links in the PP_Outliner_M as per images.
Hint: the “Sobel Operator - Vertical” and “Sobel Operator - Horizontal” are the same, except the colors, so you could re-set/re-link the first one and copy/paste to the second one.

https://www.tomlooman.com/multi-color-outline-post-process-in-unreal-engine-4/ plus this answer allow you to create L4D2-like outline.