Different "outline" effect for different meshes

I just implemented an outline effect using a PostProcessVolume and a material as blendable, following this video:

Now if I turn on the Custom Depth of a scene component it will display the outilne. The problem is that the outline is the same for every component, and I can’t find a way to set different properties to different meshes.

I don’t want to create different post process volumes for different meshes. There must be a way to set different properties for each mesh, right?

customdepth.jpg

You need to give different Stencil Value to different objects. This will help you selectively draw different outlines.

Thanks a lot. This is what I needed.

For anyone that stumbles on this topic, I found this very helpful article related to this: http://www.tomlooman.com/multi-color-outline-post-process-in-unreal-engine-4/