Skip to content

jungbinn/windowVR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Window VR

What's Window VR?

Window VR is a kind of virtual reality, but you don't need any head mount devices. By some method, it tracks the user's position and renders the monitor display refers to it. It will looks like a virtual world inside the monitor, just like a window.

I refered to Johnny Chung Lee's project. He tracked the user's position by Wii remote.

Environment

  • Intel RealSense camera (SR300)
  • Intel RealSense SDK
  • Unity 5.3.5

Implementation

Face Tracking

I used Intel RealSense camera to track the user's face position. SenseInput.cs script tracks the user's face using Intel RealSense SDK. Enable face detection and get the data by PXCMFaceModule.PXCMFaceData.LandmarksData.QueryLandmarks(). Extract two eyes' position and use their average value as a representative value of the face. LandmarksData only has XY position values, so we additionally need to extract the depth data. PXCMFaceModule.PXCMFaceData.DetectionData.QueryFaceAverageDepth() gives the average depth value of the face.

Adjust Camera View

Calculator.cs script calculates the position that the camera should locate, using face position data and the information about the monitors. OffAxisProjection() does matrix calculations to adjust the camera's frustum.

We need three matrices.

Alt text
Alt text
Alt text

By setting camera matrices like this, we can implement off-axis projection:

Camera.projectionMatrix = P;
Camera.worldToCameraMatrix = Mt * T;

while Mt is a transpose of M.

Result

These are the demo videos of this project:

Single monitor: https://youtu.be/0jk94qyTluo
Multi monitor: https://youtu.be/swNLzO3btKM

About

Window VR project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages