This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
FAQ
编程
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::BakeLighting Class

Header: #include <UnigineRender.h>

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.
    Notice
    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 ( const Vector< Ptr<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

  • const Vector< Ptr<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.
    Notice
    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.

bool 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.
Notice
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.
Notice
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.

Ptr<Light> getCurrentLight ( ) #

Returns an instance of the LightVoxelProbe being calculated at the moment.

Return value

Current LightVoxelProbe.

void addReadOnlyTexture ( const UGUID & guid ) #

Adds a read-only texture with the specified GUID.

Arguments

  • const UGUID & guid - GUID of the read-only texture to be added.

void removeReadOnlyTexture ( const UGUID & guid ) #

Removes the read-only texture with the specified GUID.

Arguments

  • const UGUID & guid - GUID of the read-only texture to be removed.
Last update: 2019-12-25
Build: ()