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\$
  • \$\begingroup\$ FOV is Field Of View. \$\endgroup\$ – Anko Dec 30 '14 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\$ – toshko3331 Dec 30 '14 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\$ – Anko Dec 30 '14 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\$ – toshko3331 Dec 30 '14 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\$ – Anko Dec 30 '14 at 4:17
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\$
  • \$\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\$ – Philipp Dec 30 '14 at 8:26
  • \$\begingroup\$ It depends on math functions implementation. Usually they expect angles in radians, but that is not always so. \$\endgroup\$ – Kromster Dec 30 '14 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\$ – toshko3331 Dec 30 '14 at 22:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.