Lecture
Lighting is one of the most important elements of a game's visual component. It not only adds volume and atmosphere, but also influences the perception of gameplay.
Lighting in games directly affects our perception of what's happening on screen — and can even form the basis of gameplay. As in the real world, it's a complex concept that is hardly achievable with a single method.
Perhaps ray tracing has come closest to this — simple in concept, but demanding on the system's computational resources. And it only gained traction in the game industry relatively recently, with the start of the RTX era. Yet game development has been evolving for much longer — and by today, more than one method for simulating light propagation in a game scene has already been developed.
Real-time lighting:
Light is calculated directly during gameplay, in every frame.
Allows creating dynamic lighting: day/night cycles, moving light sources, flashes, etc.
Examples: the player's flashlight, muzzle flashes, the sun moving across the sky.
Uses resource-intensive technologies: shadow maps, physically based lighting (PBR), Ray Tracing.
Requires optimization: limiting the number of light sources, using LOD, etc.
Baked lighting:
Light is «baked» into textures or lightmap's during scene building.
Requires virtually no resources at runtime.
Ideal for static objects.
Does not support moving shadows and light sources.
Often used in interiors or fixed scenes.
Mixed lighting:
Combines elements of baked and real-time light.
For example, a static environment is lit with baked light, while moving objects receive real-time shadows.

For a better understanding of what lighting in games actually consists of, let's divide it into two stages:
The first — direct light. This is light coming directly from a source (an incandescent lamp, fire, the sun), which then passes through the scene and hits some surface — for example, terrain or any other in-game object.
The second — indirect light or global illumination, which, upon hitting a surface, reflects off it in various directions and thereby illuminates other surfaces around it. Depending on the reflectivity of the material, such re-reflections can occur multiple times until the light source's energy is exhausted.

Shadows:
Allow seeing the shape, depth, and position of objects.
Main types:
Hard shadows — hard, sharp-edged shadows.
Soft shadows — more realistic, with a gradient at the edges.
Technologies:
Shadow Maps — the most common method.
Ray-Traced Shadows — high quality, but demanding.
Reflections:
Help create a realistic environment.
Types:
Screen Space Reflections (SSR) — fast reflections from screen pixels.
Cube Maps — reflections using pre-made maps.
Ray Traced Reflections — the most accurate, require RTX-compatible GPUs.
Volumetric light:
Creates the effect of «light in the air», such as sun rays in fog.
SSAO (Screen Space Ambient Occlusion):
Adds shadow recesses between nearby objects.
Makes the scene deeper and more expressive.
Volumetric Lighting:
Used to simulate particles in the air, fog, smoke.
The "god rays" effect — one of the popular examples.
Ray Tracing:
A real-time ray tracing model.
Provides photorealism: reflections, refractions, shadows.
Supported in Unity HDRP and Unreal Engine (starting from UE4.22).
High performance requirements → requires DLSS/FSR and RTX.
Unity:
Supports three types of light sources: Realtime, Baked, Mixed.
Baked lighting is done through Lightmap's.
Realtime Light can use Shadowmask or Distance Shadowmask.
HDRP (High Definition Render Pipeline) — for photorealism and RT.
URP (Universal Render Pipeline) — for cross-platform compatibility.
Unreal Engine:
Works with three main light source types: Static, Stationary, and Movable.
Uses Lightmass for baking light.
A Stationary Light can be either baked or real-time.
Lumen (from UE5) — a new real-time global illumination and reflections system, with no baking required.
Ray Tracing support has been built in since UE4.22 and later.
Comparison:
| Feature | Unity HDRP | Unreal Engine 5 (Lumen) |
|---|---|---|
| Ray Tracing | Yes | Yes |
| Volumetric Light | Limited | Extensive support |
| Simple Baked Light | Yes | Yes |
| SSAO Support | Yes (PostFX) | Yes |
| Learning Curve | Lower | Higher |
Lighting is not only a visual tool but also a game design tool.
Light helps guide the player: highlighting exits, points of interest, and enemies.
Examples:
A dark corridor → light at the end draws attention.
A lamp post — a landmark in open terrain.
Light in windows — indicates where there is life or a mission.
Scenes with different lighting evoke different emotions:
Cold blue light → anxiety, loneliness.
Warm orange light → comfort, safety.
Sharp contrasts of light and shadow → tension.
Lighting is used in cutscenes to create mood.
The color, intensity, and directionality of light — tools of visual storytelling.
Subconsciously, light is perceived as a safe zone.
Players tend to move toward lit areas.
Used in horror games — the player is afraid to leave the light.
Lighting is not only a technical but also an artistic component.
A skillful combination of real-time and baked lighting improves performance without sacrificing quality.
Technologies such as SSAO, Ray Tracing, and Volumetrics make it possible to achieve a high level of realism.
It is important to consider lighting as a design element: it guides, dramatizes, and holds the player's attention.
Comments