Howto:Multi-channel lightmap: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1: Line 1:
There are two basic possibilities to bring light to a scene in real-time 3d rendering. One is to specify the geometry (i.e. the location and characteristics of a light source) and compute which surfaces are illuminated by it runtime, the other is to compute the illumination offline and supply it via a texture to the renderer. The latter is called a lightmap.
The advantage of the first family of techniques (to which the deferred approach of [[Project Rembrandt]] belongs) is that it can treat movement of the lights relative to the scene - but because light needs to be computed every frame, the computation is very simple (secondary lights do not cast shadows, lit surfaces do not re-emit diffuse light into the scene,...).
Lightmaps on the other hand only work for a static scene, but since they can be computed offline with the help of raytracing software (which can run for hours if needed), secondary shadows and multiple reflections of light on bright surfaces are not an issue. In addition, runtime a lightmap corresponds to just a texture lookup, i.e. is very performance-friendly.
For many situations where a light on an airplane illuminates that airplane (both in interior and in exterior view), lightmaps thus are a useful technique.
FG supports both single channel maps (the rgb value of the lightmap encodes the full color of the light at that pixel) and multi-channel lightmaps. In these, each r,g,b and a of the lightmap texture specify intensity of the light, the color (which can then not vary across the lightspot) has to be supplied per channel as a parameter.
Lightmaps are supported in FG by model-combined-deferred.eff (for exterior views), model-interior.eff (cockpit interiors, ALS only) and glass.eff (for reflections of a lit cockpit in the glass, ALS only).
== Creating a lightmap or multi-channel lightmap using Blender ==
== Creating a lightmap or multi-channel lightmap using Blender ==


1,360

edits