Hyperbolic VR and H²xR

Hyperbolic VR and H²xR

posted in: Tech Posts - Other | 0

If you’ve been following our hyperbolic VR project [project page], you’ll be happy to know that we finally moved it over to its own github page and updated the API for webVR.

Positional tracking is now working in the Vive, and it’s very very cool. It took us some heated discussions to figure out just how we wanted to do it, because of course, the headset is tracked in Euclidean space and you just can’t crush hyperbolic space into a 1 to 1 mapping. The way we’re doing it now is that each frame it takes your position relative to the last, and it moves you by that same vector in Hyperbolic space (or more specifically, we move the 4D-embedded hyperbolic space in the compensating way, and then project it back down into 3D Euclidean space).

At some point we’ll write something up that makes a better attempt to explain all this to a wider audience.

The fun challenge with mathematically interesting spaces is always bug testing, because you want to learn from the simulation how the space looks, but you also have to know well enough how it should look that you know whether it’s looking right. Luckily with our mathematical visualization skills combined, we’re pretty confident we have it right. It has all the effects we predicted, such as that walking around and coming back to the same spot in the room will not bring yourself back to the same spot, and that even simple small motions can slowly shift the orientation of the space. As predicted, wandering from the center out to the edge is easy, but there’s so much possible edge to get to while there’s only one center, and getting back there is nearly impossible if you’re relying on parallel transport sorts of properties rather than walking in a straight line that’s longer than your room. Coloring the cells differently was also a question as there’s no great addressing system for cells in hyperbolic space, but we figured a 2-coloring would be easy, so that’s in there right now.

screen-shot-2016-12-02-at-7-39-36-amWe want to eventually make something more relatable to normal life, like a hyperbolic version of a house. Five square rooms around instead of four, for example. Problem with full hyperbolic space is that orientations change with respect to gravity, but you can also make a space that is hyperbolic across the horizon but Euclidean in the other direction, like a stack of hyperbolic planes. This space is called H²xR (pronounced “H2 cross R”) because it’s like a 2D hyperbolic plane (H²), times a normal Euclidean line (R for Real number line). It also has the nice property that we can make it so the floor stays under your feet.

To do the math for H²xR in VR we recruited the help of Sabetta, a physicist who along with our usual HypVR crew managed to get it working. The space is still tiled with cube lattices and we haven’t yet added the feature where the floor stays on the floor, but now that we have the correct math working in our hyperbolic graphics shaders we know we can do the rest!

Once again, of course, it has the problem of: does it look right? Would we notice if it didn’t? Squares squish in one direction to become skinny rectangles, while when walking towards them they expand in your visual field until they are indeed squares when you’re right on one, as we’d expect. Hyperbolic tilings along one set of planes look like hyperbolic tilings, while the sets of them fade off in the distance in the Euclidean direction in a Euclidean way. At one point I changed the orientation and successfully detected a bug where the space moved differently from how it was supposed to, because the new vector-based movements don’t talk to the orientation controls, so that’s a good reality check too. I think the math and programming are both right, and I’m excited to do representative work in this space!

Of course, we’re still arguing about just how picky to get regarding completely accurate stereo vision simulation… And then there’s potential hand controls, where of course the only sensible thing to do is a vector from the head position, that is, if one believes it is moral to bring Euclidean body patterns into hyperbolic space at all…

I updated the project page as well. Once we get stuff working more smoothly and with more objects, we’ll make some proper videos, explanations, tech posts, etc.