Jump to content
  • Advertisement
Sign in to follow this  
firlefanz

Dx8 Problem when drawing transparent spheres - they have strange holes

This topic is 4836 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I have some problems with my spheres. I have a universe with 30 planets and a sun. The planets and also the sun are rendered 1) itself, not transparent 2) a bit larger (scaled) transparent cloud texture 3) again a bit larger, transparent, cloud texture The transparent spheres now have strange holes, this is too bad. I don't know where they are coming from and how to get rid of them. It seems they appear on the 'backside' from inside the sphere, I am not sure. Here some screens, one with the non transparent part, two with only the transparent part(s). I tried with and without normals, same problem, and without UV coordinates I had no texture, but also the same problem. Any ideas? Screens: http://www.ericbehme.de/bilder/temp/screenplanets.jpg http://www.ericbehme.de/bilder/temp/screenplanets2.jpg http://www.ericbehme.de/bilder/temp/screenplanets3.jpg Thanks, Firle

Share this post


Link to post
Share on other sites
Advertisement
you will need to enable back face culling if not sorting your vertexes.
as in

SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW);

Share this post


Link to post
Share on other sites
no problem. i should add that if you still want to be able to see the backside of your objects there is a transparency trick that takes advantage of spherical geometry: turn on front face culling and draw the sphere (this draws only the backside of the sphere), then switch to backface culling (which will only draw the front). If you're using lighting, you'll need to use a clipplane instead of culling.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Nope. Works perfect for me, I just need that for the clouds around my planets, and they look perfect now :)

Thanks,
Firle

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!