# How to set camera horizontal and vertical FOV

I get the settings of the camera I have to use in FOV angle unit(both horizontal and vertical). How to set it in Blender? In Blender you can only insert one FOV. I assume that is the horizontal FOV and how can you set the vertical one? Can anyone help me? Thanks in advance

• You set it indirectly by specifying a rendering resolution. – maddin45 Jan 19 '15 at 13:05
• What do you mean by that? Does it mean that I can change both the horizontal and the vertical FOV even without changing the sensor size, focal length? – JianNius Jan 19 '15 at 14:29

I have found that the dimension along which the FOV applies depends on the image aspect ratio. Let us define the aspect ratio as the ratio of width / height, such that an aspect ratio larger than 1 means that we are in a landscape configuration.

if aspect ratio > 1.0
FOV is along width.
else
FOV is along height.


You can verify this by setting your image dimensions to, for example, X:2000; Y:1000, and Camera lens FOV:90°. Switch to ortho views and check the representation of the camera against the grid. See the following screenshots:  With that in mind, you can use specific FOV values. Remember that values going into and out of trigonometric functions have to be converted to and from radians. I use vfov to mean the required vertical FOV and hfov to mean horizontal FOV.

A. To specify the vertical FOV:

1. If your image is portrait or square:

• just set the wanted value in the FOV field.
2. If your image is landscape:

• Use FOV = 2 * atan((0.5 * width) / (0.5 * height / tan(vfov/2)))

B. To specify the horizontal FOV:

1. If your image is landscape or square :

• just set the wanted value in the FOV field.
2. If your image is portrait:

• Use FOV = 2 * atan((0.5 * height) / (0.5 * width / tan(hfov/2)))

(Note that you can simplify a bit if you compute the aspect ratio first)

Explanation:

1. We first find the focal length (in pixels) according to the required FOV, for example:

f = 0.5 * height / tan(vfov/2)

2. We use this to find the FOV along the other dimension.

hfov = 2 * atan((0.5 * width) / f) thus,

hfov = 2 * atan((0.5 * width) / (0.5 * height / tan(vfov/2)))

Example:

We need a 90° vertical FOV on a landscape image of 2000×1000px.

1. vfov in radians = 90° * pi / 180° = 1.5707… rad.
2. hfov in radians = 2 * atan((0.5 * 2000) / (0.5 * 1000 / tan(1.5707/2))) = 2.2142… rad.
3. hfov in degrees = 2.2142 * 180° / pi = 126.87°.
• This should be the accepted answer. Brilliant effort. The other answer is plain wrong. – Martijn Courteaux Apr 17 '19 at 8:20

The FOV camara parameter is for setting the horizontal FOV. You get the vertical FOV by dividing with the image aspect ratio.

Say you image is 1:1 aspect ratio, then the vertical and horizontal FOV will be the same.

If your FOV is 2:1, then the vertical FOV is half the horizontal value.

So, it's Horizontal FOV / aspect ratio = vertical FOV.

If your aspect ratio is 16:9, you must multiply by 0.5625 (because 9/16=0.5625)

• Say if I have set the FOV camera parameter to something like 60 grad. The default value of ratio in Blender is 1:1. Does that mean that the my vertical FOV is 60 grad too? Thanks in advance. – JianNius Jan 19 '15 at 15:03
• No, the default aspect ratio is 16:9. The value called Aspect Ratio in Blender is not actually the aspect ratio, but the PIXEL aspect ratio, which is the aspect of the pixels (only relevant for old TV's) Aspect Ratio is is width/height of the image. If you are using 1920*1080 you ratio is 16:9 – Billrey Jan 19 '15 at 15:31
• Em. Thanks but I think your equation is a bit wrong. You should've used the trigonometry for counting the aspect ratio. I just fount the website that shows that. Thanks pcgamingwiki.com/wiki/File:Fov_diagram.png – JianNius Jan 19 '15 at 16:14