Also for non-VR projects. Recursive Portals Built for URP and Single Pass Multiview VR compatible. Portals can be traversed without a single glitch in VR through walls. Now includes AR Portals!
For more detail this asset from the Unity Asset Store: Click Here
This is a paid asset, but now you can download the “Portals for VR” for FREE. Please keep in mind that this package is provided only for learning purposes or to test before buying the product, NOT FOR COMMERCIAL PURPOSES.
Portals for VR v1.1.0
“If possible, please buy the package to support the developer”
Description
Built for VR but perfect for non-VR Desktop and Mobile projects as well.
This is for the URP pipeline, tested from Unity 2020.3.36 all the way to Unity 6, do not buy it if you’re using the standard renderer. Check the documentation regularly for the last updates. Forward rendering is highly recommended.
Documentation here
Youtube channel with demo material and tutorials
An example APK for Quest 2
Introducing AR Portals for passthrough VR headsets like Quest 1, 2, 3, and Pro. This update comes with a demo scene and new shaders, enabling you to portal in and out of reality. (currently tested on Quest 1, 2 and Pro)
Fully working scene preview, easily modify the Shadergraph materials.
Shaders supports animated transparency, animated refraction for some really cool effects.
Alpha maps baked into your albedo textures can be used to open up the textured portals as you walk towards them.
Portals are recursive, meaning you can see a portal through another portal through another portal and so on.
Lots of care and attention has been given for portals to be seamless in VR, standing in the center of a portal with 1 eye on the left side and the other on the right works perfectly even with large near clipping values on your camera.
Portals can be completely flat planes occupying the same space as a wall and still have no clipping issues.
Many options to tweak performance. Change the resolution, modify the layermask, limit AA and Blend gradually to a static color over a set distance.
Includes a system for objects to traverse through the portals, tested with the excellent XR Interaction Toolkit, Hurricane and VRIF frameworks and easy to integrate with other Interaction frameworks and character controllers.
The video shows some assets (like the hands) from interaction frameworks. These are not included. However a simple VR demo cameraController and portalgun example is included to get you started.
Looking for an interaction package?
Have a look at the Hexabody Hurricane package or check out VRIF Unity’s XR Interaction Package is also supported.
Please understand, should you buy this package, it’s a solution to the really difficult problem of passing through portals without any glitches in VR. So the left and right eye can be in another place while the portal itself is a flat surface and against a wall. It is not an interaction framework. (Like Hurricane, VRIF, …) and you’ll most likely need some programming skills to integrate it.
Rendering portals means you’re rendering the whole scene visible from the portal again and possibly twice more depending on the recursion settings. In VR, this happens for each eye. Needless to say this is a heavy effect. Framerate is live! so be prepared to optimize every little detail in order to hit framerate on Mobile VR. Check out the APK on Quest 2 to see what is possible.
Currently tested in VR on:
Oculus (Meta) Quest 1, 2 and Pro (Desktop and on-device)
Vive – SteamVR
Currently investigating a small glitch on Vive in your peripheral vision you can see something flickering while in between 2 portals
Oculus XR set to Multiview (not recomended)
OpenXR set to SinglePas Instanced
For a detailed compatibility list and instructions please read the documentation (see link below)
Technical details
All scripts are written in C# (no dll’s) and the shader is built in ShaderGraph so you can easily modify it to suit your needs. Everything in the video is provided but you’re buying this for the portal code and VR compatibility, not the art 🙂