Documentation/Entity Types/Base/StaticLightingManager.type
From NeoAxis Engine Wiki
| Language: | Status: | Approved |
Contents |
Description
StaticLightingManager is used for creating static precalculated lighting on the map (lightmaps). The manager has a static lighting map calculator for static objects and supports dynamic lighting with the help of Irradiance Volume technology.
Preparing Models
First, you have to prepare the model to calculate and apply lightmaps for. Meshes must have a specially prepared channel of texture coordinates with UV Unwrap. Such unwrap channel can be prepared in 3d modeling packages. As a result, by model export an additional texture channel should be created:
Note that not all triangles in the texture intersect with each other! This is one of the main requirements for UV Unwrap unwrap.
Now, you have to mark this channel of texture coordinates as UV Unwrap channel.
To do this, proceed to mesh edit mode in Resource Editor and click the Channels button. A list of channels will appear for this mesh.
In order to enable calculation, select a channel and click the Mark/Unmark Channel button.
Setting up the Manager
In order to configure the manager, you have to add it to the map and set up its properties.
Now, you need to calculate static lighting. To do this, press the Calculate button.
Once the Static Lighting Calculation window has appeared, click on the Start button. A light map creation process will start. Once it is finished, you will see the texture applied to the map.
After static lighting calculation is complete a output window will appear. You can also access this window by clicking on the Information button in the Properties window.
Press the Clear button in order to remove all calculated data.
Parameters
| Name | Description |
|---|---|
| CalculateShadows | Enables\disables rendering of shadows. |
| Enable | Completely enables or disables the static lighting manager. |
| IrradianceVolume | Enables\disables creation of Irradiance Volume. |
| IrradianceVolumeCellSize | Specifies the size of a cell for Irradiance Volume grid. |
| IrradianceVolumeLightsPerlCell | Maximum number of light sources for a single cell of Irradiance Volume. |
| Lightmaps | Enables/disables creation of lightmaps. |
| LightmapsFormat | Specifies format for saved lightmaps. |
| PackedLightmapsSize | Specifies size of lightmap textures. |
| PixelsPerUnit | Specifies the number of pixels per unit. The larger is this value, the higher is map quality. Please note that they will also require more memory respectively. |


