Howto:Multi-channel lightmap: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 3: Line 3:
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,...).  
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.
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, at 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.
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.
Line 9: Line 9:
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.  
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).
Lightmaps are supported in FG by {{Fgdata effect|model-combined-deferred.eff}} (for exterior views), {{Fgdata effect|model-interior.eff}} (cockpit interiors, ALS only) and {{Fgdata effect|glass.eff}} (for reflections of a lit cockpit in the glass, ALS only).




Navigation menu