Jump to content
  • Advertisement
Sign in to follow this  
silikone

Mathematically ideal field of view

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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). 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Edited by Nypyren

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!