Part 8 — Building in the engine
Bringing art into the engine: real-time lighting and shadows, global illumination, exposure and post-processing, sky and fog, terrain, foliage and procedural placement.
Lighting and rendering
- Real-time lightingTopicHow game engines light a scene every frame, the four light types, physical light units and falloff, how many lights you can afford in Unreal, Unity and Godot, and when to bend physics for gameplay.
- Physical light unitsKey termMeasuring light in lux, lumens, candela and nits instead of arbitrary engine numbers, so that sun, lamps and exposure behave like the real world and values carry over between scenes.
- Light probes and reflection probesKey termPoints or volumes that capture light in empty space, so moving objects pick up baked bounce light and shiny surfaces get believable reflections without full ray tracing.
- Baked vs. dynamic lightingTopicThe central lighting decision in any project; what baking stores, what mixed and stationary lights do, what fully dynamic systems such as Lumen cost, worked lightmap numbers, and how Call of Duty, Fortnite and Metro Exodus chose differently.
- Global illuminationKey termLight that bounces between surfaces before reaching the eye; why it matters for believable scenes, and the baked and real-time techniques Unreal, Unity and Godot use for it.
- Ray tracingKey termFollowing rays of light through a scene to find shadows, reflections and bounce light; in games usually a hybrid with rasterisation, in hardware or software form.
- Mesh distance fieldsKey termA volume texture that stores, for each cell, the distance to the nearest surface of a mesh; Unreal uses them for soft shadows, ambient occlusion and Lumen's software ray tracing.
- Light leakingKey termLight, usually bounce or sky light, appearing where it should be blocked, such as through thin walls or into sealed rooms; caused by GI methods that sample the scene more coarsely than the geometry.
- Shadows and virtual shadow mapsKey termHow real-time shadows are stored in shadow maps, why cascades exist, how Unreal's virtual shadow maps give 16k-resolution shadows by paging, and what that means for Nanite, foliage and World Position Offset.
- Cascaded shadow mapsKey termSplitting the camera's view into distance bands, each with its own shadow map, so the sun's shadows stay sharp near the player without running out of resolution in the distance.
- Shadow bias and shadow acneKey termShadow maps store depth at limited resolution, so lit surfaces can shadow themselves in stripes (acne). Bias pushes shadows away to fix it, but too much detaches them from their casters (peter-panning).
- Exposure and post-processingTopicHow engines turn a high-dynamic-range render into the final image; exposure and EV100, auto exposure, tonemappers (Filmic, ACES, AgX), colour grading with LUTs, bloom and depth of field, and the debate about film grain and chromatic aberration.
- TonemappingKey termThe curve that squeezes a rendered scene's huge range of brightness into what a screen can show, and decides how highlights roll off and how bright colours change hue.
- Colour grading and LUTsKey termShifting the colours of the final image for mood and consistency, either with parametric controls or with a look-up table (LUT), a small 3D texture that maps every input colour to an output colour.
- Fog and atmosphereTopicHow depth fog, height fog, volumetric fog and physically based sky systems work in Unreal and Godot, how to use them for depth, mood and readability, what they cost, and how Silent Hill turned a hardware limit into atmosphere.
- Sky, clouds and volumetricsKey termPhysically based skies and ray-marched volumetric clouds that light correctly at every time of day, as pioneered in games by Guerrilla's Nubis system for Horizon Zero Dawn.
- Time of dayKey termA sun, sky and lighting setup that changes over the game's day, either by blending baked keyframes or by computing all light dynamically, with knock-on costs for shadows, GI, exposure and art direction.
Worlds
- Terrain and landscapesTopicHow heightmap terrain works in Unreal, Unity and Godot; landscape sizes and components, heightmap bit depth, terrain texturing with layers and virtual textures, generating terrain in World Machine and similar tools, and how Far Cry handled terrain at open-world scale.
- Terrain layers and splat mapsKey termHow terrain materials such as grass, rock and mud are painted onto a landscape, with weight maps (splat maps) that store how much of each layer covers every point, or index maps that store which layers do.
- Heightfield erosionKey termSimulating water and weathering on a terrain heightmap to carve valleys, gullies and sediment fans, and exporting masks of where material was removed and deposited for texturing and scattering.
- Foliage and vegetationTopicHow games build and draw trees, bushes and grass; alpha cards versus modelled leaves, instancing, culling and billboards in Unreal, Unity and Godot, the costs of wind animation, and what Fortnite, Ghost of Tsushima and Horizon Zero Dawn did.
- Wind and world position offsetKey termAnimating foliage, cloth and props by moving vertices in the material (World Position Offset, or vertex animation), driven by masks, pivots and a wind signal; cheap per object but with costs for shadows, culling and GI.
- Procedural placement and scatteringTopicPlacing trees, rocks and props by rules instead of by hand; how scatter graphs work, random versus Poisson disk distributions, ecosystem simulation, Unreal PCG, Houdini, Blender and Godot, and how Horizon Zero Dawn and Far Cry 5 used it.
- Poisson disk samplingKey termScattering points at random but never closer than a minimum distance, which avoids the clumps and gaps of pure randomness and looks like natural spacing; Bridson's algorithm does it in linear time.
- Virtual texturingKey termSplitting huge textures into small tiles and keeping only the visible ones in memory; streaming and runtime virtual textures in Unreal and Unity, what they cost, and how id Software and Far Cry used them for terrain.
- Virtualised geometry (Nanite)TopicHow Unreal's Nanite streams and draws only the triangle detail the screen can show, what it supports in current versions, what it costs, and when not to use it.
- Gaussian splattingTopicWhat 3D Gaussian splatting is, how captured photos become millions of soft ellipsoids, real performance and memory numbers in Unity, the state of Unreal plug-ins and the glTF standard, licensing traps, and where splats do and do not fit in game production.