Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/googlecreativelab/arexperiments-portal-painter
Doodle new worlds onto your own, with Google ARCore.
https://github.com/googlecreativelab/arexperiments-portal-painter
Last synced: 8 days ago
JSON representation
Doodle new worlds onto your own, with Google ARCore.
- Host: GitHub
- URL: https://github.com/googlecreativelab/arexperiments-portal-painter
- Owner: googlecreativelab
- License: other
- Archived: true
- Created: 2017-08-28T17:53:26.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-07T21:31:41.000Z (over 6 years ago)
- Last Synced: 2024-08-02T07:06:43.447Z (3 months ago)
- Language: C#
- Homepage: https://experiments.withgoogle.com/ar/portal-painter
- Size: 16 MB
- Stars: 199
- Watchers: 27
- Forks: 56
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Portal Painter
Doodle new worlds onto your own, with [Google ARCore](https://developers.google.com/ar).
![Portal Painter](portal-painter.gif)
## Technology:
[Portal Painter](http://www.experiments.with.google.com/ar/portal-painter) is built in Unity with [Google ARCore](https://developers.google.com/ar). Portal Painter uses [ARCore’s motion tracking and environmental understanding](https://developers.google.com/ar/discover/concepts) 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](https://developers.google.com/ar/develop/unity/getting-started), you will want to do the following:
* **Make your worlds.** Each world should be its own GameObject, and should have a child called `Center` located at whatever point you’d like the portal-camera to be. Whenever you spawn a portal, the `UIManager` will look for this `Center` object and place its camera there. (See the default `DemoWorld` object for an example.)
* **Add them to the UIManager GameObject.** They will be accessed in the `WorldTracker` script. You may add a custom skybox for a particular world there as well (make sure their indexes match).
* **Build and run.** Point your camera at your environment and wait until you see faint particles rise up from it. You can then use your finger to draw.
More granular instructions [here](https://github.com/googlecreativelab/arexperiments-portal-painter/issues/1#issuecomment-326012124).
## Debug commands:
* 2-finger tap to start painting with the next world (won’t change old portals)
* 3-finger tap to remove all portals on-screen## Acknowledgements:
Built by [Jane Friedhoff](http://www.janefriedhoff.com) with friends on the Creative Lab team at Google. Sample model created by [Alex Jacobo-Blonder](http://ajacoboblonder.com/). Check out more at [AR Experiments](https://experiments.withgoogle.com/collection/ar) or read more about [ARCore](https://developers.google.com/ar).