Difference between revisions of "Field of View"

From Valve Developer Community
Jump to: navigation, search
m (cleanup)
(massive clean up & corrected misinformation)
Line 1: Line 1:
'''Field of view''' ('''FOV''') is the maximum angle between the peripherals of a person's or camera's vision. In [[HL2]] and most other games, field of view is a measure of the vertical angle, as resolutions with different aspect ratios must adhere to this vertical field of view, while allowing a different horizontal field of view. This is how widescreen becomes a wider view, rather than just cropping off the top and bottom of the square image.
+
'''Field of view''' ('''FOV''') is the maximum angle between the peripherals of a person's or camera's vision.  
  
The field of view can also be altered to achieve a warping effect, where far objects appear further away and close objects appear closer for example. To obtain the most realistic perspective, the field of view is calculated as the amount of angular space a computer monitor or television takes up in the average user's eyesight.
+
In [[HL2]] the Player Character's ''Horizontal'' Field of View is set to 75 degrees. Screen settings aspect ratios are achieved by cropping the top and bottom of the image (ie reducing the vertical FOV).  
  
Taking the FOV angle into consideration for a standard perspective transform (linear) involves multiplying the Z co-ordinate by the tangent of the field of view divided by 2.
+
The [[NPC FOV]] angle determines the diameter of the circular image within their [[ViewCone]].  
  
z = z * tan( fov * 0.5 )
+
== Optimising Player FOV ==
  
The most common use of altering the field of view is to simulate zooming, since zooming with a real camera uses the same effect of compressing (or expanding, for wide angle lenses) the depth (z) range.
+
* '''[http://en.wikipedia.org/wiki/Motion_sickness Motion Sickness]''' : Smaller FOVs tend to exaggerate camera movement, whilst larger FOVs tend to minimise its effect on the image. Thus setting a wider FOV can sometimes help to reduce Motion Sickness during gameplay. If you are experiencing such problems in Half-Life 2, try changing the FOV to 90 using the command "<code>sv_cheats 1;fov 90</code>" in the console.
  
{{note|Some people experience sickness with the FOV in Half-Life 2 which is set to 75 by default. This is mostly because the default FOV in other games is set to 90. If you are experiencing such problems in Half-Life 2, try to change the FOV to 90 using the command "<code>sv_cheats 1;fov 90</code>" in the console.}}
+
* '''[http://en.wikipedia.org/wiki/Perspective_distortion_%28photography%29 Perspective Distortion]''' : Wider FOVs introduce more Perspective Distortion into a image, whereas small FOVs tend to ''flatten'' perspective. The distortion is caused by projecting (spherical) optical geometry onto a flat screen - that's why IMAX Dome screens are curved. Like all optical artifacts, they are much more conspicuous in still images than in moving images such as FPS GUIs.
 +
 
 +
* Theoretically, an ''optically correct'' perspective can be obtained by matching the Camera's angle of view to the angle between the Player's eye and the edges of the image on his monitor screen. Obviously this angle varies according to the actual size of the Player's screen and how far away from the screen he is actually sitting. Most players will unconsciously move their head position to obtain the most comfortable perspective, but an ''optically correct'' position can be calculated by :
 +
viewer distance = (screenwidth)/(2*tan(FOV/2))
 +
so where the FOV is 75 degrees:
 +
viewer distance = (screenwidth * 0.652)
 +
 
 +
== FOV calculations ==
 +
* A useful rule of thumb: an object will appear twice as tall and twice as wide if the camera-to-object distance is halved. This is true for any FOV. This may be helpful when working with [[LOD]] versions of models and textures.
  
 
== See also ==
 
== See also ==
 
* [[Wikipedia:Angle of view|Angle of view]] - a Wikipedia article on view angles.
 
* [[Wikipedia:Angle of view|Angle of view]] - a Wikipedia article on view angles.
 +
* [[Wikipedia:Parallax|Parallax Motion]] - The Wikipedia article on parallax motion.
  
 
[[Category:Glossary]]
 
[[Category:Glossary]]
 
[[Category:Camera]]
 
[[Category:Camera]]

Revision as of 16:36, 14 March 2008

Field of view (FOV) is the maximum angle between the peripherals of a person's or camera's vision.

In HL2 the Player Character's Horizontal Field of View is set to 75 degrees. Screen settings aspect ratios are achieved by cropping the top and bottom of the image (ie reducing the vertical FOV).

The NPC FOV angle determines the diameter of the circular image within their ViewCone.

Optimising Player FOV

  • Motion Sickness : Smaller FOVs tend to exaggerate camera movement, whilst larger FOVs tend to minimise its effect on the image. Thus setting a wider FOV can sometimes help to reduce Motion Sickness during gameplay. If you are experiencing such problems in Half-Life 2, try changing the FOV to 90 using the command "sv_cheats 1;fov 90" in the console.
  • Perspective Distortion : Wider FOVs introduce more Perspective Distortion into a image, whereas small FOVs tend to flatten perspective. The distortion is caused by projecting (spherical) optical geometry onto a flat screen - that's why IMAX Dome screens are curved. Like all optical artifacts, they are much more conspicuous in still images than in moving images such as FPS GUIs.
  • Theoretically, an optically correct perspective can be obtained by matching the Camera's angle of view to the angle between the Player's eye and the edges of the image on his monitor screen. Obviously this angle varies according to the actual size of the Player's screen and how far away from the screen he is actually sitting. Most players will unconsciously move their head position to obtain the most comfortable perspective, but an optically correct position can be calculated by :
viewer distance = (screenwidth)/(2*tan(FOV/2))

so where the FOV is 75 degrees:

viewer distance = (screenwidth * 0.652)

FOV calculations

  • A useful rule of thumb: an object will appear twice as tall and twice as wide if the camera-to-object distance is halved. This is true for any FOV. This may be helpful when working with LOD versions of models and textures.

See also