- Qt 6.11
- Qt Quick 3D
- Qt Quick 3D Examples and Tutorials
- Qt Quick 3D - SSGI Lightmap Example
- Qt Quick 3D | Commercial or GPLv3

# Qt Quick 3D - SSGI Lightmap Example

An example showing scenes using SSGI and Lightmaps.

This example demonstrates two global illumination techniques available in Qt Quick 3D: Screen Space Global Illumination (SSGI) and baked lightmaps. It allows comparing the visual differences and performance characteristics of real-time and precomputed lighting.

The application includes three common test scenes used to evaluate rendering:

- Cornell Box - A classic lighting test setup highlighting diffuse color bleeding and indirect illumination.
- Bedroom - An indoor environment with soft, warm lighting and a mixture of materials and occluded spaces.
- Sponza Atrium - A large architectural test scene with drapery, arcades, and multiple layers of indirect lighting.

Each scene provides a number of predefined camera positions. A built-in Demo mode automatically cycles through these viewpoints to show how the lighting behaves from different angles.

The lighting mode can be changed at runtime to one of the following:

- SSGI - Enables real-time, screen-space global illumination. This is controlled through the ssgiEnabled property of ExtendedSceneEnvironment. SSGI offers dynamic indirect lighting suitable for interactive and animated content, at some performance cost and with approximations inherent to screen-space techniques.
- Baked Lightmaps - Uses precomputed direct, indirect, or both lighting stored in texture lightmaps. Lightmap baking is performed offline by the Qt Quick 3D Lightmap Baker. See Lightmap Baking for details. This provides high-quality, path-traced illumination with very low runtime cost, best suited for mostly static environments.
- Off - Disables both SSGI and baked lightmaps for comparison against direct lighting only.

Example project @ code.qt.io

See also ExtendedSceneEnvironment::ssgiEnabled and Lightmap Baking.