Stencil buffer in Unreal Engine

Hello everyone!
I’m switching from Unity to Unreal Engine. I trying to make a visual effect how it was shown in this video

Please hint me how to make something similar in Unreal Engine.