How to access the Stencil Buffer using C++? [Portals]

You don’t need a stencil buffer, you just need to use ScreenAlignedUVs on the portal’s material.

Check out my example here: n00b question regarding post-process portal effect - Rendering - Unreal Engine Forums

I go a step further, using a SceneCapture2D that matches the main viewport resolution and then mapping that RenderTarget to the portal using the Pixel-Perfect variant of the ScreenAlignedUVs node.

If your post process quality is turned all the way down (don’t know why it interferes in 4.9), you shouldn’t be able to detect the transition (well, I couldn’t using the stock FPS character controllers).