Sign in to follow this  
Niall18

Solar System

Recommended Posts

Niall18    122
Hey guys i'm creating a solar system and at the moment i have a sun, earth and moon all positioned and rotating properly. I added a positional light into the scene and i seem to be getting some odd results. For example if i stop everything moving and line the sun eath and moon up on the right hand side for an eclipse effect then place the light on the left hand side rather than the sun blocking out the light hitting the planets it still lights them up. So i get the left hand side of the sun lit which is fine but also get the left hand side of the earth and moon lit up. I get the same messed up results when all the planets are moving and rotating, the bits that are supposed to be in shadow aren't. Its like the light isn't taking into account the other spheres exist. Help??

Share this post


Link to post
Share on other sites
Enigma    1410
OpenGL's lighting model does not take into account occlusion. It can't since objects may be rendered before their occluders are rendered. You need to look into some form of shadow casting algorithm. Shadow Mapping and Shadow Volumes are popular shadowing algorithms.

Enigma

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this