LightsprintSDK 2021.08.08
Bent normals

Bent normals

Bent normals on Wikipedia

Bent normals store negation of incoming light direction, in world space. Light may come to surface point form many directions in different intensities, so bent normals average all directions, taking light intensity into account.
Bent normals are normalized.

Data structures

Lightsprint can store object's bent normals in

Bent normals stored in pixel buffer are automatically transformed from -1..1 space to 0..1 space to support save to unsigned RGB textures. When reading bent normal from such texture, get original world space normal as bn*2-1.

Calculation

Calculation of bent normals is non-realtime process. To calculate bent normals, use RRSolver::updateLightmaps() and set bent normal layer accordingly.

Bent normals are intentionally stored in different layer than ilumination, so you can reuse single bent normal layer with multiple illumination layers to save memory or storage space (at cost of slightly reduced precision).

See data structures (links above) for more details on calculation.

Use in renderer

Bent normals are optional enhancement of precomputed illumination. They are used in rendering to make specular reflections and normal maps look more realistically, even with lighting precomputed in lightmaps.

See data structures (links above) for more details on rendering.