create a portal with texture render

hi
can any one please explain or give some tutorial on how to make a non walk trough portal in unity pro.
some thing like this
all i have managed to fine is that it’s easy, but never the answer.
i have build a plane and put on it the camera texture but how do i keep all the perspectives so it look like a portal.

thank’s.

I don’t know the code but I would say it works as follows.

  • attach one camera to portal0 and another to portal1 both looking away from the portal (-1 on local z). They are used to render the texture.
  • calculate difference between portal0 and portal1 → diff
  • apply the negative transformation of the main camera to the portal cameras, add the linked portal transformation and add the diff from above.

May be like that the more or less. Hope it helps to get the idea.

also, i found another question about portals on unity answers which is exactly what you need: Seamless portals into other spaces - Questions & Answers - Unity Discussions

this is looking as mirror, just create a render texture, and camera.
assign this render texture in camera render texture, and then apply this rendertexture to your object. Done!

A two-line shader, and it works in Unity Standard. Handles the view but not the actual relocation.