Documentation/Entity Types/Base/StaticLightingManager.type

From NeoAxis 3D Engine Wiki

Jump to: navigation, search
Go to higher level



StaticLightingManager is a static lighting manager. It is used for creating static precalculated lighting on the map (lightmaps). The manager includes a static lighting map calculator for static objects and supports dynamic lighting thanks to the Irradiance Volume technology.

StaticLightingManager 01.jpg

Preparing Models

First, you have to prepare a model to calculate and apply lightmaps for. Meshes must have a specially prepared channel of texture coordinates with UV Unwrap. Such an unwrap channel can be prepared in various 3D modeling packages. As a result of exporting the model, an additional texture channel should be created.

StaticLightingManager 02.jpg

Note that all triangles in the texture do not 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 an UV Unwrap channel. To do this, proceed to the mesh edit mode in the Resource Editor and click the Channels button. A list of channels appears for this mesh.

StaticLightingManager 03.jpg

In order to enable calculation, select the channel and click the Mark/Unmark Channel button. When the model has a texture channel, marked as UV Unwrap, this means that it is ready for calculation of static lighting.

StaticLightingManager 04.jpg

Configuring the Manager

In order to configure the manager, you should add StaticLightingManager.type to the map and set up its properties. Then, you need to calculate static lighting. To do this, click the Calculate button.

StaticLightingManager 05.jpg

Once the Static Lighting Calculation window appears, click the Start button. A light map creation process starts. Once it is finished, you should see the texture is applied to the map.

StaticLightingManager 06.jpg

After static lighting calculation completes, an output window opens. You can also access this window by clicking the Information button in the Properties window.

StaticLightingManager 07.jpg

The results of processing appear immediately after the calculation is completed. Click the Clear button to remove all calculated data.

StaticLightingManager 08.jpg


Name Description
class Entity
Components List of attached components.
LogicClass Reference to the Logic Editor class. Read more about how to work with the Logic Editor class.
Name Object name.
Tags User defined information. Defined as keyvalue pairs. It is used for user's needs.
Type Object type. It can not be changed.
class StaticLightingManager
CalculateShadows Enables\disables rendering of shadows.
Enable Enables\disables the static lighting manager.
IrradianceVolume Enables\disables creation of Irradiance Volume. Irradiance Volume.
IrradianceVolumeCellSize Specifies the size of a cell for Irradiance Volume grid.
IrradianceVolumeLightsPerCell 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 this value is, the higher is the map quality. Please note that they will also require more memory respectively.