mattrdowney / planetaria

A Unity framework for Euclidean 2-sphere games (e.g. 2D virtual reality games) [quasi-MIT license]
Other
10 stars 2 forks source link

2D virtual reality "zoom" #30

Closed mattrdowney closed 6 years ago

mattrdowney commented 6 years ago

The only situation where the camera would leave the origin.

Eye distance would still be zero.

For certain games, e.g. top down games, this would provide a sort of world map in the "180 degrees" behind you.

Needn't be implemented for Invertigo, as it requires extra shader work or a significant polygon budget increase (tesselation or a subdivided icosahedron sphere).

mattrdowney commented 6 years ago

Background: I had considered zoom before Invertigo was a VR game for the intro scene in the prison cell. At some point I scrapped zoom as a mechanic (idk if it was due to technical limitations or the perception that it was infeasible/against the spirit/disorienting (TBD)). I do know my "manifest of my life" post only really talks about 180/360 degree VR games and the notion of switching planetariums. I'm pretty sure I dropped 2D zoom because I was gonna use field of view zoom, which wouldn't break the cheap geometry versions (e.g. Invertigo) but I knew it would be disorienting because head motion would be untrackable during zoom. Based on that, I think the concept of "true zoom" spurred on recently, especially in a top down open world context, which has been desired for a while (likely post-FinTech, maybe past month).

mattrdowney commented 6 years ago

Reverse zoom should be possible (negative zoom).

For simplicity zoom could be (-1, +1), although scaling might make more sense.

mattrdowney commented 6 years ago

Complete as of 01961ae318be23546274a3dfa3ade89dcc3035e0

Although positional headtracking is becoming a problem.

mattrdowney commented 5 years ago

Upon thinking about what zoom is, I would like to figure out a formal definition based on pure math at some point. I think that you could define "zooming in" as using what I call "180 degree virtual reality" or the cloth draped over a sphere method. The problem with the concept of "zoom" is that there are two interconnected ideas: 1) the focus (e.g. the character on screen that you are highlighting) and 2) the view direction (e.g. what you should be looking at). In this version, I think the view direction's centermost pixel should always be preserved and the world should morph around you (which goes back to the concept of "guidelines" in the 180 degree virtual reality method).

mattrdowney commented 5 years ago

Another possibility that I can't believe I didn't mention:

In all the time I've thought about this, I don't think I ever really gave lens distortion a thought. I think I viewed the -1 to +1 positional zoom system as an indirect form of screen space distortion, but I never thought about how to create a magnifying-glass-like zoom in/out (e.g. with a fancy shader).