# Manipulate horizontal FOV without affecting vertical FOV?

**URL:** <https://forums.unrealengine.com/t/manipulate-horizontal-fov-without-affecting-vertical-fov/621443>\
**Category:** Cinematics & Media\
**Tags:** unreal-engine, UE4-27, question\
**Created:** [August 4, 2022, 5:25pm UTC](https://forums.unrealengine.com/t/manipulate-horizontal-fov-without-affecting-vertical-fov/621443 "2022-08-04T17:25:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_9f166f801](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9f166f801](https://forums.unrealengine.com/u/anonymous_user_9f166f801)\
**Post date:** [August 4, 2022, 5:25pm UTC](https://forums.unrealengine.com/t/manipulate-horizontal-fov-without-affecting-vertical-fov/621443/1 "2022-08-04T17:25:27Z")

</div>

**I would like to change the horizontal FOV** (currently set: 90) of my camera to a smaller value (45) **without changing the vertical FOV**. Aspect ratio is the default value of 1.77…8 .

I tried setting horizontal FOV to 45 and aspect ratio to 0.88…9 (both half of the original values) but with the modified parameters the visible area appears to be cropped also vertically.

Why is this happening and how can I reduce the visible area only in one dimension?  
See also these images, created with a 1) 90 degree 2) 45 degree FOV:

 ![FOV90_original](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/3/0/0308c6acc435abf24144bf02a832b133894e875f.jpeg)  
 ![FOV45_cropped](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/d/1/dd1c32d40e1fec44c13fe3ee774a8ea9a7593cfb.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_9f166f801](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_9f166f801](https://forums.unrealengine.com/u/anonymous_user_9f166f801)\
**Post date:** [August 19, 2022, 3:26pm UTC](https://forums.unrealengine.com/t/manipulate-horizontal-fov-without-affecting-vertical-fov/621443/2 "2022-08-19T15:26:43Z")

</div>

Solved this by myself. For anyone having the same question in mind:  
The aspect ratio is not a factor directly calculated from vertical and horizontal FOV, thus decreasing horizontal FOV by 50% while keeping vertical FOV constant does not mean that aspect ratio is decreased by 50%.  
Use following formula instead to calculate an aspect ratio when FOVs are known:

```auto
ar = tan(hFOV/2)/tan(vFOV/2)

```

where _ar_: aspect ratio, _hFOV_: horizontal FOV, _vFOV_: vertical FOV

In my example this means:  
original values (suffix _A_):

```auto
hFOVA = 90
arA = 1.78
vFOVA = arctan(tan(hFOVA/2)/arA)*2 = 59

```

New values (suffix _B_) for my requirement of `hFOVB = hFOVA / 2` and `vFOVB = vFOVA`:

```auto
hFOVB = 45
vFOVB = 59

arB = tan(45/2)/tan(59/2) = 0.73

```

I found the formula when reading about how cameras work:  
The generated image can be imagined as the camera sensor on which the image is printed. The sensor has a width (_sw_) and height (_sh_). The aspect ratio (_ar_) is not the proportion between the fields of view but of the sensor dimensions:

```auto
ar = sw/sh

```

The sensor dimensions can be calculated when field of view and focal length (_f_) of the camera are known:

```auto
sw = tan(hFOV/2)*2f
sh = tan(vFOV/2)*2f

```

For the calculation of the aspect ratio, the focal length can be canceled out.

These websites helped me understanding my initial misconception and how it really works:

> **[Relationship between FOV and aspect ratio.. - Unity Answers](https://answers.unity.com/questions/888008/relationship-between-fov-and-aspect-ratio.html)**
>
> Unity is the ultimate game development platform. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers.

> **[What is FOV and how does it influence your data?](https://www.princetoninstruments.com/learn/camera-fundamentals/field-of-view-and-angular-field-of-view)**
>
> Article explaining FOV, angular FOV and how to calculate both

Be careful not to confuse the FOV angle (sometimes named AFOV) and metric measures of the captured image.
