View Full Version : gluperspective perameters
08-16-2005, 09:19 AM
im using the gluperspective function and the objects i draw dont look realistic. im trying to make a simulator and a door thats suppose to be 7 feet high by 3 feet looks like a door thats 10 feet high and 1 foot wide.
gluperspective 54, width / height, .1, 15000
whats a more realistic set of perameters i can use
Are width and height floats for the divide?
If you want to look through your monitor, like a virtual window into the world, some simple trig will get you an appropriate fov to use, given a typical eye distance from the screen.
Watch zNear and zFar, don't hose your depth buffer. Try zNear = 1?
08-16-2005, 10:39 AM
width and height is the pixel width and height of the screen.
as far as the number 45 in the gluperspective function. i have no clue what its suppose to mean or what it does
08-16-2005, 10:55 AM
Originally posted by ninjarider:
width and height is the pixel width and height of the screen.Just make sure they are floating point values. I not, you will get an integer division, which means your aspect ration will not contain the fractional part of the division result.
as far as the number 45 in the gluperspective function. i have no clue what its suppose to mean or what it doesIt is the Field of View of your view frustum in y direction. The vertical opening angle of your camera.
08-17-2005, 06:00 AM
is the angle of the camera view to be concidered from ground level up or is it the full radius of the angle
08-17-2005, 06:07 AM
The full angle between the upper and lower planes of the view frustum.
If you're really interested, you can get more info here:
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.