Jump to content
  • Advertisement
Sign in to follow this  
fat-tony

OpenGL Choosing field of view (for realism)

This topic is 4795 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

Although not entirely gaming related, I believe this is a legitimate OpenGL concern, and have search (and wasted a lot of paper doing math) to try to figure this out. Finally, I'm at wit's end and am going to start asking :) Here's a scene. We have an object 12m away, and have it approaching at 6m/s. Who cares about meteres. It's 12 units away, etc... Now, depending on the FOV, this will grow at a different rate as it approaches the screen. How do you choose your field of view to make this look "real". To throw a wrench into it, this isn't being projected onto a normal flat screen, but rather onto a hemisphere. That is of little consequence though right now, because I'm only worried about objects at the centre of the screen. But yes, my question stands. How would you properly set the FOV (choose your view frustum, in particular zNear) to have this object flying towards you at a close approximation to that actual speed. If needed, I can provide real-life sizes, but I'd rather just know the theory and work it out for myself. I'm just kind of stuck at that step.

Share this post


Link to post
Share on other sites
Advertisement
Since the monitor is kind of a 'window' into the world it shows, i'd figure in order to match 'real' visuals the FOV would need to be close to how big sliver of full 360 degree circle around you the surface of monitor makes.

I.e. if a single monitor covers say, 1/4th of the half circle in front of the viewer, the horizontal FOV for that monitor should be ~180/4 = 45 degree.

To make it even more fun, take into account when you set the scene 'camera' to cover angle wider than 40-50 degree, it'll start to generate visible distortions as soon as you point it just slightly up/down ... for this kind of visualization it'd perhaps make more sense to render the image with multiple cameras, each of them rendering small angle of the full image into viewport that makes just a part of full picture.

(Matrox has a small article for developers who'd like to support 'surround gaming' in their games that might help a bit when it comes to details... it's here: http://forum.matrox.com/mga/viewtopic.php?t=5717 )

Share this post


Link to post
Share on other sites
Quote:
Original post by tolaris
Since the monitor is kind of a 'window' into the world it shows, i'd figure in order to match 'real' visuals the FOV would need to be close to how big sliver of full 360 degree circle around you the surface of monitor makes.

I.e. if a single monitor covers say, 1/4th of the half circle in front of the viewer, the horizontal FOV for that monitor should be ~180/4 = 45 degree.

snip


hehe... that's where it gets really interesting. A single projector covers the entire face of the half-sphere (give or take a few degrees at the edges). Right now, it's just a matter of being able to project something into the center of it (the rest of it will come later).

I do plan on doing either the slices viewport thing, or doing cube mapping onto an appropriately shaped sphere-like object to correct for everything...

But right now, be it on a round screen or a flat screen, I'm still a bit confused about how to actually justify a given FOV setting.

As a thought, in the vertical field, would it be appropriate to use the actual angle from the projector to the screen? The projector has sort of strange geometry, but that seems like it might work.

Good deal on the matrox link! I'll read through it tomorrow more.

Share this post


Link to post
Share on other sites
If you're projecting on a hemisphere then your field of view should be 180 degress in each direction.

If you're going to start with a slice then you fov will be whatever proportion of that hemisphere you're going to start with.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!