3
\$\begingroup\$

a beginner game developer here. I have recently taken upon learning about 3D game development and I am stuck on a simple matrix problem.

diagram

The image is found from this article: http://www.codinglabs.net/article_world_view_projection_matrix.aspx

I am trying to represent this matrix in my code but I am not sure what precisely is meant by FOVx and FOVy. What is the difference and how would I represent this in my perspective matrix? I am not using any 3D api.

\$\endgroup\$
6
  • \$\begingroup\$ FOV is Field Of View. \$\endgroup\$ Commented Dec 30, 2014 at 3:52
  • \$\begingroup\$ I understand that part, but how do I get the x and the y? What is the difference? I thought the FOV was just an angle \$\endgroup\$ Commented Dec 30, 2014 at 3:55
  • 1
    \$\begingroup\$ It's two angles actually: one horizontal (the x component), one vertical (y). For example, to emulate human vision, you might want to have a camera that can "see" a somewhat greater horizontal angle than vertically. \$\endgroup\$ Commented Dec 30, 2014 at 4:06
  • \$\begingroup\$ Ah thank you, that actually clarifies things a lot more. I always assumed that the FOV was just a single angle. \$\endgroup\$ Commented Dec 30, 2014 at 4:12
  • \$\begingroup\$ That's pretty much the extent of my knowledge on projection matrices though! :) If you figure out the rest (or if that actually answers the question; I can't really tell), it's totally OK to post answers on your own questions too. \$\endgroup\$ Commented Dec 30, 2014 at 4:17

1 Answer 1

2
\$\begingroup\$

Here's wiki on topic: Field of view in video games

enter image description here

X and Y angles can be set separately to allow for wide/tall views. For example if you need a panorama for 3 displays like so, with default FOVy, but 120 degrees FOVx:

enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ One information you might also want to provide is which unit you need to provide the FOV in when building a projection matrix. I think it is in radian. Is this correct? \$\endgroup\$ Commented Dec 30, 2014 at 8:26
  • \$\begingroup\$ It depends on math functions implementation. Usually they expect angles in radians, but that is not always so. \$\endgroup\$ Commented Dec 30, 2014 at 9:05
  • \$\begingroup\$ Thank you, and in my implementation it is specifying the angles in radians. However, I just convert them to radians in the function itself so whomever is using the function can pass the angle in degrees. \$\endgroup\$ Commented Dec 30, 2014 at 22:13

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.