tesh-Final
Walk through these portals to reveal layers of other worlds that exist alongside ours.
![](/2018/60212s/wp-content/uploads/2018/05/2018_05_04_04_00_07_1.gif)
![](/2018/60212s/wp-content/uploads/2018/05/Screenshot_20180504-033716.png)
![](/2018/60212s/wp-content/uploads/2018/05/IMG_1396.jpg)
The Process:
This project is the result of a long struggle I had learning to use Stencil Filters with AR in Unity. I originally started by creating portals that could hide specific objects, and moved on to learn how to edit shaders from unity assets and even the unity default shaders to allow objects to be hidden from sight unless you looked at them through these portals.
Once I figured out how to pass through the portals so that the objects would become visible once you walked through, I was able to start working on their organization and on what the portals would contain.
Originally I was working on layering the portals so that it would create a maze or dungeon game forcing the user to look for the next portal level, however it proved incredibly difficult for more than 2 portals, and also felt too restrictive for the user. I wanted to encourage a sense of exploration and discovery with these portals so I shifted to a method where the user could wander through several different kinds of portals and see what objects each one contained, and see how the different objects exist together.
I also implemented light estimation techniques in order to create virtual objects that would adjust their brightness to match that of the real world around them. This is done using a shader that can access the phone’s camera and read the average brightness value of a camera image in as an input to help adjust that of the in-game objects.
Resources:
- This invaluable tutorial on creating Portals for AR
- This tutorial on Light Estimation for ARCore
- Unity Documentation on Stencils and Depth Mask Shaders
- This tutorial for coding a simple particle shader
Special Thanks:
to aahdee, farcar, creatyde, sheep, and Aman for teaching me about shaders and the logic behind using multiple stencil shaders at once
to conye for helping with documentation and moral support
And of course to Golan, Claire, and the Studio without which this would not have been possible