I’ve now added portals to the holodeck. You can see through them, and walk through them. Video below.

Week eight portals

What’s a portal?

As per the fount of all knowledge, Wikipedia, “A magical or technological doorway that connects two locations, dimensions, or points in time”.


So, if there’s one thing my experiments with room-scale so far have shown it’s that most folks don’t have a very large room to do this in. Plus, walking is for suckers. What I want is the ability to simply step from one room to another room.

That’s what the portals do - they are a window from one place to another place, and stepping through the window moves you from the source space to the other space.

How does it all work?

Each portal is defined as moving from one origin to another origin. Each origin is anchored somewhere in the virtual world, and this matches up with the ADF / motion tracking.

Each portal has two gateways - one at the source origin, one at the destination origin. You can move both ways (source to destination, destination to source). Each gateway shows a view from itself through the other gateway and out the other side, so you can see through the gateway as though you were looking through the other one.

Each gateway view is made of two cameras (left and right eyes) which then render to a render texture. when I render the world from the normal camera views, the left eye gets to see the left rendertexture, and the right eye gets to see the right rendertexture. The rendertexture is then drawn in the middle of the gateway frame. This means you have full stereoscopic views through the portal.

This lets you walk around in the real world, matching up to one of the origins - in this case, the garage and the living room, and you can look through and walk through the portal. Walking through the portal teleports you from the garage to the living room, and back again.

What’s next?

I could spend time making this all fancy-like (improving visual quality etc), or I could get back to making the meshing look better. Whaddya reckon? drop me a mail or a tweet!

Written on April 13, 2016