felpy
12-11-2009, 01:12 PM
I'm trying to render the earth using a quadtree (independent sections) in a planar projection (I can't make use of the earth curvature). That means my desired frustum is from 1 to about 24000000 to be able to see the entire earth plane sitting in one corner very near the ground to the other corner of the earth plane. Obviously I'm having z-fighting issues (as well as jitter due to float precision, but that is another matter).
I tried the method explained in the page 45 of this pdf (http://www.mpi-inf.mpg.de/~mwand/papers/vis02.pdf) :
1. Set zFar to the maximum value needed.
2. Set zNear = zFar / ratio.
3. Clear z-buer.
4. Render scene and cull to the adjusted frustum.
5. Set zFar = zNear.
6. If zNear isn't close enough yet go back to step 2.
But I'm getting problems in the zone where the two frustums touch, it looks like this (http://img10.imageshack.us/img10/1347/union2frustumsmal.jpg) and I can't figure out what's going wrong. I render the image in two passes, one with a different frustum from 50 to 50000000 and from 1 to 50, as mentioned in the pdf, clearing the zbuffer in between.
Do you have any idea of what I'm doing wrong?
I'd also appreciate suggestions on alternative aproaches.
I tried the method explained in the page 45 of this pdf (http://www.mpi-inf.mpg.de/~mwand/papers/vis02.pdf) :
1. Set zFar to the maximum value needed.
2. Set zNear = zFar / ratio.
3. Clear z-buer.
4. Render scene and cull to the adjusted frustum.
5. Set zFar = zNear.
6. If zNear isn't close enough yet go back to step 2.
But I'm getting problems in the zone where the two frustums touch, it looks like this (http://img10.imageshack.us/img10/1347/union2frustumsmal.jpg) and I can't figure out what's going wrong. I render the image in two passes, one with a different frustum from 50 to 50000000 and from 1 to 50, as mentioned in the pdf, clearing the zbuffer in between.
Do you have any idea of what I'm doing wrong?
I'd also appreciate suggestions on alternative aproaches.