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?
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.
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.
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.