All Projects → Arjav-Patel → Vuforia-Integration-with-Meta-2

Arjav-Patel / Vuforia-Integration-with-Meta-2

Licence: MIT License
A guide on using Vuforia with the Meta 2 headset

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to Vuforia-Integration-with-Meta-2

WebScreenVR
WebScreenVR enhance your workspace while in Virtual Reality, allowing you to cast your screen and different applications around you in a 3D environment.
Stars: ✭ 53 (+307.69%)
Mutual labels:  augmented-reality, virtual-reality
Magic-Leap-Gesture-IoT-Example
Control lights in the physical world from the augmented world using hand gestures. Using Magic Leap Hand Poses (Gestures) and PubNub.
Stars: ✭ 18 (+38.46%)
Mutual labels:  augmented-reality, virtual-reality
Pool2021
Pools organized for Epitech's students in 2021.
Stars: ✭ 19 (+46.15%)
Mutual labels:  augmented-reality, virtual-reality
V2R
Code for our IJCAI 2020 paper: "Keep It Real: a Window to Real Reality in Virtual Reality".
Stars: ✭ 20 (+53.85%)
Mutual labels:  augmented-reality, virtual-reality
ARFootball
An AR soccer game (Unity3D+Vuforia)
Stars: ✭ 40 (+207.69%)
Mutual labels:  augmented-reality, vuforia
Bandit-Girl-AR
🎮 Augmented Reality mobile game with classic third person and AR gameplay modes. 🔫
Stars: ✭ 15 (+15.38%)
Mutual labels:  augmented-reality, vuforia
vimeo-threejs-player
A plugin for streaming video from Vimeo to WebGL/VR/AR apps
Stars: ✭ 75 (+476.92%)
Mutual labels:  augmented-reality, virtual-reality
Three.js
JavaScript 3D Library.
Stars: ✭ 78,237 (+601723.08%)
Mutual labels:  augmented-reality, virtual-reality
GVRSCNRenderer
SceneKit Rendering and ARKit 6DOF Tracking for Google Cardboard
Stars: ✭ 19 (+46.15%)
Mutual labels:  augmented-reality, virtual-reality
OpenXR-CTS
Conformance test suite for OpenXR
Stars: ✭ 38 (+192.31%)
Mutual labels:  augmented-reality, virtual-reality
MixedRealityResources
Mixed Reality related resources
Stars: ✭ 190 (+1361.54%)
Mutual labels:  augmented-reality, virtual-reality
Tetris AR
An AR Tetris (unity3d+vuforia)
Stars: ✭ 14 (+7.69%)
Mutual labels:  augmented-reality, vuforia
VuforiaWithOpenCVForUnityExample
Vuforia with OpenCV for Unity Example
Stars: ✭ 56 (+330.77%)
Mutual labels:  augmented-reality, vuforia
lvr
👓 Augmented Reality for everyone - Out of the world experiences
Stars: ✭ 92 (+607.69%)
Mutual labels:  augmented-reality, virtual-reality
Unity-2017.2-and-Vuforia-6.5---Camera-Auto-Focus
Unity 2017.2 and Vuforia 6.5 Augmented Reality (AR) Camera Auto Focus
Stars: ✭ 17 (+30.77%)
Mutual labels:  augmented-reality, vuforia
g3r
3D, VR and AR Maps in R
Stars: ✭ 19 (+46.15%)
Mutual labels:  augmented-reality, virtual-reality
Polymer
🎨 graphics + interaction engine
Stars: ✭ 243 (+1769.23%)
Mutual labels:  augmented-reality, virtual-reality
Webxr Polyfill
Use the WebXR Device API today, providing fallbacks to native WebVR 1.1 and Cardboard
Stars: ✭ 251 (+1830.77%)
Mutual labels:  augmented-reality, virtual-reality
openPerform
Check out the various styles and effects OpenPerform has to offer with our BVH animation demo!
Stars: ✭ 24 (+84.62%)
Mutual labels:  augmented-reality, virtual-reality
spark-ar-creators
List of 9500 (and counting) Spark AR Creators. Open an issue or contact me if you want to be added.❤️
Stars: ✭ 122 (+838.46%)
Mutual labels:  augmented-reality, virtual-reality

Vuforia Integration with Meta2

A guide on using Vuforia with the Meta 2 headset

Version Information:

  • Unity: 2017.3.0f3
  • Vuforia: 7.0.36
  • Meta SDK: Beta 2.7.0.38
    • Meta 2 headset is being run in "Direct Mode" (change this by opening up "Meta Display Manager")


Step One:

Delete all gameobjects in the current scene, and save the scene


Step Two:

  1. Import the Meta 2 Unity package from \Meta\Meta SDK2 Beta\Unity
  2. Add the "MetaCameraRig" prefab to the scene
    • Under "Slam Localizer" DISABLE "Show Calibration UI"
    • Under "Slam Localizer" ENABLE "Rotation Only Tracking"
      • This will help us fix the Offset later on
    • Under "Depth Occlusion" DISABLE "Enable Depth Occlusion"
      • This will get rid of black spotting caused by the Meta 2 thinking the projection is behind the Image Marker


Step Three:

  1. Enable Vuforia in "Player" settings under "XR Settings"
    • Select "Virtual Reality Supported" (Edit -> Project -> Player)
  2. Remove all present Virtual Reality SDKs like OpenVR, Occulus, etc...
    • (click on the SDK, and select the minus sign on the bottom-right beside the plus)
  3. Click + and add Vuforia to the Virtual Reality SDKs


Step Four:

  1. Add the "ARCamera" prefab to the scene
    • Set the "Near Clipping Plane" to "0.015"
    • Set the "Far Clipping Plane" to "10"
    • Set "Target Display" to "Display One"
    • Set "Target Eye" to "Both"


Step Five:

  • Open "Vuforia Configuration" and add in your license key
    • Set "Camera Device Mode" to "MODE_OPTIMIZE_QUALITY"
    • Set "Device Type" to "Digital Eyewear"
    • Set "Device Config" to "Vuforia" DISABLE "video background"
    • DISABLE "track device pose"
    • Make sure "Disable Vuforia Play Mode" is NOT checked
    • Set "Camera Device" to "Meta2 Webcam"


Step Six:

  • Import and Attach "RGBTransform.cs" to the "ARCamera" prefab
    • Set "Destination" to "WORLD"
    • Set "Source" to "RBG"
    • Set "Angle X" to "-13" (Negative Thirteen)
      • You will have to play around with x, y, z, Angle X, Angle Y, and Angle Z to get better results


Step Seven:

  1. Create a new Databse on Vuforia's online Target Manager

    • Upload an image to the Database
      • Make sure the "Width" you set is the width of the marker in metres. The more accurate the measurement you provide, the better
    • Download and import unity package of the Database
  2. Add an "ImageTarget" prefab to your scene

    • Set "Database" to the Database you just created
    • Set "Image Target" to the image you just uploaded
    • UPDATE:
      • Remove the "DefaultTrackableEventHandler.cs" script component
      • Add the "CustomTrackableEventHandler.cs" script
  3. Go back to "Player" settings and make sure Vuforia is still enabled in XR settings

  4. Go back to the Vuforia Configuration file and enable (and activate) the databse you just uploaded, and disable all the other ones.


Step Eight:

  • Import and Attach the "DataCollection.cs" script to the "ImageTarget" prefab
    • Set "pos" to "0.15"
    • Set "increment" to "0.01"


Step Nine:

  • Create an Empty Gameobject and call it "Images"
    • Reset the transform of "Images"
    • Make "Images" a child of the "MetaCameraRig" prefab

Step Ten:

  1. Create a Cube
    • Reset its transform
    • Set the Cube's X and Z scale to be the same as the "ImageTarget"'s scale
    • Set the Cube's Y scale to be "0.0001"
    • Make the Cube a child of "Images"
  2. Create a Directional Light
    • Reset its transform
    • Parent the Directional Light to the Cube
    • Set the x-rotation of the Cube to 90, and increase its y-position (you should probably change this later, as this will cause gameobjects to appear "washed out")

Step Eleven:

  • Import and Attach the "Offset.cs" script to the Cube
    • Set "Marker" to be the "ImageTarget" prefab by dragging and dropping it on the slot
    • UPDATE:
      • The script has been updated. Either re-download and re-attach the script, or copy-paste the new code


Step Twelve:

  • Create an empty .txt file called "data.txt" and place it in Assets\Resources folder in your Unity project


Step Thirteen:

  1. Print and cut out 4 to 6 rulers: http://www.vendian.org/mncharity/dir3/paper_rulers/
  2. Remember to download the correct PDF for your paper size (I used A4)
  3. Tape the rulers in a straight line on a flat table


Step Fourteen:

  • Place the Meta 2 so that the front is 9.7cm deep into the ruler.
    • Use something straight, like a book, and place it at 9.7cm, and then touch the front of the Meta 2 to the book


Step Fifteen:

  • Glue the marker onto cardboard, or something equally sturdy, so that it can stand straight on the table without your support


Step Sixteen:

  1. Save the scene. Play the scene.
  2. Place the marker at 15cm. Look for the "Trackable found" in the Console
  3. Now, left-click. The Console should say "wrote" and then "0.15"
    • NOTE!!! You must click on the Game view screen. It is the screen that says "Meta" in stylized letters.
    • If the console does not say anything, then either you clicked in the wrong place, or the scripts are not attached properly

We are doing this to find a function that will fix the Depth offset caused by Vuforia. Currently, the ImageTarget has some z-coordinate, but this will most likely not be the true z-coordinate relative to the Meta 2.

By placing the Marker at 15cm, and left-clicking, we are saving the z-coordinate that Vuforia reports as the indepedant variable for our funciton, and the true position of the Marker relative to the headset as the dependant variable in "data.txt"

  • Left-Click 10-20 times over a few seconds, then place the Marker at 16cm.
  • Now Right-Click. In the console, you should see "increment" and "0.16"
  • Repeat these steps until you reach about 80-90cm, or more if you want.


Step Seventeen:

  1. Open "data.txt" and press Control-A then Control-V
  2. Go to https://arachnoid.com/polysolve/
  3. Paste the data in the provided textbook
  4. Set the "Degree" to 1
  5. Click "Output Form" so you know which variable is "m" and which is "b" in the linear regression


Step Eighteen:

  • Open "Offset.cs" and scroll down until you find the CalculateOffsetZ(float MarkerPosZ) function *Replace "m" and "b" with the values you just obtained


Step Nineteen:

That should be it. Play around with "RGBTransform.cs" and repeat Step Sixteen for better results.

If I forgot anything, or something does not work, open up an issue and I'll try to help.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].