I'm looking for some guidance.
I'm not sure if this is possible, and I'm not sure where to start.
I need to measure the FOV angles of a first-person, 3D game using only gameplay screenshots.
I'm bound by the game's sandbox.
The best I can do is use existing in-game geometry as a reference points.
Right angles, parallel lines, squares, cubes, and other primitives are somewhat plentiful, and I have a fair amount of control over the camera's position and orientation.
Can FOV be derived from the 2D appearance of known angles, distances, or objects?
If not from a single image, can it be done using multiple images; each showing a different perspective of the same scene, or a different arrangement of known objects?
Consider the diagram at the bottom of this post.
My understanding is that a gameplay screenshot is represented by the z Projection plane.
The Viewing Frustum represents the observable 3D space in-game.
I need to measure the following angles:
- Horizontal Field of View (x FOV)
- Vertical Field of View (y FOV)
- Diagonal Field of View (diag FOV)
Things available to me:
- I can increase and decrease a singular in-game "FOV" setting
- I can point and position the camera
- I can view some common shapes, primitives, and angles
- I know the width, height, and resolution of z Projection
Things I do not/cannot know: (unless someone else knows a way)
- The distance from the camera origin to the center of the z Projection plane
(maybe sometimes this is called focal length? not sure) - Camera focal length (if different from above)
- Camera aperture (if relevant)
- Maybe more...
I found two online tools that claim to do this, but I'm skeptical.
- They don't specify any requirements for the camera's position/orientation relative to the reference object.
- The ONLY thing that affects the calculation is the distance between two vanishing points.
Tools are here:
https://www.desmos.com/calculator/3e9hs7usyr
https://www.desmos.com/calculator/zb2jqy5bik
Finally, these tools don't work for me since I need to detect too wide a range of FOVs. I need a method that can detect FOVs as small as 5 degrees and as large as 150 degrees. At an FOV of 5 degrees, the distance between the two vanishing points becomes absurdly large and way beyond the margin of error of these tools AND my image resolution.