- Home /
3D Camera Render on a surface?
Is there any easy way to put a Camera's render view onto a plane or surface? I am aware of RenderTexture, but that makes the view a 2D texture. What I would like to do is render the actual 3D view onto it so it gives the illusion that you can walk into the area from the surface, as if it was some kind of portal or something.
Answer by Bunny83 · Sep 25, 2014 at 05:23 PM
Portal and Portal2 actually use RenderTextures. It's just a matter of where you positioning the portals camera. You also need to setup an oblique near clipping plane for the portals camera like Aras explains in this post. It seems they finally implemented the neat helper function into the camera itself: Camera.CalculateObliqueMatrix.
Portalizer for example is a Portal-rip-off made with Unity and also used RenderTextures for the portal view.
There are also ways in the free version of Unity to implement a similar effect, but it's get's quite messy / compilcated with multiple portals as you have to use multiple passes, masking geometry, depth shaders, ... RenderTextures make this effect more straight forward.
Here's a free implementation of a portal effect in Unity free:
http://algoholic.eu/unity3d-indie-free-portal-effect-project-sources/
Thanks, I never thought of that. Now I gotta find an algorithm to orient the camera to give this illusion.
Your answer
![](https://koobas.hobune.stream/wayback/20220613163731im_/https://answers.unity.com/themes/thub/images/avi.jpg)