Sign in to follow this  

going faster fps-SOLUTION-FOV smaller!!

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

Hey guys ! Thanks for the 400+ viewings of my original post and the 30 or so replies. I found the solution - it was very very easy - so I'll make you wait and I'll tell you a story. ================ I asked in another thread about how I calculate the max and min x, y, z possible values in my frustum. The responder said, well assuming your fov value is about 45 degrees giving you a view of about 90 degrees then we calculate it like this: blah blah blah, I thought about it for a while. Then, it dawned - I had my fov in gluperspective set to 90 giving a view of 180 degrees. ================ so I change my fov to 45 and then the FPS rocketed up to 25 or so in the slow bits and through the roof elswhere - up to 90 FPS in the slow parts !! Thanks for all your help though !

Share this post


Link to post
Share on other sites
Quote:
Original post by ade-the-heat
I thought about it for a while. Then, it dawned - I had my fov in gluperspective set to 90 giving a view of 180 degrees.

Not really. The field of view (FOV) in gluPerspective() is, as the name implies, the angle of the entire vertical view angle. If you called gluPerspective with a 90° fov, you'll get a vertical view angle of exactly 90°. The horizontal will be larger, depending on your screen dimension ratio (at 4:3, it would be around 106°, which is in fact rather large).

A 180° view angle is mathematically impossible with the standard perspective projection equations. The closest you'll get is 179.999..., and believe me, you'd have noticed if you were using that angle ;) Running around a 3D scene with a view >170° is like being on LSD, there is no way to miss that mistake...

If you supplied 45° to gluPerspective, you actually get a vertical view angle of 45°. That's quite small, a little too small to be really useful in practice. It will make your world look like through a zoom lens. 90°, on the other hand, is too large. The typical horizontal FOV is around 70°. Assuming a 4:3 ratio, that is a vertical FOV of approx. 55°.

Specifying a narrow FOV will of course speed up your engine, because it has to display less geometry. But it will have very annoying visual anomalies if you go too low.

Share this post


Link to post
Share on other sites

This topic is 4865 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this