CADTutor: The best free help for AutoCAD on the web

Exterior Lighting

by Ian Ibbotson

Introduction

The following routine sets up a standard Sunlight System (this uses a target direct light), including ambient light and standard shadow map settings. New users can use this routine as a 'good start' and it will help them understand what settings effect the lights and shadows. This basic setup and settings routine can be fine tuned depending on the effect required

NOTE: Refer to the MAX/VIZ Help for extensive notes on use of IES Sun, IES Sky or a Texture Sky

Download Sample Data

In order to follow this tutorial, you may want to use the supplied files. Please read the sample data instructions before downloading.

kf402_files.zip (385kb)

Top of page

Place a Sunlight System in the scene and configure

  • Open kf402_01.max
  • In the Top viewport zoom out so that the site is in the centre of the viewport and occupies about one quarter the space available
  • Create Panel > Systems press Sunlight - the cursor turns into a small cross
  • In the top viewport left click and drag at the centre of the site to create a Compass helper object just big enough so that it can be seen easily
  • Take the left finger off the left mouse button and drag the mouse down. This will extend a Sunlight object away from the site into the sky. Drag the Sunlight so that it just disappears from the viewport

NOTE: Notice that in the User viewport the scene is 'bleached'. This is an unfortunate effect of the Daylight System so the Scene's default lighting needs to be used to view the scene comfortably in the viewport. To see the effects of changes in sunlight parameters test render the scene at each stage

  • Viewport Configuration dialog > Uncheck Default Lighting if this is checked. This will display the basic effects of the sunlight in the viewport

To optimise the sunlight for rendering quickly change the parameters of the Sunlight in the Modify Panel thus:

  • General Parameters rollout > Shadows - Set this to Shadow Map

NOTE: The Ray Traced Shadows option calculates accurate and fine shadows. However, for infrastructure and landscape work where the scene 'load' can be great this type of shadow can have major effect on rendering times. This tutorial shows you how to configure Shadow Mapped Shadows to reproduce the effect of ray traced shadows. Efficiency in rendering time is therefore greatly increased

  • Directional Parameters rollout > Light Cone > make sure Show Cone is checked and Overshoot is unchecked
  • Move the Hot Spot spinner up until the Sunlight cone just surrounds the site to be illuminated. If this goes to far from the edges of the site the shadows will become less sharp. Adjust the Falloff similarly, but this time move it down to decrease the size of the Hot Spot. Try to keep the Falloff size as close to the Hotspot size as possible (there is always a small discrepancy)
  • Left click to finish the Sunlight creation
  • Throughout the next steps test render the scene at each stage

Top of page

Set location and time

  • Sunlight Parameters rollout > Setup
  • Control Parameters > Set the time to 11.00 am, the month to 8 and the day to 20
  • Press Get Location and in the Map dropdown list pick Europe. In the City list pick a City (Birmingham UK for example). The Sunlight will then be positioned in the sky as it would be in Birmingham on August 20th at 11.00am

Top of page

Logarithmic Exposure Control

  • Environment dialog > Exposure Control rollout > set this to None if Logrithmic Exposure Control is selected

NOTE: MAX and VIZ are different in the exposure control settings in that VIZ defaults to Logrithmic exposure control On but MAX defaults to None. Turn this off for now and use it later if required

Top of page

Sunlight settings

  • Shadow Parameters rollout > Click the colour swatch next to Color and change the colour to very dark grey instead of black
  • Change the Density to 0.8
  • Shadow Map Parameters rollout > Bias - Set to 0 - this changes how far the base of a shadow is from the object
  • Density - keep on 1
  • Size - Set to 3000 - this is the size of pixels of the shadow 'map' (or image) used for the shadows. On a large site the size should go up accordingly (not above about 5000) and a smaller site down to 512. Decreasing the Map Size and increasing the Sample Range and / or Fall Off (Directional parameters rollout) will make shadows less sharp:
  • Sample Range - Keep at 4. However, to make shadows sharper decrease the amout to 2 or 3. To make them less sharp increase to 5 or 6
  • 2-Sided Shadows - uncheck

Top of page

Provide ambient lighting

If just a Sunlight System is used (ie one light), then the sides of objects that are not in sunlight will appear very dark or black and shaded areas will appear too dark next to lighter areas. This is a totally unnatural situation. In the real world light is reflected from surface to surface giving shaded areas an element of light and more subtle shade. This type of lighting is called 'ambient' light. To recreate ambient light in a scene a Skylight light object can be used with the shadow settings turned off and further tweeks made through the Environment dialog settings

NOTE: In MAX rendering with light tracing is often used to give very good global illumination (not covered in Key Fundamentals)

  • Create Panel > Lights > Skylight > In the Top viewport left click at the centre of the scene to position a Skylight object
  • Change the Multiplier to 0.3 and Rays per Sample to 5 (this reduces rendering time)

  • Finally, visit the Environment dialog settings to further configure ambient light level and colour

Top of page

Environment Dialog settings

  • Render > Environment dialog > Background. Change the background colour to light blue by clicking the colour swatch
  • Global lighting > Set the Level spinner to 1.1. This further adds to the ambient lighting effect
  • Ambient Light > set the colour to mid grey

TIP: This tutorial does not explain the Exposure Control settings (there are enough to think about initially). However, if you do want to experiment choose Logarithmic Exposure Control in the dropdown list. Experiment with mainly Brightness, Contrast and Physical Scale, producing test renderings to evaluate results. To start with lower the brightness to about 10

NOTE: Key Fundamentals does not cover Atmospheric Effects such as Fog, Volume Fog and Volume Light. Reference MAX / VIZ Help for in-depth information on how to setup these effects

Top of page

Fine-tune shadow settings

On the Sunlight parameters:

  • Colour: darker > Density: 1 > Size 4000 > Sample Range: 2

  • Colour: lighter > Density: 0.8 > Size: 1000 > Sample Range: 6

Top of page

To animate the Sunlight through the day

  • In the Control Parameters set the time to 6.00am
  • Make sure the time slider is set to 0 then press the Auto Key button on the Animation Controls. Move the time slider to the end (this defaults to 100) then in the Motion Panel set the time to 8.00pm
  • Turn off the Auto Key button and move the time slider back to 0. Notice that the sunlight moves across the sky. The time and Sunlight position can now be quickly set at any time during the scene creation

NOTE: When a scene is first opened the time slider is set to 0. The scene will appear dark until the Sunlight is animated back to the required time of day using the time slider. In general, animate the Sunlight for quick shadow studies, then remove the animation by right clicking on any key (below the Time Slider) and selecting Delete Key > All

Top of page

Local Navigation

Sponsored Links

Accessibility statement

Valid XHTML 1.0!Valid CSS!Creative Commons Licence