Git Product home page Git Product logo

googlecreativelab / sprayscape Goto Github PK

View Code? Open in Web Editor NEW
567.0 42.0 79.0 38.7 MB

Sprayscape is a perfectly imperfect VR-ish camera. It is an open source Android app released on the Android Experiments platform.

Home Page: https://sprayscape.com

License: Apache License 2.0

Java 0.27% C# 5.24% Shell 0.03% JavaScript 0.01% Objective-C++ 0.27% Objective-C 93.83% Ruby 0.15% HLSL 0.04% ShaderLab 0.15%

sprayscape's Introduction

This project is no longer actively maintained by the Google Creative Lab but remains here in a read-only Archive mode so that it can continue to assist developers that may find the examples helpful. We aren’t able to address all pull requests or bug reports but outstanding issues will remain in read-only mode for reference purposes. Also, please note that some of the dependencies may not be up to date and there hasn’t been any QA done in a while so your mileage may vary.

For more details on how Archiving affects Github repositories see this documentation .

We welcome users to fork this repository should there be more useful, community-driven efforts that can help continue what this project began.

Sprayscape

Sprayscape is a perfectly imperfect VR-ish camera. It is an open source Android app released on the Android Experiments platform.

Sprayscape

Technology

App

Sprayscape is built in Unity with native Android support. Using the Google VR SDK for Unity to handle gyroscope data and the NatCam Unity plugin for precise camera control, Sprayscape maps the camera feed on a 360 degree sphere.

The GPU makes it all possible. On user tap or touch, the camera feed is rendered to a texture at 60 frames per second. That texture is then composited with any existing textures by a fragment shader on the GPU. That same shader also handles the projection from 2D camera to a 360 sphere, creating the scape you see in app.

When a user saves a scape, a flat panorama image is stored in the app data and written to a single atlas file containing all scapes. The atlas is loaded into the scapes view the gallery of scapes with gyro navigation.

Sharing is handled by native Android code. When a user shares a scape via link, users sign-in with Google OAuth and are prompted for read and write access on Drive. All user generated content is stored on a user’s Drive account so users can delete their content at any time. With permissions in place, the Drive API v3 checks for a Sprayscape folder, creates one if lacking, and uploads the file. A share URL is presented to the user in a Native Share dialog and is also attached to the scape object on the app for easy sharing at a later date.

Facebook share is also handled natively. The panorama is prepared as an image object with appropriate EXIF data to insure proper presentation on Facebook and then presented to the user via Native Share. User selects Facebook to share to their networks.

Web Viewer

The web viewer is built using WebGL, Three, and the emerging WebVR spec via the polyfill developed at Google by Boris Smus. Using these open standards allows for an adaptive experience across desktops, tablets, and phones. WebVR support means Sprayscape’s web experience is ready for VR devices: Cardboard, Daydream, Vive, and Oculus. Additional UI and state management is handled by the lightweight Choo framework.

Develop

Some elements are not in the repository, and need to be setup before the Unity project can be built.

  • The NatCam plugin used for the camera feed is not in the repository. You can obtain a license here and put in Sprayscape/Assets/NatCam
  • The file Secrets.cs contains the hashing key for sharing. There is a sample file for creating it called Sprayscape/Assets/Scripts/Secrets.cs.sample that you can rename.
  • For uploading to Google Drive, you need to set-up an appengine instance, enable the Google Drive API, and set up an OAuth authentication for your keystore signing of the app.

After these steps the app should be ready to be built and run on your device.

Acknowledgements

Brian Kehrer, Troy Lumpkin, Dan Motzenbecker, Jeramy Morrill, James Vecore, Norm McGarry, Chris Parker, Celso de Melo, Jonas Jongejan, Glenn Cochon, Brendon Avalos, Ryan Burke

sprayscape's People

Contributors

birdimus avatar halfdanj avatar mrayinteractive avatar ryburke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sprayscape's Issues

Crashes on launch

After getting past the permission granting, the app shows the wireframe with hints for about one second (and it moves with the gyro), but then the app crashes. (Samsung Galaxy A3 2017 - Android 7.0)

I would look at why, but don't fancy paying for the Unity camera plugin!
As this app is quite old, is there anyone still around to update the dependencies to the latest versions and recompile, to see if it's as simple as that to fix?

Thanks!

Compile error

The type or namespace name `NatCamU' could not be found.
You forget to commit some files?

Logo/Icon Proposal

Hi good day! I would like to ask for your permission to propose a new designs of logo in your application/project. I would like to help projects in open-source .I would just like to propose new designs. Hoping for your positive response Thank You!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.