Artistic Experiments
  • Home
  • Reel
  • Shaders
    • Stylized Shaders
    • Lighting Techniques
    • Shader Effects
    • Cubemaps
    • Pixel Lit Shaders (Basic)
    • Vertex Lit Shaders (Basic)
    • Unlit Shaders (Basic)
  • Tools
  • WIP
  • Contact

Basic Outdoor Lighting- UDK

9/25/2011

0 Comments

 
When i first started out in UDK, the lighting information that i found was conflicting and slightly confusing. So i wrote up a tutorial today to demonstrate the basics of setting up lighting in a unified way for UDK. This tutorial will cover the basics of incorporating Sun Direction, Ambient Light, Fog, and Lightshafts into a single scene, and a few important attributes of each.

Stay updated on the latest UDK release:
http://udn.epicgames.com/Three/DevelopmentKitBuildUpgradeNotes.html

Dominant and Ambient Lighting

Lets get started.

First, lets create a terrain for our player to walk on. Go to the top tool bar and click 'Tools', then select 'New Terrain'. You can simply press 'OK'  to use the defaults, or you can change the size of the map by changing the Patches X and Y values.

For a basic introduction to Terrain Editing, check out this video tutorial by Raven67854.


Next we need to create our 2 lights. Go to the top tool bar and click 'View', 'Browser Windows', 'Actor Classes'. Scroll down to the 'Light' tab and open it. We need 2 lights: 'DominantDirectionalLight' and 'SkyLight'. The 'DominantDirectionalLight' will provide us with the main sunlight, while the 'SkyLight' will provide us with ambient light.  

To place a light in the scene: Select the type of light you would like to place from the Light tab, and drag it out into your scene. You can access their attributes by pressing F4 with the light selected in your scene. The attributes you are looking to edit can be found under 'Light' , 'Light Component' , 'Light Component'.
Picture
The dominant directional light can be left with default settings, and can be rotated to effect overall sun direction.
Picture
The skylight should have its brightness reduced, and should not cast shadows. You can edit the Light Color and Mod Shadow Color to effect the color of ambient light.

Exponential Height Fog

Next we need to create some fog to add some basic depth to our scene. Go to back to the top tool bar and click 'View', 'Browser Windows', 'Actor Classes'. Scroll down to the Fog tab and select the 'ExponentialHeightFog'. 

Drag the ExponentialHeightFog into your scene like you did the lights. You can access their attributes by pressing F4 as well. The attributes you are looking to edit can be found under 'ExponentialHeightFog' , 'Component'.
Picture

Lightshafts

Lightshafts are a nice touch to add to your scene and should be enabled on the Dominant Directional Light only.

To enable Lightshafts, go back to the properties of the Dominant Directional Light. The attributes you are looking to edit can be found under 'Light' , 'Light Component' , 'Light Shafts'.
PictureCheck 'Render Ligh Shafts'. Decrease the 'Occlusion Depth Range' and the 'Radial Blur Percent' for tighter light shafts. Set the Bloom Scale and Bloom Tint to match your scene

Decrease the 'Occlusion Depth Range' to keep far away objects from darkening the ambient light in your scene. I generally decrease the 'Radial Blur Percent' to 75 or so to tighten up the Lightshafts. Generally the Bloom Tint should be set to match the Light Color, and then set slightly more saturated. Bloom Scale, Bloom Threshold, and Bloom Screen Blend Threshold should be adjusted according to your needs. 'Occlusion Mask Darkness' can also be increased to reduce the Lightshafts contribution to the scene, although i generally leave it alone.

Final Notes

It is important to set up a Lightmass Importance Volume in your scene. This allows Unreal to save time on lighting builds, as it focuses on the player path for nice lighting, instead of the whole scene. However it is a step easily forgotten (I forgot it when i first wrote this tutorial)

To set one up simply expand your Builder Brush to incorporate the full player path. Then right click the 'Add Volume' button and select 'Lightmass Importance Volume'.

This completes the basic lighting setup.
0 Comments



Leave a Reply.

    Tutorials

    Personal Tutorials, quick tips, and other helpful stuff

    Archives

    September 2011

    Categories

    All

    RSS Feed

Powered by Create your own unique website with customizable templates.