Home

Awesome

Portal Painter

Doodle new worlds onto your own, with Google ARCore.

Portal Painter

Technology:

Portal Painter is built in Unity with Google ARCore. Portal Painter uses ARCore’s motion tracking and environmental understanding to let users paint, wander around, and peer into the portals they create.

When the user starts the app, they see particles appear on parts of the environment that they can interact with. When the user touches the screen, we use ARCore to detect whether their touch intersects with any detected real-world features. If we have a hit, ARCore returns data on what intersected with our raycast. If we intersected with a plane, we instantiate a portal at the correct location and orient it to match our plane's normal. (As of ARCore 1.2.0, both horizontal and vertical planes can be detected.)

A portal contains a child canvas (invisible) and a child camera (spawned in one of the fantasy worlds). As the user continues to draw their portal, we raycast their touch onto the invisible canvas to figure out what pixels should become visible, while rendering the child camera feed to a texture. We then use a shader to combine these two textures into one, which we put on the portal itself, revealing the other worlds.

This is not an official Google product.

Develop:

After setting up and getting ARCore, you will want to do the following:

More granular instructions here.

Debug commands:

Acknowledgements:

Built by Jane Friedhoff with friends on the Creative Lab team at Google. Sample model created by Alex Jacobo-Blonder. Check out more at AR Experiments or read more about ARCore.