Back ] Home ] Next ]


Simulating Moonlight in Terragen

While working on my star map I needed a Terragen world to insert the simulated night sky into. I've read a couple of tutorials on creating night time scenes, but while the results from these were good, the results seemed to be dependent on the subject matter which from a photographer's perspective was indication that something was missing.  This forced me to sit down and nut out a few aspects of Terragen on my own.  This is my approach...

Demo Image

Firstly let's consider the difference between daylight and moonlight.

  • Obviously the main difference is that the main light source during the day is the sun, while at night it's the moon. 
  • Moonlight is reflected sunlight, and since the moon is pretty much just grey, moonlight is effectively the same colour as sunlight...  it's just a lot dimmer. 
  • Ambient light is also a lot lower, but is the same colour as during the day.
  • The moon is the same size as the sun in the sky.
  • While the atmospheric conditions may change from day to night, there are still clear nights and hazy nights just as there are clear days and hazy days. The way the light affects the atmosphere doesn't change... there's just less light.
  • The human eye's sensitivity to light intensity is greater than it's sensitivity to colour. At low light levels colours appear desaturated.

To a photographer this is obvious...  you take a long time exposure by the light of the full moon and it will look pretty much the same as a photograph taken during the day.  The trick, then is translating these things into Terragen settings.

To create my moonlit atmosphere I started with the default Terragen lighting/atmosphere conditions.  From here I adjusted the lighting aspects first to match the points mentioned above. Below are the modifications I made. I have avoided using specific values as the process is designed to render any day time scene as a moonlit one.


Lighting Conditions

Direct Sunlight

  • Reduced Direct Sunlight Strength from 100% to 30%
  • Everything else relates to atmospheric effects, so these remain unchanged.

Background Light

  • Reduce RGB values for Shadow Colour or all ambient light colours by 50% for each channel.
  • Reduce Shadow Lightness by 50%

Sun's Appearance

  • The moon is much brighter than the surrounding sky, just like the sun so this can be left unchanged.

Lighting of Atmosphere

  • Remains unchanged

Atmosphere

Simple Haze

  • The appearance of haze should be dependent on the light striking it, which we've already adjusted so this should remain unchanged.

Atmospheric Blue

  • I'm still getting my head around exactly what this does, but I'm getting closer.
  • Half-height should remain the same
  • Reduce Density by 50%
  • Edit Colour to simulate the lower intensity of the light and the perceived decrease in saturation.  To do this I applied two colour changes (mainly because the first change was too dark).
    1. Leave the colour channel with the lowest value unchanged (for a blue sky, this should be red). Then reduce the value for the other two channels by half the difference between their current value and the value of the lowest channel.  e.g. R50, G60, B250 becomes R50, G55 (50 + (60-50)/2), B150 (50+ (250-50)/2)
    2. Leave the colour channel with the highest value unchanged (for a blue sky, this should be blue). Then increase the value for the other two channels by half the difference between their current value and the value of the highest channel.

The first time I did this the sky still didn't look right and I had to play around with the Half-height and Density to get the look I wanted.  I then went back to my daylight scene and applied the corresponding changes there (night Half-height = day Half-height, night Density = 0.5 x day Density) and found that it improved the sky for the day scene.

Light Decay / Red

  • Half-height should remain the same
  • Reduce Density by 50%
  • I left the colour the same, but if I were to change it I would use the same approach as for Atmospheric Blue

Cloudscape

  • The appearance of clouds will be adjusted by the light striking them. Leave unchanged.

Water

  • The appearance of water will be adjusted by the light striking it. Leave unchanged or tweak to taste.

Back ] Home ] Next ]


This page, its contents and style, are the responsibility of the author and do not represent the views, policies or opinions of The University of Melbourne. All photographs © Ben Kreunen 2000

Ben Kreunen <bernardk@unimelb.edu.au>
Department of Pathology
Last modified: 22-Feb-2004