This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
The details of this calculation are not easy to type out using reddit formatting. For a full explanation, please see the slides as an image album here, or download them as a power point here. Note that you have to download the power point because Google Slides doesn't display some important things correctly.
Is it possible to determine the field of view of a video game camera from a screenshot like this? Yes, actually.
If sufficiently clear rectangular objects are in the view of a video game camera, then it is possible to calculate the field of view (FOV) of the camera with a simple construction. You need at least three lines - two that are parallel, and at least one more line that is perpendicular to the other two. Then you can perform this construction to get values for a, b, and h. Then you can compute a camera's virtual focal length f as:
f = sqrt( ab - h2 )
And once you have that, you can compute the field of view as:
FOV = 2 atan (w / 2f)
where w is the width of the screen in pixels. For a 1080p image, the screen is 1920 pixels wide, so w = 1920.
From the image at the start, I obtain values of
a = 4887 pixels
b = 4144 pixels
h = 1246 pixels
Then f = sqrt(4887 * 4144 - 12462) = 4324 pixels, and the field of view is
FOV = 2 atan (960 / 4324) = 25.0 degrees.
The example image is from the game Horizon: Forbidden West with the main weapon drawn and zoomed in. It makes sense that the field of view is narrow in that case. When the players lowers their weapon and zooms back out to normal, a similar calculation can be done to show that the main gameplay camera has a FOV of 70.0 degrees. The slides linked at the top contain several examples from other games to show how this technique can be applied broadly pretty much any time a rectangular object (many buildings, floor tiles, tables, etc) are in view. The calculations are never perfect due to errors constructing the lines from which the values are measured, so there are several examples where the numbers come out off by a tenth of a degree or so.
Subreddit
Post Details
- Posted
- 2 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/theydidthem...