NOTE FROM KAZI: This tutorial originally appeared on Lode's Tutorials. It's a great site, so head over there for updates.
There is just so much to tell about lights and they have so many properties, and I've never seen a tutorial that handles all of it, so I made one.
This is not a beginners nor an intermediate or advanced tutorial. This is a tutorial for everyone, even the most advanced mapper will learn something.
This tutorial is optimized for UEd2, but if you have UEd1, you can use this tutorial as well, because these two versions don't differ that much. And I've added remarks for UEd1 when there is a difference. You can of course apply the official UT 420 or higher patch to get UEd2. I recommend patch 436 or higher, because this one adds even more new features such as realtime preview of skyzones, editing the textures of a mover and a replace textures function.
If you want to print this tutorial: it's 71 pages here, but the number of pages might differ for you if your printer cuts pictures in half or not. You can use "multiple pages per sheet" to reduce the wasted paper and ink.
Adding a Light
First you need a room to add the lights, so create one that's big enough (you're going to add a lot of lights during this tutorial, so you'll need a lot of space).
Once you have a room, right click somewhere in the 3D view, and in the menu that appears choose Add Light Here. Now you see somewhere near the place you clicked, a small torch picture appear. That's a light source!
Right click on a wall, ceiling or floor.
Choose Add Light Here.
And you get a lightsource.
Dynamic Light Modus
If you have the 3D view in Dynamic Lighting mode, you should also see that the walls around the light become brighter.
The 3D view has different modi, some of them are important when working with lights. To select one, use the buttons on top of the 3D view or search the menus of the 3Dview. The buttons that are green on the screens are the ones you must press to activate that mudus.
Textured: this will show all the walls of your map fullbright, and ignore all the lighting. This is not the way the walls will look in UT, in UT the lighting is always as in the Dynamic Light modus. There is an option NoLighting in UT, but that doesn't work when playing multiplayer, to prevent cheating. Only use this modus if you want to check the original texture of a wall that is too dark or colored by the lights.
Light modus: Textured
DynamicLight: this will show your map with all lightingeffects. If you rebuild lights and you haven't added any lights yet, you'll see only black. This modus shows the lighting like it will look in UT, so always use this one when working with the lighting of your map.
Light modus: DynamicLight
Realtime Preview: you can switch this on and of in all the views: click the button that looks like a little joystick on top of the view, or select a view and press p. Do not press the joystick on the main toolbar of the editor, that one starts UT to test the map. If a view is in realtimpreviewmode, it is always realtime updated, so if you change something in one view, you'll see that change also in the other view if it's in that modus. But this slows down the editor a bit. Another important thing about this modus, is that you can see animations like flickering lights (see further in this tutorial) or animated textures. If Realtime Preview is off, you are not able to see how flickering lights flicker.
The joystickbutton activated: Realtime Preview
For this tutorial, please set the 3D view in DynamicLight modus. Activate RealtimePreview when busy with LightEffects, LightTypes and other animations.
Moving a Light
When you placed the light, it probably isn't at the right place. To move it, first select it by clicking on it's torch symbol in any of the views. It should become green. Now select a 2D or a 3D view and use the following key combinations to move it:
- To move it left, right, forwards or backwards in the 3D view, hold down CTRL and left or right mousebutton, and drag the mouse
- To move it up and down in the 3D view, hold down CTRL and both mouse buttons together, and drag the mouse
- To move it in a 2D view, hold CTRL and drag it with left mousebutton. You will move the object north, east, south, west, up or down depending on what 2D view you use
- To zoom in or out a 2D view, hold down both mouse buttons and drag the mouse
If you use these mousebutton combinations without CTRL, you move around the camera, that is yourself.
Rebuild Geometry & Lighting
You cannot create a working map without rebuilding geometry, lights and eventually paths.
If you don't rebuild geometry you might get squished if you enter the map in UT. Every time you add a new polygon in the editor the geometry changes, so if you want to play or test your map after you made changes to this, rebuild geometry before saving. To rebuild geometry, you have to press this button in the upper toolbar of UEd2.
If you have a small map, this takes less than a second, but if you have a large map, rebuilding can take up to several minutes. After you rebuilt geometry, you see that all the walls become bright, as if there were no lights. This is because rebuilding geometry deletes all the info on lighting in your map. To get the light effects back, you have to rebuild lighting.
This calculates the light of each lightsource on each wall and object and casts shadows caused by walls or objects. To do this, press this button in the upper toolbar of UEd2.
There is also a Build Options button. If you press this one, a window appears. In there, press the build button, and everything that you selected (geometry, BSP, lighting & paths) will become rebuilt automatically.
And in version 436, an extra button is added to rebuild everything at the same time automatically.
Instead of using the buttons, you can also open the Build menu and select one of the choices.
If you are using UnrealEd1, go to Options and choose Rebuild. In the window that appears, press the Rebuild Geometry button to rebuild geometry, and then use the Lighting tab to rebuild lights.
To make a colored light, select a light (a torch symbol), right click on it and in the menu that appears choose Light Properties, in the Light Properties window, expand LightColor and in there choose a color by changing one of the values.
The LightColor tab.
The LightColor in UEd is based on the HSB model: you'll see three values: LightBrightness, LightHue and LightSaturation.
- Use LightBrightness to change to amound of light that the source will give: if you set it to it's max of 255, you'll have a very bright light, if you set it to zero, there won't be any light at all
- Use LightHue to change the color of the light. To see the effect, LightSaturation must be low enough, so set it to around 64. A lightHue of 0 is red, 40 is yellow, 80 is green, 160 is blue, 200 is violet and 255 is red again
- LightSaturation is used to change the intensity of the color. If it's at it's default value of 255, the light will be white and thus have no color. But if you lower it, it will have the color defined by LightHue. The lower, the more intense the color there also is an easier way to change the color of the light, but this is only available in UnrealEd2. If you click on the LightColor expansionfield, you'll see a button Color. Press it and you'll see the Windows Color Dialog Box. Just select your favourite color and press Ok.
Window's Color Dialog Box
Another way to create light in your maps is using zonelight. ZoneLight will enlight to a whole zone without having to add a lightsource. There are two kinds of zones: the ones without a ZoneInfo in it, and the ones with a ZoneInfo in it.
To add light to the ones without ZoneInfo, open the menu View and in there choose Level Properties. If you have UnrealEd1, it's in the menu Options, or you can press F6. You now see the Level Properties window. In there, expand ZoneLight
If you have zones in your map with ZoneInfos (such as a normal ZoneInfo, SkyZoneInfo or WaterZone), select the ZoneInfo, right click on it and choose ZoneInfo Properties and in there, expand ZoneLight.
If you don't know anything about Zones and ZoneInfo, you probably don't have any in your map. In that case, Level Properties will do. If you want to understand more about zones, water and skyboxes, read a tutorial about it.
The ZoneLight tab
To create the ZoneLight, enter a value in AmbientBrightness. The higher the value, the brighter the ZoneLight will be. It's default value of 0 means there is no ZoneLight. For example this is a map with all the lights removed, and AmbientBrightness set to 0, so it's completely black. On the second screenshot, AmbientBrightness in the properties of the ZoneInfo was set to 255, so the map is bright.
AmbientBrightness set to 0
AmbientBrightness set to 255
As you can see the it's very boring light, so never use ZoneLight without normal lights. In fact, never make the AmbientBrightness higher than around 32, it's much better to use nothing but normal lights, and use the ZoneLight only to reduce the shadows a bit.
To get colored ZoneLight, use AmbientHue and AmbientSaturation. The color of the ZoneLight is based on the same HSB model as the normal lights.
If you have a SkyBox, never forget to add light in the SkyZoneInfo (or with normal lights) or you'll have a black sky.
More ZoneLight Properties
There are some more settings in the ZoneLight properties of a ZoneInfo. They don't do anything about the lighting of a map, but some of them are useful.
TexUPanSPeed and TexVPanSpeed: This determinates the speed at which surfaces you have set to U-Pan or V-Pan will pan. For example if you have a skybox with panning clouds, enter a small value in TexUPanSpeed to make the clouds move slower, and enter a high value to make them move faster
EnvironmentMap: It's not known what this option does, it's probably old garbage from the pre-release version of the Unreal engine
FogColor and FogDistance: this might have been an attempt to create environment fog in the pre-release version of the Unreal engine. However it does not work.
Select a light (a torch symbol), and right click on it. In the menu that appears, choose Light Properties. In the Light Properties window, expand Lighting
The Lighting properties
You should see the value LightRadius there. That value determinates how far the light will shine. When adding a corona to a light, it will also determinate till which distance the corona is visible.
Click on the LightRadius field and enter a number. Make sure the RealTimePreview of the 3D view is on so you can immediatly see the effect of the value you entered.
If you set it to 0, there will be no light, and the higher you set the number, the further the light will shine. If you think the max value of 255 isn't far enough, there are several things you can do:
- Use ZoneLighting
- Use LightEffect LE_Cylinder or LE_NonIncidence (see further in this tutorial for LightEffects)
- Just use multiple lights
There is a useful option in the editor that you can use to see the radius of the light in the 2Dviews: rightclick on top of one of the 2D views, in the menu that appears choose Actors, and there check Radii View. As long as this option is enabled, you'll see a red circle appear around the light(s) you have selected. You only see it if you have selected the light: to select one leftclick on the torch symbol. These red circles are usually very large (the one on the screenshot below is for a Light Radius of 13). Because the lights shine the further the less bright, the red circle seems larger than the lightradius looks in real. Sometimes the circle is so large that it doesn't appear. That means that it is bigger than the 2D view. You have to zoom out to see it.
The red circle shows the radius of the light
The LightType determines if you light will be always on, always off or an animated combination of bright and dark by flickering, pulsing, blinking and so on. It can even loop through different colors if you use TexturePaletteLoop (this is explained in the section TexturePaletteLoop of this tutorial). Go to the Light Properties (right click on the light and select Light Properties in the menu that appears), expand Lighting and click on LightType. You should now see all the LightTypes.
The list of all LightTypes
I'll give a detailed description of each LightType, but first make sure the 3D View is on RealTimePreview
LT_None: If you select this, the source will not give any light. The light is Off.
LT_Steady: This is the default and makes the lightsource giving light.
LT_Pulse: Makes the light pulse. It will become brighter and darker then again brighter and so on. It will not just switch between On, Off, On, Off,... but fade from On to Off to On to Off....
LT_Blink: The light will randomly go On and Off. It will be most of the times On. For some reason, UEd2 seams to have a problem with this LightType. It might happen that when you select this, the light will be just steady. Play a little bit with the LightPeriod slider to solve this. This problem does not occur in UT.
LT_Flicker: the light will go randomly On and Off. In contradiction to LT_Blink, it will be most of the times Off. This is very handy to make a broken tubelight, certainly if you add a sound to it that flickers together with the light (see further in this tutorial.)
LT_Strobe: The light will switch between On, Off, On, Off,.... In contradiction to LT_Flicker and LT_Blink, this does not happen randomly. In contradiction to LT_Pulse, it will not fade from On to Off to On to Off....
LT_BackdropLight: Nothing special about this one. The light is just steady. This is probably an old remainder of the pre-release version of Unreal.
LT_SubtlePulse: Like LT_Pulse, but less heavy.
LT_TexturePaletteLoop and LT_TexturePaletteOnce: I'll handle these further in this tutorial.
LightEffects are animations of the light that not only change the brightness of it, but also the direction and the shape of the shine on the walls. But if you use too many LightEffects, this could really slow down the processor, so to keep a good performance in your maps, don't overdo this.
Go to the LightProperties and expand Lighting. There click on LightEffect. You get a list of all the LightEffects.
The list of all light effects
I'll give a detailed description of each LightEffect and give screenshots of each one, but first make sure the 3Dview is on RealTimePreview.
LE_None: This just a normal light. In contradiction to LT_None, LE_None does not mean that the light is Off.
LE_TorchWaver: Makes the light move like a torch.
LE_FireWaver: This does the same as LE_TorchWaver, but heavyer. The light will move like fire. Handy to use when you create a fire or a torch. (On the screenshot below, it isn't good to see, because in reality it moves)
LE_WateryShimmer: The lighting will move like water. Use it when you create a pool inside a building, to shine on the walls of the building. Or use it underwater in any pool.
LE_Searchlight: The lightbeam will rotate, like a searchlight. Think about Alcatraz. If LightPeriod is 0, the SearchLight will not rotate.
LE_SlowWave: Some kind of animated wave-effect.
LE_FastWave: Same as LE_SlowWave, but faster.
LE_CloudCast: Looks to be just steady. This is probably an old remainder of the pre-release version of Unreal.
LE_StaticSpot: The light will beam in one direction. Look further in this tutorial how to change the direction and the size of the beam.
LE_Shock: Another animation for the light.
LE_Disco: A nice disco-effect.
LE_Warp: Looks to be just steady. This is probably an old remainder of the pre-release version of Unreal.
LE_SpotLight: The same as LE_StaticSpot. Look further in this tutorial how to change the direction and the size of the beam.
LE_NonIncidence: like LE_None, but the light will have almost no fading-away at the edges. This makes it look like the radius is larger. Compare this screenshot to the one of LE_None. The LightRadius is the same for both lights.
LE_Shell: If you use this correct (close enough to wall), the light will look like a ring on the wall. In larger rooms, it might look like the blue screenshot.
LE_OmniBumpMap: Can be used to create blacklights (see further). This is not what the name suggests, so this is probably an old remainder of the pre-release version of Unreal.
LE_Interference: Another animation for the light.
LE_Cylinder: I use this if I need a really large LightRadius. The lightradius is calculated as a cylinder instead of a sphere with soft edges.
LE_Rotor: The light looks as on the screenshot, and rotates.
LE_Unused: Exactly the same as LE_None. This is probably an old remainder of the pre-release version of Unreal.
NOTE: Please continue to "All About Lights - Part Two" in the Miscellaneous section.
[ Click here for printable version ]