Home Graphics home Photos home Other Home Graphics home Photos home Other Beginnings Scenes Projects Resources Home Graphics 
home Photos 
home Other Panoramics Of 
interest Navigation

Moons

This is not really a macro, but a simple recipe for creating moons and planets in a lit sky, be it daylight or dusk. The key issue is to have shadowed areas (which would otherwise be black) to have the same colour as the surrounding sky - look at the moon during daylight to see what I mean.

The basic idea is to put your light source and moon outside a partially transparent sky sphere, and then put everything else inside. The sky sphere must be an actual sphere, because the sky_sphere object does not have a real outside, and a black background must be used in order to match the moon's shadowed areas to the sky colour. The sky object may be plain coloured or use a gradient-based color map, but will end up slightly darker than normal because of the transparency. Also, don't forget to make the sphere hollow if you are also using fog or media.

These images, generated by this simple scene file, illustrate the principle.

The other thing that needs to be considered is radiosity. Radiosity may cause your moon's shadowed areas to be lit up sufficiently to spoil the effect. One way around this is to use interior_texture{} to define the sky colour (and transparency), and give the regular texture{} as an opaque black. This fix was suggested by Thomas de Groot.

A final thought: this technique should not be limited to moons and planets - in theory this will produce a realistic image of any large object as it would appear if it were partially or completely out of our atmosphere - megastructures, spacecraft, asteroids, whatever you want. Here's another example to show you what I mean.

Now, doesn't that look just like a giant jack hanging over the earth?

Knot