Jump to content

View more

Image of the Day

Working on an auto spawn system. #gamedev #indiedev #screenshotsaturday https://t.co/Mm2kfekz7b
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Question regarding Field of View

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 superkent   Members   

158
Like
0Likes
Like

Posted 06 February 2011 - 07:17 AM

I am having a little trouble understanding how the field of view and aspect ratio are related. When we set our FOV when we create our perspective matrix, lets say to 45 degrees, does this mean that the system will create a frustum that is 45 degrees both horizontally and virtically? And if so, how does it compensate for aspect ratios that arent 1:1? I have been looking at different frustum class implementations and I dont ever get the same numbers as the examples for the coordinates of the near and far planes, though my math is a bit shaky.

#2 SiCrane   Moderators   

11759
Like
0Likes
Like

Posted 06 February 2011 - 08:07 AM

According to the documentation for Matrix.CreatePerspectiveFieldOfView the field of view parameter is the field of view in the y direction.

#3 kiwibonga   Members   

183
Like
0Likes
Like

Posted 06 February 2011 - 10:07 AM

One important detail: the FoV setting in that function is the angle from the center of the screen to the edge. That means setting a 45 degree (pi/4) angle will actually result in a 90 degree (pi/2) FoV.

In a single player game, it's appropriate to set the FoV angle depending on the aspect ratio of the screen -- closer to 90 degrees (pi/2) on 4:3, and closer to 120 degrees (2pi/3) on 16:9/16:10.

In multiplayer, users will complain about the game balance implications of widescreen players being able to see more, so find a sweet spot between the two :)






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.