Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

As far as I understand it, vertical Field of View should be adjusted to:

fov = 2 * arctan(0.5*screenHeight / distanceEyeScreen);

That is, Field of View should match a user's distance to and size of the screen.

In many FPS, there's a default value of 90° for horizontal FoV, or 60° for vertical FoV (assuming 16:9). One example is CryEngine. But for a 16:9 20" screen (diagonal of visible area, i.e. about 40 cm x 25 cm), this default value would require users to have their eyes 20 cm from the screen in order to get a perspectively correct view.

So either I've made a mistake in my calculations, or there must be a reason why you'd choose an inadequate FoV value on purpose.

What is the reason for a default FoV of 90° horz / 60° vert?

share|improve this question
    
I do know that higher FOVs can make a game feel faster as scenery moves by. It would seem to be a a design choice, also dependent on the device you're playing it on. What FPSs did you measure? –  Anko Apr 9 '13 at 20:51
    
@Anko Well I've did some "research" and found a lot of forum posts stating for different games that default FoV is 90° horz. Plus, I read some CryEngine docs and played around with FoV in its example game. –  dyp Apr 9 '13 at 21:01
    
The reason for why the FOV is default to whatever value it is set to, is that it generally makes no sense to set a value that is not constant. Most displays do not have sensors that tell how far away the user's head is. Therefore 90 degrees is a "good guess". I suppose you might say it is equivalent to saying "all of our 20" screen users should sit 20cm away from it". Are you saying you want to decrease the FOV because most users sit farther from their displays? It makes it too zoomed in and you gotta pan around more to see your surroundings. That makes a game suck more for me. –  Steven Lu Apr 9 '13 at 23:41
    
Simple answer: because it feels good enough while playing and doesn't introduce undue distortion like progressively wider FOV do. Messing around with camera angles is easy in any 3D editor, try different values and see for yourself. Not simple answer: it's an masonic conspiracy. –  Patrick Hughes Apr 10 '13 at 2:19
    
Related: gamedev.stackexchange.com/a/47619/14808 –  Laurent Couvidou Apr 10 '13 at 13:23

2 Answers 2

up vote 5 down vote accepted

I think having a FoV of 90deg is what feels natural when you try to mimick 'looking through human eyes'. Your calculations would be correct if you would use the screen to simulate a window into a virtual world, not a first person perspective. Image you would have to see the world trough a 20" frame 80cm away from your head ...

share|improve this answer
1  
But isn't "looking through a window into a virtual world" what a perspective projection is all about? Oh, and you can also project things "sticking out" of your screen to the screen surface. –  dyp Apr 9 '13 at 20:16
2  
For first person perspective games, having a very limited FoV can be irritating and hurt gameplay and immersion IMO, since you see much less than you are used to in real life. Personally, I find anything much below 90° inadequate. Imagine standing in a corner of a square room with a horizontal FoV of 65° as seems to be common for console games - you wouldn't be able to see the entire room, forcing you to keep looking left and right to maintain awareness. That would drive me nuts in real life :) –  melak47 Apr 9 '13 at 20:23
    
Yes, of course it is. Do this us.123rf.com/400wm/400/400/ronstik/ronstik1112/ronstik111200016/… with your fingers and simulate a 20" screen in front of you (80cm away). Now imagine that is all you could see. As melak47 pointed out, that would be irritating. Move this simulated 20" screen/frame now 20cm away from your head and it should match roughly with your actual field of view. –  Dirk Apr 9 '13 at 20:29
2  
Indeed, the false perspective induced by an artificially wide field of view is completely unnatural, and I personally often find the distortion it creates stressful and annoying. But it's still infinitely preferable to trying to view everything through a 20°-30° peephole, which is about what "realistic" perspective on a typical single monitor would imply. Talk about tunnel vision! –  Ilmari Karonen Apr 9 '13 at 23:31

A lot of the effect of FOV is on how fast you seem to move through the world (it's still the same speed; this is purely perceptional). With too wide a horizontal FOV you'll seem to move very fast, with too narrow you'll seem to move very slow. 90 degrees horizontal appears to be the "sweet spot", and the game developer can tune a desired movement speed for individual games from there.

It's also the case that 4 times 90 degrees is 360 degrees, which is a circle. Setting up horizontal FOV so that it maps nicely to the front/left/back/right quadrants appears to make sense.

And finally there's the old chestnut of precedence and inertia. I'm not sure if any games offered player-adjustable FOV before Quake, but Quake did and it defaulted to 90 degrees horizontal; it's easy to imagine other games just picking up on 90 degrees from there.

It's worth noting that nowadays 90 degrees is becoming less common, with games (particularly modern FPSs) setting on a slightly lower value - in or around 80.

If you want to aspect-correct your FOV you can use something like this (I don't pretend it's the only or best way, but it is consistent with the FOV calculator at http://www.emsai.net/projects/widescreen/fovcalc/; this assumes relative to a base aspect ratio of 4:3 (you can adjust that in the call to CalcFovY below))

float CalcFovX (float fov_y, float width, float height)
{
    float   a;
    float   y;

    if (fov_y < 1) fov_y = 1;
    if (fov_y > 179) fov_y = 179;

    y = height / tan (fov_y / 360 * M_PI);
    a = atan (width / y);
    a = a * 360 / M_PI;

    return a;
}

float CalcFovY (float fov_x, float width, float height)
{
    float   a;
    float   x;

    if (fov_x < 1) fov_x = 1;
    if (fov_x > 179) fov_x = 179;

    x = width / tan (fov_x / 360 * M_PI);
    a = atan (height / x);
    a = a * 360 / M_PI;

    return a;
}

Then call it like:

// you should use #define of const instead of magic numbers here, which are just here for illustration purposes in this sample
fov_y = CalcFovY (playerAdjustableFOV, 4, 3); // this is your base aspect that adjusted FOV should be relative to
fov_x = CalcFovX (fov_y, width, height); // this is your actual window width and height

The calculated fov_x and fov_y can then be plugged into the following perspective matrix (OpenGL convention):

1.0f / tan (DEG2RAD (fov_x) * 0.5f),
0,
0,
0,
0,
1.0f / tan (DEG2RAD (fov_y) * 0.5f),
0,
0,
0,
0,
(zFar + zNear) / (zNear - zFar),
-1,
0,
0,
(2.0f * zFar * zNear) / (zNear - zFar),
0

This will give you an aspect-adjusted horizontal FOV that maintains vertical FOV irrespective of resolution and aspect ratio.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.