Advertisement

Maximum value for Far Clip

Started by February 26, 2005 09:36 AM
3 comments, last by lc_overlord 20 years ago
Hi, Is there a maximum value for the far clip plane? If so what is it? The reason I ask is that I cannot seem to draw an extremely large object at an extrememly large distance (1-2 million units) away and be able to view it, it just doesn't appear, even when I make the Far Clip really large. It cannot be the fact that it is too small to see because the length and width of the object are massive. I know the value is specified as a GLdouble but I don't know the constraints of the type either. Any ideas? Thanks Connell
then scale down everything far away to reasonable sizes.

a object one million kilometers in diameter and two milion kiloemeters away
is renderd the same way as an object one meter wide two meters away and with the z-far/near value scaled acordingly.
The only thing that can happen with absolutley enoumous values is that you loose precision(and gain noice) in the matrix multiplications and the z buffer.
Advertisement
log_2(far/near) > 23 => doesn't work for sure.
>20 might not work
ide be carefull about drawing anything further then a 32bit number distance away. The depth buffer on most hardware is only 32b-ati/24b-nvidia
that is not the main problem why you souldn't do draw anything further then a 32bit number.
The depth buffer is scaled to a value between 0 and 1 internaly(using some pseudo 64 bit floating point math) and then when it's written to the depthbuffer it's scaled to the depth of that buffer.
the main problem is that the variables and memoryspace carrying the cordinates can't handle the size, so you would experience cliping warping of numbers and horrible misscalcylations.

O, and by the way, most modern Nvidia cards (geforce and up) can handle 32bit depthbuffers as well as any ATI card.
But it prefers 24 bit's because it can then combine the depth and stencil buffer into a single memory area, speeding things up a little.

This topic is closed to new replies.

Advertisement