Outliner is a highly customizable and easy-to-use post process material to outline and fill objects with a beginners-friendly interface.
There are 7 presets in material instance. For each preset you can change the way it outlines and fills objects. Each preset can be used in different situations (i.e. highlight hostile objects with red outline using preset 1 and friendly objects using preset 2). Each preset have separate options for outline and fill
With beginners-friendly interface in material instance you can:
Since there are separate options for outline and fill, Outliner can, for example, outline the part of object which is visible in red, and fill the part of object which is hidden in green.
First of all, you need to configure your project. Go to project settings and check if the Stencil Buffer is enabled. In order to do it, go to Edit > Project Settings > Rendering, find Custom Depth-Stencil Pass and set it's value to Enabled with Stencil.
Then select your Post Process Volume, in Details find and expand Blendables sub-category in Post Process Volume settings. Then press plus button to add a new item to array. In dropdown menu choose Asset reference. Now simply drag and drop M_Instance_Outliner from content browser to the menu. Keep in mind, that you need to repeat this step for every Post Process Volume in your project.
Select an actor that has a mesh component, find and enable Render CustomDepth Pass in Details tab. Then find CustomDepth Stencil Value. There are 7 presets in Outliner, so set the CustomDepth Stencil Value from 1 to 7. Further you will find an information about presets customization.
Create one of the following nodes in your blueprint: Set Render Custom Depth and Set Custom Depth Stencil Value. Connect to the target inputs (Static Mesh component reference), and to Value inputs (boolean to enable or disable effect, 1-7 integer to set the preset).
Open M_Instance_Outliner. There are 7 groups of parameters. These groups are basically presets, and each of them has it’s own Stencil Value from 1 to 7.
With Fill and Outline parameters you can enable and disable outline and fill effects
OptionalVisibility and VisibleOnly parameters determines, if hidden parts of mesh will be highlighted. If both parameters are disabled, mesh will be highlighted all the time. If OptionalVisibility is enabled, only hidden part of object will be highlighted. If both OptionalVisibility and VisibleOnly are enabled, only visible part of object will be highlighted.
With BlendAmount you can customize the opacity of the effect.
Brightness controls the brightness of the effect.
Color and OutlineThickness parameters are also speak for themselves.
If you require more than 7 presets in your project, you can add more. To do it, open M_Parent_Outliner. Copy and paste one of the big blocks named like «Stencil = X», then connect it with Add node with previous preset block. After that. rename the parameters of copied nodes. Select very left constant node and change it’s value to the new stencil number (e.g 8). It can be any integer up to 255. Finally, rename all nodes, marked on screenshot. Just change the number in the node names to the new one. It’s necessary for correct appearance in M_Instance_Outliner.