Field of View

From Valve Developer Community
Revision as of 06:33, 20 November 2007 by Tourorist (talk | contribs) (cleanup)
Jump to navigation Jump to search

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.

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.

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.

z = z * tan( fov * 0.5 )

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.

Note.pngNote: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 "sv_cheats 1;fov 90" in the console.

See also