Jump to content
  • Advertisement
Sign in to follow this  
andrew_12

camera FOV in games

This topic is 2774 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a 3rd and 1st person camera modes in my game, but I have 80 camera lense FOV for both of them. Ive never gave too much importance to this and used that value after tests. But now I think this IS important for adding more realism. So, what values are recommended or used in practice?

And finally, Im thinking of changing my skydome object to be rendered by another camera with higher FOV. Is this a good idea? What should I set for this one?

Share this post


Link to post
Share on other sites
Advertisement
Whatever you think looks good. Human eyes vary and are not rectangles, so just play around with the number until it looks good.

http://en.wikipedia.org/wiki/Visual_field

Share this post


Link to post
Share on other sites
The sky should be rendered with the same FOV as the rest of the world..

IIRC the COD games default to 60 degress but let you change it from 45 to 80.
Some older shooters used 90, which I liked at the time, but it looks weird to me now.

If you want the screen to be a "correct" 3rd person window, measure the average distance that a person sits from their monitor, and the width/height of the monitor, then use trigonometry to figure out what the angle is from one edge of the screen to the other ;)


Also -- are you currently using vertical-FOV or horizontal-FOV values? This changes the way that wide-screen monitors will behave compared to 5:4/4:3 monitors.

Share this post


Link to post
Share on other sites
for FOV computing i'm using this simple thing :



float aspectRatio = static_cast<float>(m_WindowWidth / m_WindowHeight);
float fovy = 2 * atan(aspectRatio) * 180 / 3.14f;

gluPerspective(fovy, aspectRatio, zNear, zFar);

Share this post


Link to post
Share on other sites
OK.

Though Ive heard of people using another camera to render the sky with a different FOV.
My sky is currently set to be render behind everything else but is actually small. Should I just scale it?

Share this post


Link to post
Share on other sites
Skydome means a sphere. The camera should be always in its center. What happens if you are inside a sphere and scale that sphere? Nothing from the camera's point of view. Just think about it.

You're doing something wrong, for example not placing the camera in the center.

Share this post


Link to post
Share on other sites
a skydome isn't the same as a sphere, it's more of a spherical cap but yeah about the rendering with different camera part.
You might need to eventually, you could for one just render with the same camera as the player is viewing trough. You can then re-use the z-buffer for some fragment rejection (assuming you aren't rendering your sky first). But later when you might want to have reflections somewhere, what's going to happen with the clouds you didn't render trough the player's camera?

just depends on if you really need the whole skydome to be drawn i think

Share this post


Link to post
Share on other sites
Right, forget that sentence.

So do I rememebr it wrong that a skydome is rendered by another camera with different fov by some?

Share this post


Link to post
Share on other sites
Quote:
Original post by Murdocki
a skydome isn't the same as a sphere, it's more of a spherical cap but yeah about the rendering with different camera part.
You might need to eventually, you could for one just render with the same camera as the player is viewing trough. You can then re-use the z-buffer for some fragment rejection (assuming you aren't rendering your sky first). But later when you might want to have reflections somewhere, what's going to happen with the clouds you didn't render trough the player's camera?

just depends on if you really need the whole skydome to be drawn i think


No. Not the same camera. IT HAS TO BE IN THE CENTER OF THE SKYDOME. Otherwise you could fly out of it. Unless you make it infinitely big, which is the same as a small dome with the camera centered.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!