• Advertisement
Sign in to follow this  

Solar System

This topic is 4805 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

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
Advertisement
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
Sign in to follow this  

  • Advertisement