Moon and Sky

I’ve updated my sky rendering algorithm to better integrate it with the rest of my program. Now objects placed in the scene can be properly illuminated by outdoor lighting with visibility being reduced the further away from the camera they are placed. This effect can be exploited to create images  of celestial bodies. To create the images of the moon I’ve posted below all I had to do was apply a moon diffuse texture to a sphere and place the sphere far away from the camera outside of the earth’s atmosphere. Depending on the time of day and the orientation of the sun, the colors of the sky and the way the moon is illuminated change dramatically.

Additionally the atmosphere can now be rendered from outer space. The third image you see here is a rendering of the earth with the camera placed above its atmosphere. The earth is simply represented as a sphere with an earth diffuse texture surrounded by an atmospheric volume. The atmosphere is clearly visible as a blue ring surrounding the earth.

Crescent fullmoon

EarthFromSpace