10
$\begingroup$

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

$\endgroup$
2
  • $\begingroup$ You set it indirectly by specifying a rendering resolution. $\endgroup$
    – maddin45
    Jan 19, 2015 at 13:05
  • $\begingroup$ 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? $\endgroup$
    – JianNius
    Jan 19, 2015 at 14:29

3 Answers 3

12
$\begingroup$

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:

FOV along image width

FOV along image height

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°.

Result: Specifying vfov in landscape

$\endgroup$
1
  • $\begingroup$ This should be the accepted answer. Brilliant effort. The other answer is plain wrong. $\endgroup$ Apr 17, 2019 at 8:20
6
$\begingroup$

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)

$\endgroup$
3
  • $\begingroup$ 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. $\endgroup$
    – JianNius
    Jan 19, 2015 at 15:03
  • $\begingroup$ 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 $\endgroup$
    – Billrey
    Jan 19, 2015 at 15:31
  • 5
    $\begingroup$ 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 $\endgroup$
    – JianNius
    Jan 19, 2015 at 16:14
0
$\begingroup$

I've put a simple (ad-free) online converter here:
http://phrogz.net/tmp/fov-converter.html

screenshot of the above webpage

Enter your X/Y resolution (or aspect ratio) and either horizontal or vertical FoV and it will calculate the other one for you. It also creates a URL that you can save and share with the results.

(And yes, Blender's FoV is total horizontal FoV when the scene's resolution is wider than tall, but it's the vertical FoV when the scene's resolution is taller than wide.)

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .