🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Mathematically ideal field of view

Started by
5 comments, last by silikone 5 years, 4 months ago

In the interest of finding a certain field of view to target in a 3D game, I wanted to settle for a number that hopefully has as little arbitrariness as possible. One approach that seems to be used is to treat the player's screen as a window into the virtual world, meaning that there is a 1:1 correspondence with the virtual field of view and the screen's occupied area of the vision. The obvious problem with this is that players have wildly varying screen sizes and viewing distances, but even if this were accounted for, the resulting field of view would be way too low for a lot of people's comfort, including myself.

More realistically, you need to be able to see at least 90 degrees horizontally in the virtual world. That number, 90, is a staple of the gaming world, owing to its mathematical significance as an angle. However, because screens now more than ever aren't square, the verticality is more or less neglected when only the horizontal portion is taken into account. For this reason, an effective horizontal field of view that is higher than 90 degrees is desirable, but at the same time, we don't want a ludicrous amount of distortion that occurs as we approach 180 degrees, and this is where the question arises: How high should it be?

 

I realize that making this parameter configurable is good move, but even then, there should be a reasonable default and maximum value.

Advertisement
4 hours ago, silikone said:

One approach that seems to be used is to treat the player's screen as a window into the virtual world, meaning that there is a 1:1 correspondence with the virtual field of view and the screen's occupied area of the vision. The obvious problem with this is that players have wildly varying screen sizes and viewing distances, but even if this were accounted for, the resulting field of view would be way too low for a lot of people's comfort, including myself.

That's the mathematically ideal answer. Everything else is a lie :D

IMHO, setting the vertical FOV and calculating the horizontal produces better results in these days of wide-screen monitors. 

Most recent games I've looked into let you choose between 60 to 80 degrees vertical, which ends up as around 90 to 115 degrees horizontal on a standard wide-screen (or 145 to 155 degrees horizontal on a triple wide). 

We use 90 degree horizontal fov when aspect ratio is 16:9. When ratio is wider we scale horizontal fov. When ratio is taller we scale vertical fov. This way horizontal fov is at least 90 degree and vertical fov is at least 59 degree no matter the aspect ratio.

On 2/10/2019 at 6:57 PM, silikone said:

One approach that seems to be used is to treat the player's screen as a window into the virtual world, meaning that there is a 1:1 correspondence with the virtual field of view and the screen's occupied area of the vision. The obvious problem with this is that players have wildly varying screen sizes and viewing distances, but even if this were accounted for, the resulting field of view would be way too low for a lot of people's comfort, including myself.

And then there's also virtual reality, where straying from "physical" FOV might be a Bad Idea.

The mathematically ideal answer is: I CAN SEE EVERYTHING!!!

But more seriously:  I get motion sickness from narrow FOV.  I have to intentionally use a field of view angle which looks unrealistic so that my brain doesn't try to pretend that it's reality.  Games which don't allow for adjustable FOV infuriate me.

Looking into the maths of standard screen projections again, it seems reasonable to settle for a neat inverse tangent fractional value.

I've commonly seen the FoV of ~103 being used in games. Lo and behold, this is equivalent to arctan(5/4) * 2.

This topic is closed to new replies.

Advertisement