Documentation/Entity Types/Base/StaticLightingManager.type

From NeoAxis Engine Wiki

Jump to: navigation, search
Go to higher level
StaticLightingManager 001.jpg

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:

StaticLightingManager 005.jpg

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.

StaticLightingManager 004.jpg

In order to enable calculation, select a channel and click the Mark/Unmark Channel button.

StaticLightingManager 006.jpg

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.

StaticLightingManager 007.jpg

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.

StaticLightingManager 002.jpg

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.

StaticLightingManager 003.jpg


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.