Lightmap
(initial version) |
|||
Line 2: | Line 2: | ||
[[File:Lightmap deluxemap.jpg|thumb|512px|right|Lightmap of the Kain's mausoleum (deluxemap of the right)]] | [[File:Lightmap deluxemap.jpg|thumb|512px|right|Lightmap of the Kain's mausoleum (deluxemap of the right)]] | ||
+ | |||
+ | 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, [[realtime lighting | 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 for particular surface: | ||
+ | |||
+ | * Global luxel scale (set in [[map build script]]) | ||
+ | * Entity's "_ls" or "_lightmapscale" field | ||
+ | * Material's q3map_lightmapSampleSize (alters default luxel size for this material) | ||
+ | |||
+ | Lowering 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. |
Revision as of 14:03, 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 for particular surface:
- Global luxel scale (set in map build script)
- Entity's "_ls" or "_lightmapscale" field
- Material's q3map_lightmapSampleSize (alters default luxel size for this material)
Lowering 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.