Giter Site home page Giter Site logo

warpedcave's Introduction

WarpedCAVE

http://paulbourke.net/dome/mirrorbox/

An experiment extending Paul Bourke's mirrored sphere projection technique to 3D in Unity, for the purpose of building low-cost single-projector, single computer immersive CAVEs on arbitrary surfaces. After some initial pre-computation, this technique allows one to render perspective corrected 3D imagery on arbitrary surfaces using a very cheap vertex shader and an on-axis rendering camera (enabling a variety of graphical effects that traditional CAVEs are not normally capable of).

Includes a guided calibration routine for assembling the projection geometry (via probing the bottom tip of a Vive controller to various surfaces to ascertain their shape). The automated routine calculates the projector's projection matrix, three flat walls, and the position + radius of the mirrored sphere reflector (though each step can be easily extended to arbitrary geometry).

How the pre-distortion works:

  1. For each vertex in the distortion plane, trace a ray from the projector to the projection surface (simulating the reflection off of the mirrored sphere in between).

  2. Record the hit position, and bake it into the vertex color of the distortion plane mesh.

  3. In the distortion mesh, reproject that world position back into the viewport space of the eye's render texture camera.

  4. Set the UV of that vertex in the distortion plane to be equal to 3)'s viewport space coordinate.

This example scene is set up such that the "eye camera" is looking through the ring on the right vive controller.

Here are Before/After comparison screenshots:

Video (shows 3D effect):

3D Warped CAVE Demo

(note the wavy distortions in the grid pattern introduced by the budget spherical mirror; primary surface reflectors would not have this issue)

warpedcave's People

Contributors

zalo 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

Watchers

 avatar  avatar  avatar  avatar

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.