Help:Basic lighting

From Killing Floor Wiki
(Redirected from Mapping:Basic lighting)
Jump to: navigation, search

Lighting, one of the most important aspects of a map, and one of the most forgotten aspects of a map. Lighting can make or break a map's mood depending on how you use it and even people who are quite experienced in creating maps sometimes drop the ball on this topic. What a lot of people also lose track of are creating believable light sources, creating beautiful lights is one thing, making them believable is another (and quite easy as well). One light, one light source. The only exception to this rule is if you are creating an ambient light, but more on this later.

Making beautiful atmosphere isn't the only thing lighting can do, it can also make your job as a mapper easier by highlighting interesting parts of your map while drawing away attention to some lesser interesting parts. Lighting your map should never compromise fully from synthetic light or solely from natural light (sun), mixtures of the two are far more interesting than either one of them ever will be alone.

This page will give you a basic knowledge about how to make lights and what you can do with them. In order to completely follow this tutorial you will need to know the basics of creating rooms and a slight knowledge on how to add static meshes.

Contents

[edit] Adding lights

So we will start with adding lights to our room, so create a room, texture it and then add a light. You can add a light by right clicking on the ceiling/wall/floor and pressing "Add light here". I added 2 lights and my scene currently looks like this:
BLT Lighting1.jpg
Okay, we've got a decent scene going here, nothing interesting going on though. The white light isn't helping much, white light is dull, uninteresting and something that does not naturally occur. The very first thing you need to do when adding lights is getting rid of the white, so lets do that. Select your lights and press "F4". Now the "Light Properties" screen should be viewable. You'll want to open the "LightColor" and "Lighting" tabs like so:
BLT Lighting2.jpg
Currently the one we are most interested in is the LightColor tab, click somewhere in it and 2 buttons should appear, one being the "Pick" button and the other being the "Color" button, go ahead and press the color button.
BLT Lighting3.jpg
Select the color you want, in my case I'll go for a dark orange.

In 9 out of 10 cases the brightness of the light you'll get is less than satisfactory. it will randomly assign a brightness to a light using a strange heathen algorithm that should be burned. We'll adjust it ourselfs to a satisfactory level. Adjust your light to a level that it actually lights up the place without creating a huge light blob.

This is the wrong version (around 200 brightness):
BLT Lighting4.jpg

Here is the corrected version (around 80 brightness):
BLT Lighting5.jpg


Below the brightness we have 2 other settings; LightHue and LightSaturation.
LightHue is the one that determines which color your light gets. it goes from 0 to 255 and follows the colors of the rainbow namely Red, Orange, Yellow, Green, Blue, Indigo, Violet and finally Red again. (Like the color slider in photoshop).
LightSaturation determines how (de)saturated your light will be, the closer to 0 the more color your light will have, the closer to 255 the more white your light will be.

Now we will have a look at the Lighting tab you opened earlier, lots of settings in here you'll never touch. The ones you'll most frequently use are Coronas and LightRadius. I'll address coronas a bit later, for now I'll just explain what the radius does, the LightRadius determines how far a light can travel, typically your lights won't need anything larger than 64, in most cases 32 will do just fine. Word of advice, keep this number as low as you can get it as it can stop your compile progress to a screeching halt.
At the bottom of the Lighting tab there is LightType, these can give your light some extra flair, but i hardly ever use them. if you want to see the full effect of the new light type applied, you'll need to apply dynamic preview, you can turn that on by pressing "P" or clicking on the icon next to Dynamic Lighting in the 3d viewport bar.

[edit] Light maps

By now you've seen some pretty murky shadows, if you want to get a crispier look you can do this by increasing the lightmap resolution for certain surfaces. To do this select the surfaces you want a better lightmap resolution on and press "f5" or right click the selected surface and click "surface properties". Now go to the Pan/Rot/Scale tab and go to the Light Map setting.
BLT Lighting6.jpg

Press the dropdown menu and select anything you wish, just remember the lower the number the more detail your shadows get. For dramatic effects i will put mine on "1". Here are the results after a lighting compile:
BLT Lighting7.jpg

As you can see the shadow got sharper and more detailed, but it isn't actually looking better. In fact you should never use a light map of 1. the perfect middle ground between looking good and not be a drag on compile times is between 8-16. 32 will create "dirty" spots in darker lighting, so except if you want to brighten your map up, it's better to use a lower lightmap scale.

The dangers of a low lightmap scale number:


[edit] Ambient lights

[edit] What are ambient lights

Ambient lights are lights with a low brightness, a color that reflects the main light color and the color from the walls/floors/ceiling of the scene. As in Unreal Engine 2.5 there is no light bouncing, we need to fake it. This is where we create our ambient lights (they are actually normal lights, but their use is different).
In my example map i have a hallway, which should be lit up more due to light bouncing in real life. But as light doesn't bounces in UE2.5, we will fake it, so place a light, give it a darker color and make it more saturated than your original light. Here's the example of the dark hallway (left) and the hallway with faked bouncing using one "ambient" light (right):
BLT Lighting8.jpgBLT Lighting9.jpg

[edit] When to use them

Always, you should almost never create a pitch black spot in your map, even though you might think it's cool and horror like, it's just plain annoying and illogical in 99% of the cases. In a nutshell; create dark spots sparingly!

[edit] Light sources

[edit] Intro

Well nice, you now made a light, and another light faking bouncing, but now we still don't have a source for the main light. So delve into the Static Mesh browser till you find something suitable. To open the static mesh browser, select the icon next to the big "A" icon.
BLT Lighting10.jpg

Now the Static Mesh browser should pop up. To open a static mesh package go to file -> open. I have opened the KillingFloorStatics package and chose the CeilingRLight model.
BLT Lighting11.jpg

Now right click on the ceiling and press "Add Static Mesh:...". You should see an enormous light fixture appear. Lets adjust it's scale to fit accordingly. Select the light fixture and press "f4" and navigate your way to the "Display" tab, open it and look for the "DrawScale" line.
BLT Lighting12.jpg

I adjusted mine to "0.4" and positioned it right above my light origin.
sidenote: If you want your light fixture to not cast a shadow or block light traces you can turn that off by going in the "Display" tab and setting "bShadowcast" to false and going in the "Collision" tab and setting "bBlockZeroExtentTraces" to false.

[edit] Coronas

[edit] Info

Coronas are something you hardly ever see in real life, actually you can't see them with the naked eye as it is the light breaking on a camera lens surface. In UE2.5 coronas also mean lightglow, something you can see with the naked eye in real life, the next and final chapter of this tutorial will explain on how to add a corona to your scene.

[edit] Adding a corona

To add a corona to your light select the light you wish to add a corona to and press "F4". You are now in the light properties window. Now navigate your way tot the "Lighting" tab, open it and set "bCorona" to true. Now go to the "Display" tab and add a skin (if you click it, 2 buttons should appear, press the "Add" button).
BLT Lighting13.jpg

Now a new line should appear under the Skin tab. if you have that, leave that window open (drag it to the side) and open the Texture browser. Open the "KillingFloorLabTextures" package and filter for "corona", you should see several corona textures at this point.
BLT Lighting14.jpg

Select the second one (highlight it) and then go back to the "lighting properties" window. Finally go back to the "Skins" tab in "Display" and press "Use".
The final effect should be similar to this:
BLT Lighting15.jpg

[edit] Adjusting the corona size

To adjust the corona size navigate to the "Corona" tab in the Light properties window. The only 2 values you should be concerned with are the "MinCoronaSize" and "MaxCoronaSize".
the MinCoronaSize determines how big the corona is when you are standing close to it, while the "MaxCoronaSize" determines its size when standing afar looking at it.
BLT Lighting16.jpg



That concludes the basic lighting tutorial. You should now be set to create some interesting light scenes. Have fun!

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox