In this article by Satheesh PV, author of the book Unreal Engine 4 Game Development Essentials, we will learn that lighting is an important factor in your game, which can be easily overlooked, and wrong usage can severely impact on performance. But with proper settings, combined with post process, you can create very beautiful and realistic scenes.
We will see how to place lights and how to adjust some important values.
(For more resources related to this topic, see here.)
In Unreal Engine 4, lights can be placed in two different ways. Through the modes tab or by right-clicking in the level:
Once a light is added to the level, you can use transform tool (W to move, E to rotate) to change the position and rotation of your selected light.
Since Directional Light casts light from an infinite source, updating their location has no effect.
Unreal Engine 4 features four different types of light Actors. They are:
Now that we know how to place lights into a scene, let’s take a look at some of the common settings of a light. Select your light in a scene and in the Details panel you will see these settings:
Attenuation Radius from left to right: 100, 200, 500.
Source Radius 0. Notice the sharp edges of the shadow.
Source Radius 0. Notice the sharp edges of the shadow.
Light mobility is an important setting to keep in mind when placing lights in your level because this changes the way light works and impacts on performance. There are three settings that you can choose. They are as follows:
Only four or fewer stationary lights are allowed to overlap each other. If you have more than four stationary lights overlapping each other the light icon will change to red X, which indicates that the light is using dynamic shadows at a severe performance cost!
In the following screenshot, you can easily see the overlapping light.
Under View Mode, you can change to Stationary Light Overlap to see which light is causing an issue.
We will look into different light mobilities and learn more about Lightmass Global Illumination, which is the static Global Illumination solver created by Epic games. We will also learn how to prepare assets to be used with it.
Further resources on this subject:
I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…
Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…
Once we learn how to deploy an Ubuntu server, how to manage users, and how…
Key-takeaways: Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…
While developing a web application, or setting dynamic pages and meta tags we need to deal with…
Software architecture is one of the most discussed topics in the software industry today, and…