Showing posts with label Calculator. Show all posts
Showing posts with label Calculator. Show all posts

Friday, April 18, 2014

New iPhone utility app simplifies VR calculations

A few months ago, I realized we go back again and again to the same Excel spreadsheets for some VR calculations. For instance, if the field of view is 90 degree diagonal and the aspect ratio is 16:9, what is the horizontal field of view? If using a goggle is like watching a 70 inch TV from 6 feet, what does that say about the field of view?

To help with this, the Sensics team decided to create a simple iPhone app (Android version coming soon) that helps with these calculations. This app is now available as a free download from iTunes. Think about it as public service for the VR community.


In it's current beta form, the app provides several useful conversions:

  • TV screen size to/from goggle field of view
  • Screen size and aspect ratio to/from field of view
  • Quaternion to/from Euler angles
The app also includes useful reference info as well as a way to ask the VR experts at Sensics.

Some of this math already appeared on this blog such as here and here, but it is now available in your pocket.

What additional calculators would you find useful? What changes would you like to see in the app? Any bugs that need to be fixed? Let me know.


Tuesday, April 23, 2013

Converting diagonal field of view and aspect ratio to horizontal and vertical field of view

Note: this post was refined on Apr 23, 2016 to reflect a more accurate method of calculation.

Continuing the reference section started in the post regarding "TV screen size vs. goggle field of view", here is the conversion between diagonal to horizontal and vertical field of view. The conversion depends on the aspect ratio of the screen (ratio between width and height). The conversion table is below following by some explanations and discussion:

Converting diagonal FOV to horizontal and vertical FOV for various aspect ratios

HMD and goggle manufacturers usually like to present the diagonal field of view because that is the larger number, just like you read about "40 inch" TVs and not "34.9 inch" TV which would be the horizontal measure of a 40 inch TV with 16:9 aspect ratio, the common ration for HD1080 images. The aspect ratio used to be 4:3 for traditional televisions, VGA monitors and more. Over time, that aspect ratio grew and common ones are 3:2 for an iPhone 4, 16:9 (1.78:1) for HDTV and 2.40:1 for wide screen cinema. Keep in mind that these values are for the full width of the screen. If you take a screen and divide it into two for left and right eyes, the width of the screen area each eye is halved and so is the aspect ratio. This is why the table above includes 1:1 aspect ratio which is roughly what happens when you take a 16:9 screen and divide it into two.

If you don't know the aspect ratio, you can usually get it from the number of pixels. Assuming square pixels, the aspect ratio is the horizontal resolution divided by the vertical resolution.

The math is straightforward, but it involves a bit of trigonometry. Let’s take it step by step:

  • If Df is the diagonal field of view and Ha:Va is the horizontal to vertical aspect ratio, we can find the corresponding diagonal size in the same units as the aspect ratio: 
Da = sqrt(Ha*Ha + Va*Va)
  • The screen height and width are proportional to the tangent of the half angle. We use this to convert between field-of-view space and aspect-ratio space: 
Da = tan(Df/2) and Df = atan(Da) * 2
  • If the tangent and arctangent functions operate in degrees, we get: 
Hf = atan( tan(Df/2) * (Ha/Da) ) * 2
  • Here the tan() function converts from FOV to aspect-ratio space, the ratio is scaled in that space and then converted back into FOV space.
Wonkish note: As the field of view gets larger, the difference between the horizontal and vertical diminishes. Once the diagonal field of view reached 180 degrees, the horizontal and vertical fields of view also reach 180 degrees – every direction lies in the plane of the eye.

Saturday, April 13, 2013

TV screen size vs. goggle field of view

Consider this a public service announcement. Many consumer goggle vendors like to market the visual experience of using their goggles by mentioning an equivalent TV viewing experience. For instance, "using our goggles is like watching a 72 inch TV from 10 feet away". This might sound impressive - who wouldn't want a 72 inch TV set - but is actually not so much. A 72 inch TV from 10 feet away provides just over 33 degree field of view, which is very narrow for a goggle.

The table below summarizes these conversions. Select the TV size from the top (in inches) or bottom (in centimeter), select the viewing distance from the left (in feet) or the right (in meters) and you get the equivalent diagonal field of view.

Conversion from TV diagonal size to HMD field of view
The math is not complex. The diagonal field of view is a function of S, the diagonal screen size and D, the viewing distance:

Field of View = 2 * arctan ( (S/2) / D )

Just make sure that S and D are using the same units and remember that most arctan functions return the value in radians, not degrees.

From the table, you can see that a standard-issue professional HMD with 60 degree field of view is equivalent to about a 70" screen from 5 feet away whereas a wide field of view device such as the xSight 6123 with 123 degrees field of view is like a 90" screen from 2 feet away.

How much field of view is enough? This is truly application-dependent. Most people prefer watching TV on a 50 inch screen instead of a 24 inch screen, but would prefer using a 24 inch computer monitor for word processing to a 50 inch monitor. Wide field of view - and thus immersion - is great for gaming. High pixel density - and thus narrowed field of view with a given resolution - is better for seeing details.

To illustrate the difference between TV requirements and goggle requirements, consider this: for TVs, THX recommends “best seat-to-screen distance” is one where the view angle approximates 40 degrees. 40 degrees in goggles is quite small.

UPDATE: Please also see the matching post on "converting diagonal field of view and aspect ratio to horizontal and vertical field of view"