BakeLighting Class
The scope of applications for UnigineScript is limited to implementing materials-related logic (material expressions, scriptable materials, brush materials). Do not use UnigineScript as a language for application logic, please consider C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScipt (beyond its scope of applications) is not guaranteed, as the current level of support assumes only fixing critical issues.
This class allows you to bake lighting.
BakeLighting Class
Members
int getVoxelsPerFrame ( ) #
Return number of voxels computed and visualized per single frame.Return value
void setVoxelsPerFrame ( int frame ) #
Sets number of voxels computed and visualized per single frame.Arguments
- int frame - Number of voxels per frame within the [1, 100] range. The default value is 1.
High values cause longer user interface response.
void bakeEnvironmentProbes ( ) #
Starts the process of light baking for all environment probes in the scene.void bakeVoxelProbes ( ) #
Starts the process of light baking for all voxel probes in the scene.void bake ( Vector<Node> probes ) #
Starts the process of light baking for the all voxel and environment probes and shadow baking for omni and proj light sources in static light mode in the given list.Arguments
- Vector<Node> probes - List of voxel and environment probe nodes for which the process of light baking is to be performed and omni and proj light sources in static light mode for which the process of shadow baking is to be performed.
The order of nodes added for baking is not important.
void bakeAll ( ) #
Starts the process of light baking for all voxel and environment probes and shadow baking for all omni and proj light sources in static light mode in the scene.int isBaking ( ) #
Returns a value indicating if the process of baking is being performed at the moment.Return value
1 if lighting is being baked; otherwise - 0.int getCurrentBounce ( ) #
Returns a bounce being calculated at the moment.If the process of baking is not being performed at the moment, 1 is returned.
Return value
Bounce number.int getBounces ( ) #
Returns number of all bounces.Return value
Number of bounces.int getProgress ( ) #
Returns overall progress of light baking.If the process of baking is not being performed at the moment, 0 is returned.
Return value
Overall baking progress, in percents.int getProgressBounce ( ) #
Returns a value showing progress of calculating current bounce.Return value
Bounce calculating progress, in percents.float getVoxelSizeMultiplier ( ) #
Returns the value of the voxel size multiplier parameter. By default, it is equal to 1.0f.Return value
Voxel size multiplier.void setBounces ( int bounces ) #
Sets number of bounces.Arguments
- int bounces - Number of bounces within the [1, 32] range. The default value is 1.
int getProgressLight ( ) #
Returns progress of light baking for the current LightVoxelProbe at the moment.Return value
LightVoxelProbe progress, in percents.float getTimer ( ) #
Returns the time elapsed from the start of the process of baking.Return value
Elapsed time, in seconds.void setVoxelSizeMultiplier ( float multiplier ) #
Sets the value of the voxel size multiplier parameter.Arguments
- float multiplier - Voxel size multiplier within the [0.0f, 8.0f] range. The default value is 1.
void stop ( ) #
Interrupts the process of light baking, if it is in performing state.Light getCurrentLight ( ) #
Returns an instance of the LightVoxelProbe being calculated at the moment.Return value
Current LightVoxelProbe.void addReadOnlyTexture ( UGUID guid ) #
Adds a read-only texture with the specified GUID.Arguments
- UGUID guid - GUID of the read-only texture to be added.
void removeReadOnlyTexture ( UGUID guid ) #
Removes the read-only texture with the specified GUID.Arguments
- UGUID guid - GUID of the read-only texture to be removed.
Last update:
2020-07-31
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)