Seamless Portals

This was already discussed somewhere in Rendering section.

Of course you can’t use regular post process stencil. It’s different thing.

I don’t remember, but I think Tim Hobson explained that stencil buffer is used many times in render flow, and there is no easy access to it.

To resolve this, you should write your own Renderer. I mean like Forward or Deffered Renderer, with supported portals

And even with it you can render correctly only 2 portals at the same time, and only through player camera.

But I think in near future it will possible to use RayTracing feature to make correct recursive and inner portals.

Its easy to achieve with collision channels. Just create some “PortalAllowedWall” channel, and toggle it in actors that passing portals.

But, anyway, there are many other physics problems with portals you should resolve to make it nearly equal to portal and portal 2 games.