I’m drawing a 3D textured Earth (gluSphere) and a billboard effect for the sun (gluDisk) and if I don’t set the light distance and the object distance relative close then I get the artifacts that you can see on the first attached picture…the artifacts on the Sun (the black unpainted polygons that change if I rotate the scene). It seems like my near vs far clipping planes are probably part of the problem but I’m not sure…in Java3D I know the ratio of those distances (back to front clipping plane) had to be about 3000 because of the zbuffer but I’m not sure that’s the same in JOGL/OpenGL. Does anyone have a suggestion?
Also, as a second question, the second attached image shows the earth day night terminator/shadow that is very sawtooth looking…I know part of this is due to number of segments the sphere is broken into but is there some blending or lighting call that I should be making to get rid of this sawtooth pattern and instead make it a smooth day to night transition? I know if my sun in not tilted below the earth equator that I don’t see this issue, but once the sun is below or above it at some angle and hence applying the light at some angle, the I do see the sawtooth.
Thanks
Could not attach…folder is full…here are links:
http://zaczek.com/joglutils/earth1.jpg
http://zaczek.com/joglutils/earth2.jpg