Blending problem with spheres
I've got a problem with my first simple solar system program.
I made an Earth using gluSphere(quadratic,0.2f,32,32); and an atmosphere using gluSphere(quadratic,0.22f,32,32);
The atmosphere is blended with glBlendFunc(GL_SRC_ALPHA,GL_ONE);
The Earth and atmosphere are at the same position.
It looks like this:
The clouds are not blended correctly. Without the Earth you can see what I mean:
With glDisable(GL_DEPTH_TEST); I don't get the right effect:
And with glDepthMask(GL_FALSE); I get another strange effect:
Did I something wrong or used the wrong method?
How can I make an Earth with atmosphere without strange black lines?
Thanks for your help!
(Sorry for my bad English)
[Edited by - Robbbert on November 8, 2004 12:15:59 PM]
- Enable front face culling
- Render atmosphere
- Enable back face culling
- Render planet
- Render atmosphere
You don't need to disable depth buffer or even depth writes.
- Render atmosphere
- Enable back face culling
- Render planet
- Render atmosphere
You don't need to disable depth buffer or even depth writes.
You should never let your fears become the boundaries of your dreams.
Where did you get the textures? They're amazing; nice job if you did 'em yourself!
I'd like to see what it looks like now that you have it working.
Could you do another post please Robbbert?
Could you do another post please Robbbert?
Quote: Original post by llvllatrixI also have a earth texture here. I think I got it from USGS (US Geological Survey) and it's 8k x 4k RGB888. Definetly an overkill.
Where did you get the textures?
Previously "Krohm"
nah, the more detail the better. I'm having lots of fun with the 64k Earth texture in Celestia ^_^
I used Earth and Mars textures from this site:
http://www.space-graphics.com/
And other planet textures from:
http://astronomy.swin.edu.au/~pbourke/texture/
http://www.space-graphics.com/
And other planet textures from:
http://astronomy.swin.edu.au/~pbourke/texture/
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement