LightsprintSDK 2021.08.08
|
While building lightmaps, Lightsprint gathers information about light directions. This information is optionally returned in two formats.
Global illumination lightmaps are precomputed with infinite light bounces, color bleeding and physically correct penumbra shadows from area lights. For mostly static scenes, precomputed GI lightmaps make very good sense.
Global illumination usually contains sharp shadow edges, so it's not practical to store it per vertex in vertex buffer (result would be too blurry).
Ambient maps and per-vertex ambient contain indirect component of illumination with infinite light bounces, color bleeding and indirect shadows; it's complete global illumination except for first light bounce.
In scenarios with mixed static / dynamic objects, it's often advantageous to compute indirect illumination only and mix it with realtime rendered direct illumination with direct shadows.
Per-pixel or per-vertex?
Unlike global illumination, indirect illumination doesn't contain sharp shadow edges, so it's usually practical to store it per-vertex in vertex color buffer. Per-vertex ambient is slightly less precise in some situations, but it usually takes much less memory, so it's worth considering in memory restricted environments. In realtime scenarios, per-vertex ambient is preferred for higher speed over ambient maps.
Ability to generate ambient maps or per vertex ambient is fundamental for realtime global illumination. To render realtime global illumination, start with renderer with direct illumination and shadows and add ambient map or per vertex ambient computed by Lightsprint. Realtime per-vertex ambient is preferred for much higher speed.
Environment maps store light incoming from all directions to single point in space. They are usually used to approximate light incoming to dynamic object.
Environment maps may be processed so that single environment map lookup returns light incoming from single direction (specular environment map) or from whole hemisphere (diffuse environment map).
See Environment map for more details.
Outside most widely used global illumination lightmaps, per vertex ambient, ambient maps and environment maps, Lightsprint supports many other illumination types suitable for specific situations. Depending on parameters you pass to lighting calculation process, you can get direct only lighting, mix of independently enabled direct and indirect lighting from many light source types etc, with result stored in texture or vertex buffer, with optional directional component.
Lightsprint can store object's illumination in
Calculation of illumination is realtime or non-realtime process, depending on parameters set. Environment maps are always computed in realtime speeds.
See data structures (links above) for more details on calculation.
See data structures (links above) for more details on use in renderer.