Lightmap
(→Lightmap resolution) |
|||
Line 12: | Line 12: | ||
* Global luxel scale (set in [[map build script]]) | * Global luxel scale (set in [[map build script]]) | ||
− | * Entity's "_ls" or "_lightmapscale" field | + | * Entity's "_ls" or "_lightmapscale" field (works on [[func_group]] too) |
* Material's q3map_lightmapSampleSize (alters default luxel size for this material) | * Material's q3map_lightmapSampleSize (alters default luxel size for this material) | ||
Revision as of 15:09, 26 July 2012
Lightmap is generated texture that contains brightness of a surface. It is applied additively to the surface texture to simulate lighting. The color values of surface's texture get multiplied by lightmap color.
Lightmaps are created each time map is compiled (by a LIGHT phase of the map compiler). In Bloods Omnicide, lightmaps can only store static lightning, no flickering or moving lights (for this ones, dynamic lightsources should be used).
Lightmap resolution
Lightmap resolution is different from the texture resolution. Default luxel (lightmap pixel) size is 8 game units. Higher lightmap resolution = lower luxel scale = more memory overhead. There is a bunch of ways to control lightmap resolution:
- Global luxel scale (set in map build script)
- Entity's "_ls" or "_lightmapscale" field (works on func_group too)
- Material's q3map_lightmapSampleSize (alters default luxel size for this material)
Lowering luxel scale will make lightmap shadows sharper, but leads to larger map filesize, slightly slower rendering and exponentially slower compiles (that at very low scales start to eat up shocking amounts of system memory).
Deluxemapping
In Blood Omnicide, lightmaps comes with model-space deluxemaps, which store light directions. This allows for per-pixel lightning effects (such as bumps and gloss) to be rendered for static lighting.