Unreal Engine
Lighting
Technical Overview
Hristo Enchev 171005
What will this lecture cover
1.
2.
3.
4.
5.
2
Legend
1.
2.
3.
3
Lighting Types
and
Actors
4
Lighting modes docs
•
5
Lighting Actors docs
•
6
Directional Light docs
• Ctrl+L
• GI
Light vector
7
Point Light docs
• 6 times expensive
• Holding L and clicking anywhere in the editor
viewport will spawn a point light in that world
location.
8
Spot Light docs
• 6 times cheaper
•
• Inner Cone Angle
Outer Cone Angle
9
Rect Lights docs
• Inner Cone Angle
Outer Cone Angle
•
Stationary
Use Area
Shadows for Stationary Light
10
More Rect Lights docs
•
width and height of
the light
•
only used
Point Light
11
Sky Lights docs
• cubemap
capture the scene
• automatically
on load
• emissive contribution
12
Sky Lights - Distance Field Ambient Occlusion docs
• Distance Field Ambient Occlusion
Mesh Distance Fields
•
except ones close to the camera
•
Show > Visualize > Mesh Distance Fields
• Bent Normals
13
Material Light Functions docs
• Stationary Movable lights
•
filter a light's intensity
• cannot change the color
14
IES profiles docs
•
lighting industry standard method
real world
15
Geographically Accurate Sun 4.24+ docs
•
based on a geographic location
date in time
•
best to remove
• Extend default
luminance range in Auto Exposure
settings
16
HDRI Backdrop lighting actor docs
•
-
-
-
-
17
Lighting Performance
• number of meshes
triangle count of those meshes. large radius
small radius
• quickly eat up performance
• caching
18
Shadows
19
Shadows and their relation to mobility docs
• Static Shadows -
_BuildData
• Stationary Light Shadows
• Directional Light Cascading Shadow Maps
Dynamic
Shadow Distance StationaryLight
• Dynamic Shadows
20
Shadows and their relation to mobility docs
• two dynamic shadows
more efficient
• object’s bounds
physics asset
bounding box
• Force No Precomputed Lighting
_BuildData
• Preview
Engine/EditorMaterials/PreviewShadowIndicator
21
Cascaded Shadow Maps docs
•
Static Shadows
•
static baked
shadows
Cascading shadow maps
22
Distance Field Shadows docs
•
movable lights
more
performant
• Source Radius
Light Source angle
23
Distance Field Shadows docs
•
in the distance
Distance Field
Shadow Distance
24
Capsule Shadows docs
• Characters
• Physics Asset
•
soft area shadowing
indirectly lit areas
• dynamic precomputed
25
Contact Shadows docs
•
Contact Shadow's length
maximum value of 1
entire screen.
•
parallax occlusion mapping
26
Lightmass
and
Global Illumination
27
Lightmass - what makes GI possible docs
•
World Settings
• Primitive level
Material
DiffuseBoost
• Use Emissive for Static Lighting
Emissive Lighting
• Intensity
controlled via a Post Process
volume
28
Lightmass - what makes GI possible docs
• Lightmass has dynamic effect
uniform 3d grid
on top of upward
facing surfaces
• generate Ambient Occlusion
• Translucent shadows
• UV unwrapped
29
Lightmass Portals docs
critical to lighting
•
more light rays
higher quality
•
Skylight, HDR image Use
Emissive for Static Lighting
• drastically
increase
30
Volumetric Lightmass docs
• Volumetric Fog dynamic objects
baked indirect lighting
• Show > Visualize > Volumetric Lightmap
• World Settings
Lightmass Settings
31
Lighting Scenarios docs
• save baked lighting
32
Reflection probes docs
• indirect specular.
• update in real time
static
• Each pixel blends between multiple cubemaps to get the final result. Smaller Reflection Capture Actors override larger
ones, so you can refine reflection parallax accuracy in areas as needed. For example, you might place a capture at the center
of a room and then refine the reflection by placing smaller captures at the corners of the room.
33
Screen Space Global Illumination (SSGI) 4.24+ docs
• r.SSGI.Enable 1 Project Settings > Engine >
Rendering Lighting
• emissive colours
• r.SSGI.Quality
34
Lightmass Replace Node docs
• LightmassReplace
35
Post Processing
36
Ambient Cubemaps docs
•
• Texture
Intensity Tint
37
Global Illumination Intensity
• Indirect Lighting Intensity)
• SSGI
38
Exposure docs
• Auto Exposure
•
manually control
Exposure
compensation
View Mode>Game
Settings
39
Fog and Volumetrics
40
Atmospheric Fog docs
● Atmospheric Fog gives an approximation of light
scattering through a planetary atmosphere.
● This requires the Directional Light to have its
Atmospheric Light property turned on
● It can affect the Directional light tint based zenith angle
● You can control atmospheric density
● The Fog color is accessible in any material
● Works with or without Skydomes
41
Sky Atmosphere 4.24+ Docs blog post
● This is a physically-based sky and atmosphere
rendering technique. You can simulate transitions
from ground to sky to outer space with proper
planetary curvature
● Mie scattering is a height fog simulation, so it
can be used instead of an Exponential Height Fog,
but if you want to use both, you can via the
Support Atmosphere Affecting Height Fog
project setting
● A skydome can be used alongside - The material
has to be Is Sky, Opaque and Unlit
● There are a lot of exposed parameters
accessible in materials
● The docs on this are extensive, and
vital to understand its properties
42
Exponential Height Fog docs
● The position of the Exponential Height Fog Actor
matters as it will determine the base fog height, and Fog
Height Falloff can further adjust that
● As the name hints, the fog’s density is based on
height, creating more dense fog at low regions and less
in high places
● Secondary Fog Layer (4.24+) - This adds another layer
of fog with its own height and density modifiers, allowing
you to have a more distinctive fog at a certain height
level
● Using Start Distance to keep some defined area in
front of the viewer without fog is a big performance
improvement as it works by culling fog pixels
43
Volumetric Fog docs
● Part of the Exponential Height Fog
● Controls for it are both in the fog actor
and on each light that you want to
contribute to the fog
● As the name hints, the fog’s density is
based on height, creating more dense
fog at low regions and less in high places
● Use the r.VolumetricFog.GridSizeZ
console command to control the quality
of the volumetric grid
● Thanks to the Volumetric Lightmaps, static lighting is supported, use Stationary Lighting for best results
● Static and Emissive lights affect fog without costing anything since they're all merged into the Volumetric
Lightmap
● Volume Materials influence the fog, they currently only work on particle systems with said material
● Here is a great GDC video coverage of the Volumetric Fog’s features
44
Wrapping Up
45
Lighting Workflow proposal
• Direct and Indirect first approach
a.
b.
c.
46
Further reading and resources
•
strictly technical
• Learn tab Epic Launcher
• links docs
• specific look/feels
-
-
-
-
-
47
The End
Feel free to reach out if
you have any questions
This presentation was created for Breda University of Applied Sciences
Hristo Enchev 171005