Having defined why lighting is so important, let's start creating each of the types and talking about what they do. In this recipe, we will see each of the different kinds of lights available in the engine. We will also discuss how they are different and when and why to use each one.
Before we start working within the Unreal Editor, we will need to have a project to work with:
Cookbook_Chapter6
). Once you have finished, click on Create Project.To get started, let's see how we can go about adding lights to our level:
Point Lights act in a similar manner to a light bulb; they will emit light in all the directions from their center for a certain radius, losing power as the light gets further away.
For more information on Point Lights, refer to https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/LightTypes/Point/index.html.
The object will appear facedown with lights going out in the direction that it is shining. This actually goes much further out, so let's check this out.
-90
degrees along the Y axis to face the dark wall.Spot lights act much like they do in the real world; specifically, they will emit light from a point out in a cone shape. However, just like real spotlights, there is a center section that is fully bright with the outer edge decreasing in power. We can do this in Unreal as well using the Inner Cone Angle and Outer Cone Angle properties.
25
and the Outer Cone Angle value to 32
. After that, increase the Intensity to 50000.0
.However, spotlights can also lose power as they move away, as shown in the following example:
For more information about Spot Lights, refer to https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/LightTypes/Spot/index.html.
Directional lights act much like the sun. Depending on their properties, they affect the entire outer section of the level. You'll notice the arrows pointing in a certain direction which is where the light will be emitting from.
40
degrees in the Y direction.For more information on Directional Lights, refer to https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/LightTypes/Directional/index.html.
For more information on Sky Lights, refer to https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/LightTypes/SkyLight/index.html.
18.118.135.138