Editing Lightgrid
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | Lightgrid or volumeric lighting - a data structure used to store static lighting for models. Lightgrid are created during LIGHT phase each time map is compiled. | |
− | + | ||
− | + | ||
− | + | === How it works === | |
Each cell of lightgrid stores this information: | Each cell of lightgrid stores this information: | ||
− | * Ambient RGB | + | * Ambient light RGB |
− | * | + | * Diffuse light RGB |
− | * | + | * Light vector |
− | When rendered, entity sample it's position at lightgrid and | + | When rendered, entity sample it's position at lightgrid and find average ambient and diffuse lighting to be applied during shading. |
− | ==== | + | == Level Design Notes == |
− | + | ||
− | Default lightgrid cell size in game units is '64 64 128'. It can be customized with "gridsize" | + | Default lightgrid cell size in game units is '64 64 128'. It can be customized with "gridsize" worldspawn key. Most of Blood Omnicide maps using lightgrid size '32 32 32' or '32 32 64'. |
− | + | Often map bounds is much bigger than the space players and NPC can walk on. To not waste memory and reduce map compile time, level designer should place a brush covered by [[Common materials | common/lightgrid]] material. That brush will set the area where lightgrid will be calculated and applied. | |
− | + | Sometimes lightgrid is more bright or darker that the rest of environments, this makes entities to look out of the place. In order to make lightgrid match environments corrections should be made in a [[map build script]]. There is 2 coefficients to fix lightgrid: diffuse scale (scales intensity of diffise lightgrid component) and ambient scale (scales ambient RGB component). | |
− | + | == See also == | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | ==See also== | + | |
− | + | ||
* [[Lightmap]] | * [[Lightmap]] | ||
− | |||
[[Category:Glossary]] | [[Category:Glossary]] | ||
− | |||
− | |||
− | |||
− |