Portal effect (from the game Portal)

This is something I’ve been interested in experimenting with for a while. I know the most obvious way to achieve an effect like this would be doing it in post, but I’m wondering if there’s any way of creating a shader that would work like a portal from the game. So essentially a material that would act like a camera with correct perspective and positioning to represent the ‘portal’ from a different location.
is this even do-able in VRay and where would be the first place to look in approaching this problem? Example here. To be clear I’m mostly interested in solving the rendering and camera perspectives part of the problem, not actual object transformation as I think this could be solved manually.

Any pointers on where to even start looking for this? Would it be possible with OSL? Or should I really just be looking to solve in composite

render twice and use the first sequence as a material on the portal for the second one?

Effectively you’d need for the camera A to render not only what camera A is seeing but also simultaneously what camera B is seeing, and interestingly enough it seems that it is indeed possible…in C4D,
as this post suggests Render multiple views at the same time - V-Ray for 3ds Max :: Wishlist - Chaos Forum

So that is somewhat hopeful if you can convince our lovely devs to implement that technique :slight_smile:

ah thanks for this. I did a search on the forums earlier but didn’t find anything relevant, yeah that would go a long way towards helping with the effect.

@vlado Did this multiple camera view feature ever get implemented at all? As mentioned above - Render multiple views at the same time - V-Ray for 3ds Max :: Wishlist - Chaos Forum