Skip to main content
Version: 4.2.0

Portal

The Portal template creates the illusion of viewing a virtual 3D world through a window. Effect users can walk towards the window in real time and seamlessly enter the virtual world.

portal demo

How to Use This Template

Open Effect House, go to Templates, click the World tab, and select the Portal template.

portal template

To properly view this effect, you must first select the appropriate preview media. The Portal effect works best when a plane is detected in the real world, so you should change your preview media by clicking the Preview menu, hovering over Environment, and selecting a video with visible plane in it, like Sofa or Table.

preview environment plane

Hierarchy

Within the Portal render group, there is an AR Plane Tracker that detects planes in the environment, allowing the portal window to be placed in the real world.

The Portal World Container houses the objects within the portal: Occluder, Sky, Star Sphere [EDIT MATERIAL], Castle And Rocks, and the Window Frame [EDIT ME].

The Post Effects render group contains an FXAA (Fast Approximate Anti-Aliasing) object, which gives the graphics a smoother appearance.

portal hierarchy

Assets

Expand the PortalAssets folder in the Assets panel. The InsidePortalAssets folder contains the materials, textures, and models for objects that appear within the portal. The WindowAssets folder contains different textures and materials for the portal frame.

portal assets

Customize the Portal Effect

Occluder and Sky

The Occluder and Sky objects are responsible for creating the immersive virtual world. The Sky object is a spherical mesh with the Sky_Mat material applied to it, creating the appearance of a starry night sky. The Occluder is another spherical mesh that obscures the outside of the Sky object, enabling the viewer to only see the virtual world through the portal window. This is apparent when you uncheck the Occluder object in the Hierarchy panel, which reveals the spherical back end of the Sky object. The Occluder also contains the hole through which the viewer can see the virtual world, as a chamber or cavern would.

portal occluder and sky

You can add your own 3D models inside the virtual world by placing them inside the Portal World Container object. Make sure that the Occluder covers your objects so they don't appear on the outside of the sphere.

Star Sphere

The Star Sphere [EDIT MATERIAL] object uses the Star_Mat material, which adds a layer of subtly twinkling stars on top of the night sky. Star_Mat is a custom material that you can edit in Material Editor. You can also locate Star_Mat by going to the Assets panel, expanding the InsidePortalAssets folder, opening the SkyAndOccluder folder, and going to the Materials folder within.

portal star sphere

Window Frame

You can also customize the portal's window frame. There are two premade frame textures in the Assets panel. Locate them by expanding the WindowAssets folder, then opening the FrameTextures folder. The frame material is found in the Materials folder.

To change the window frame, click Frame_Mat in the Materials folder, then go to the Inspector panel. Click the Texture field under Albedo, then select CircleFrame1_Tex and click OK.

portal window frame

You will then need to adjust the frame to be flush with the circular opening of the Occluder. Click the Window Frame [EDIT ME] object in the Hierarchy panel, then go to the Inspector panel and adjust the Transform component's Scale property to 15, 15, 15.

edit frame scale