Skip to content

qqbbcr/TheParallaxView

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TheParallaxView

Depth illusion by 3D head tracking and off-axis projection on iPhoneX

Uses Unity, UnityARKitPlugin and Xcode 9.2

Project made in Unity 2017.3.0f3

gif gif

Note that this is a monoscopic effect. When using the app IRL, the illusion is best seen with ONE EYE - the other eye closed. (Also works great for video since video is monoscopic). For a stereo effect some type of glasses would be needed (anaglyph or active) and the app adapted for it.

Info on method and code: TheParallaxView Article

Detailed Build Instructions

  1. Clone or download the repository
  2. Make sure you have the ARKitPlugin folder already on your computer. If not, open Unity and get it from the Asset Store. (This step cannot be done after opening TheParallaxView because that will overwrite the project settings when importing it). If it’s the first time using ARKitPlugin, make sure you can build the Face Tracking examples and run them on the device.
  3. Copy the ARKitPlugin folder into TheParallaxView/Assets
  4. Start Unity and open the TheParallaxView
  5. Check "ARKit uses Face Tracking" checkbox in Assets/UnityARKitPlugin/Resources/UnityARKitPlugin/ARKitSettings.asset
  6. Double-click the HeadTrack3D scene
  7. To see a good preview, set Game view to 2436 x 1125 pixels (which is iPhone Landscape resolution)
  8. File>Build Settings - select iOS and hit “Switch Platform”
  9. Click “Player Settings” and under “Other Settings”, insert your Apple Developer Signing Team ID (alternatively, select Team ID later on in Xcode)
  10. Back in the Build Settings, hit “Build”. Create a folder called “Builds”, navigate into it, then choose a name for your build such as “IOS”. Hit Save. Now an Xcode project is generated by Unity.
  11. Start Xcode 9.2 and open Unity-iPhone.xcodeproj that was created in the last step and hit Run.

About

Depth illusion by 3D head tracking on iPhone X

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 87.3%
  • ShaderLab 12.7%