The online racing simulator
Vertical and Horizontal FOV
(9 posts, started )
Vertical and Horizontal FOV
I was wondering how exactly the vertical FOV in rFactor corresponds with the horizontal FOV in other games, like LFS. I'm pretty sure it's more than just 90 degrees horizontal FOV = (90/16)x10=56.25 , for a 16:10 monitor. I've had a search for some FOV calculators, and most suggest that with a 16:10 aspect, 90 degrees horizontal works out at around 65 degrees vertical. Any ideas how this is calculated?
Bump.
#3 - wien
Quote from DaveWS :I'm pretty sure it's more than just 90 degrees horizontal FOV = (90/16)x10=56.25 , for a 16:10 monitor.

I don't have the energy to derive the math just now, but it isn't that simple, no.

By extracting the view frustum planes from a projection matrix inside my 3D framework and then calculating the angle between the top and bottom planes I get ~67.1 degrees from a 90 degree horizontal FOV, which matches up pretty well with the number you found. Every game can do all kinds of tricks with their projection matrix though, so it's not certain the angles will match in each one.

I'll see about working out the formula I'm using some time it isn't saturday night and I'm not drunk.
#4 - wien
Meh, I couldn't leave it alone and derived the math from my projection matrix code. (I'm sure it could be simplified even more, but it's late) Most apps will probably do something similar to this but it's hard to know exactly.

V = vertical FOV
H = horizontal FOV
A = aspect ratio (10/16 for 16:10)

H = 4 * arctan(A * tan(V / 2))
V = 2 * arctan(tan(H / 4) / A)

It's been a long time since I've done any math worth mentioning, so I could be doin' it rong, but it seems to be correct AFAICT. 90 degrees horizontal FOV gives me 67.06819283404867 degrees vertical FOV using this formula.
Right, no I haven't forgotten about this thread...

So I looked at the formula you derived, and I'm pretty certain there is an error in there, TBH I'm not sure how you derived it, but thanks for trying to help me out. Basically the problem is the vertical FOV becomes smaller with an aspect ratio closer to 1:1 rather than larger as it should.

I spent an hour or so last night trying to figure it out from the basics, thanks for the wikipedia link BTW, and this is the formula I've come up with. I guess it could be simplified, but I can't see how..

V = 2 * arctan (0.5B * (tan 0.5H / 0.5A))

Where:
V = Vertical FOV (degrees)
H = Horizontal FOV
A = Aspect width (e.g. for 16:10, 16)
B = Aspect height

I haven't derived one for the horizontal calculation, since I'm not as interested in that.

Using the above formula with a horizontal FOV of 90 degrees, and an aspect ratio of 16:10, it gives me 64.01076642 vertical degrees.
Quote from DaveWS :I'm pretty sure it's more than just 90 degrees horizontal FOV = (90/16)x10=56.25 , for a 16:10 monitor.

FWIW, it's not as simple as this simply because the monitor does not follow an arc, but it's obviously flat, meaning that the relationship in FOV is not linear, especially at high FOV angles.
OK, I decided to rearrange the formula I came up with to calculate V, so that H is now the subject:

H = 2 * arctan ((0.5A * tan 0.5V) / 0.5B)

Where:
V = Vertical FOV (degrees)
H = Horizontal FOV
A = Aspect width (e.g. for 16:10, 16)
B = Aspect height

As before.

Using 64.01076642 vertical degrees with 16:10 aspect ratio, I get 90.0 horizontal degrees as it should.
#8 - wien
Quote from DaveWS :So I looked at the formula you derived, and I'm pretty certain there is an error in there, TBH I'm not sure how you derived it, but thanks for trying to help me out.

Hrm, yeah. Something's wrong there. Sorry about that. (Never do math while drunk ) I have no idea where the 4 came from, but that's wrong. I also got the aspect ratio the wrong way around. The correct formulas are:

V = vertical FOV
H = horizontal FOV
A = aspect ratio (16/10 for 16:10)

H = 2 * arctan(A * tan(V / 2))
V = 2 * arctan(tan(H / 2) / A)

Quote from DaveWS :Using the above formula with a horizontal FOV of 90 degrees, and an aspect ratio of 16:10, it gives me 64.01076642 vertical degrees.

Yep, that's the same result I'm getting (now). I couldn't get your formula to work, but I get the same numbers you do so I'm probably just not reading it right.
OK thanks for clearing that up then!

Vertical and Horizontal FOV
(9 posts, started )
FGED GREDG RDFGDR GSFDG