In the Shadow


Role: Programmer

An AR experience using the Oculus Quest’s passthrough feature. The player holds a virtual flashlight that can light up both the real world and the virtual world. The player projects virtual objects’ shadows on physical surfaces to rescue the NPC acted by a real person.

Playthrough Video

Shadow Projection to Real World

The passthrough function of Oculus Quest does not contain depth information. We can only put the real world under or above all the virtual objects. In order to create the feature that players can project virtual objects’ shadows onto the real world’s surface, we first need to model all the real world’s surfaces. Then we create special transparent shaders for these surfaces to catch the shadows of virtual objects while can still see the things behind them.

Players need to match the shadow of objects with the shapes we pasted on the wall to solve the puzzles. We first add several pairs of anchors that matched each other on both the object and the shadow shape on the wall. We calculate the projection matrix from the light to the surface. Then using the projection matrix we can get the current shadow anchors on the surface. We compare the distance between those calculated real-time anchors with the preset anchors to see if the shadow matched with the shape on the wall.