Thursday, October 22, 2015

Seeking minimal sample program for head coupled motion

I am seeking your help!

I am working on a fishtank VR demo.   I have been looking at various engines and APIs and so far none of them have a very general camera model.   Most give me the ability to hardwire the viewing matrices, but I figure that if I do that maybe I should just use GLUT-- I don't want the disadvantages of a high level framework unless I also avoid low-level programming.

Here is a nice discussion of this for game engines.   Note it may be out of date but a really nice paper.   Since I am doing mono fishtank VR, this paper calls that "head couple motion" which I think is a term I will adopt-- it's very descriptive.    What I need in the camera is the ability to shear off the center of the screen (perhaps a lot), e.g.:

This is straightforward (if easy to mess up) to do with projection and other matrices.   Three.js does allow this functionality but only indirectly using a tile of screens analogy.

So what I want is one of two things:
  1. A simple GL or similar sample program that does this for some cool model or even just an environment map
  2. A high level toolkit that supports this naturally
If it has tracking from a camera bonus, but not essential.


Joe Campana said...

Hi Pete - are you familiar with this paper? It's straightforward but very useful and works well. I have implemented this almost vebatim in several apps for rendering onto randomly oriented projection planes.

Peter Shirley said...

I was not! What a pretty paper-- I love the figures. My projection is pretty easy as my screen isn't moving so it's the boiler-plate of projecting one triangle onto the screen I am looking for "first among equals" on. If I can avoid matrix wrangling that's a bonus. It's increasingly looking like GLUT just because it's all ugly and may as well go KISS then.