Portals in Notch

Hi everyone!
I have been wondering how would one go about creating something like this https://www.instagram.com/p/CK9HF6Andqb/ , but in notch.
Now in this case to track the camera they are using a Vive Tracker and Base Stations, so that is how we pipe in the camera position. This is the easy part.
Now here is what baffles me - how do you make the box stick to the 4 corners of the screen. My first thought was to use the render to texture and stick the texture to a plane and use the plane as my screen - this might even be redundant to be honest for most setups but i am certain that we need a plane to project our view to. The part that makes this not work is that i need to extract a certain portion of what the camera sees - that is the opening of the “virtual box” and stick that image to the UVs of the plane i am using as a screen. How does one go about doing something like that? I have seen unity tutorials creating 2 parallel cameras for portals - you look trough one camera for your view and capture the portion of the second camera that sees a second scene trough a doorway and then stretch that second view to a texture for a plane on top of the door way in the first scene - here is a link to the tutorial - Smooth PORTALS in Unity - YouTube.
Well hope someone has a cool idea about how would i even approach cutting out something in screen space and stretching and sticking it to UVs of a plane.

2 Likes

For those wondering, i figured it out on my own. The answer is to use the Screen Projection node and to set Screen Projection Geometry as the target of the camera.
Enjoy:)

8 Likes