Unigine::LightVoxelProbe Class
Header: | #include <UnigineLights.h> |
Inherits from: | Light |
This class allows creating and managing voxel probes.
LightVoxelProbe Class
Перечисления (Enums)
BAKE_INTERNAL_VOLUME#
BAKE_QUALITY#
Light baking quality preset of the voxel probe. Each preset includes recommended common baking quality settings, such as number of light rays simulated and sampling quality, that affect the time consumption of light baking and the final quality.BLEND#
Имя | Описание |
---|---|
BLEND_ALPHA_BLEND = 0 | The alpha blend mode of light blending. |
BLEND_ADDITIVE = 1 | The additive mode of light blending. |
BLEND_MULTIPLICATIVE = 2 | The multiplicative mode of light blending. |
Members
static LightVoxelProbePtr create ( ) #
Constructor. Creates a new voxel probe with default parameters.void setAttenuationPower ( float power ) #
Sets the power of light attenuation used to simulate intensity gradual fading. This parameter determines how fast the intensity decreases up to the attenuation distance set for the light source.Arguments
- float power - Attenuation power value.
float getAttenuationPower ( ) const#
Returns the power of light attenuation used to simulate intensity gradual fading.Return value
Attenuation power value.void setBakeInternalVolume ( LightVoxelProbe::BAKE_INTERNAL_VOLUME volume ) #
Sets internal volume baking mode for the voxel probe (voxels that don't touch geometry.If internal volume baking is disabled, only the voxels covering geometry are baked while empty ones are skipped.
Arguments
- LightVoxelProbe::BAKE_INTERNAL_VOLUME volume - Internal volume baking mode to be set. One of the BAKE_INTERNAL_VOLUME_* values.
LightVoxelProbe::BAKE_INTERNAL_VOLUME getBakeInternalVolume ( ) const#
Returns the current internal volume baking mode for the voxel probe (voxels that don't touch geometry).If internal volume baking is disabled, only the voxels covering geometry are baked while empty ones are skipped.
Return value
Current internal volume baking. One of the BAKE_INTERNAL_VOLUME_* values.void setVoxelSize ( float size ) #
Sets the size of a voxel of the voxel probe.Arguments
- float size - Voxel Size value, in units.
float getVoxelSize ( ) const#
Returns voxel size of the voxel probe.Return value
Voxel Size value.void setBakeViewportMask ( int mask ) #
Sets a mask that specifies materials to take part in light baking.Arguments
- int mask - Bake viewport mask (integer, each bit of which is used to represent a mask).
int getBakeViewportMask ( ) const#
Returns the mask that specifies materials taking part in baking.Return value
The bake viewport mask (integer, each bit of which is used to represent a mask).void setTexturePath ( const char * path ) #
Sets a path to a light texture.Arguments
- const char * path - Path to a light texture.
const char * getTexturePath ( ) const#
Returns the path to the lighting texture used for the voxel probe.Return value
Path to the texture.void setBoxSize ( const Math::vec3 & size ) #
Sets the box size for the voxel probe.Arguments
- const Math::vec3 & size - Box size along X, Y and Z axes.
Math::vec3 getBoxSize ( ) const#
Returns the current box size for the environment probe.Return value
Box size along X, Y and Z axes.void setBakeZFar ( float zfar ) #
Sets the distance to the far clipping plane used for every voxel during the light baking.Arguments
- float zfar - Distance to the far clipping plane, in units.
float getBakeZFar ( ) const#
Returns the distance to the far clipping plane used for every voxel during light baking.Return value
Distance to the far clipping plane.void setAmbientCubicFiltering ( bool filtering ) #
Enables or disables cubic filtering for ambient lighting of voxel probe.Arguments
- bool filtering - 1 to enable cubic filtering of ambient lighting; 0 to disable it.
If cubic filtering is disabled, linear texture filtering is used.
bool isAmbientCubicFiltering ( ) const#
Returns a value indicating if cubic filtering is applied to voxel probe ambient lighting.Return value
1 if the cubic filtering is applied to voxel probe ambient lighting; otherwise, 0.void setAmbientBias ( float bias ) #
Sets the bias for ambient lighting for the voxel probe.Arguments
- float bias - Ambient bias value, in voxels.
float getAmbientBias ( ) const#
Returns the bias of ambient lighting.Return value
Ambient bias value, in voxels.void setAttenuationDistance ( const Math::vec3 & distance ) #
Sets the distance from the light source shape, at which the light source doesn't illuminate anything.Arguments
- const Math::vec3 & distance - Distance from the light source shape, in units along X, Y and Z axis.
Math::vec3 getAttenuationDistance ( ) const#
Returns the distance from the light source shape, at which the light source doesn't illuminate anything.Return value
Distance from the light source shape, in units.void setUseSkyColor ( bool color ) #
Enables or disables sky color modulation for the voxel probe (the light of the environment probe changes as the sky color changes).To bake lighting from the sky separately with this option enabled, it is recommended to enable baking visibility for the sky only, while disabling it for other light sources.
Changing this option requires the lighting to be re-baked.
Arguments
- bool color - 1 to enable sky color modulation for the environment probe, 0 to disable it. The default value is 0.
bool isUseSkyColor ( ) const#
Returns a value indicating if sky color modulation for the voxel probe is enabled.Return value
1 if sky color modulation for the environment probe is enabled; otherwise, 0.Math::ivec3 getResolution ( ) #
Returns the resolution of the voxel probe according to the voxel size.Return value
Resolution of the voxel probe along X, Y and Z axis, in voxels.void setReflectionEnabled ( bool enabled ) #
Enables or disables reflections for the voxel probe.Arguments
- bool enabled - 1 to enable reflections for the voxel probe; 0 to disable it.
bool isReflectionEnabled ( ) const#
Returns a value indicating if reflections are enabled for the voxel probe.Return value
1 if reflections are enabled for the voxel probe; otherwise, 0.void setReflectionBias ( float bias ) #
Sets the bias for reflections of the voxel probe.Arguments
- float bias - Reflection bias value, in voxels.
float getReflectionBias ( ) const#
Returns the bias of reflections.Return value
Reflection bias value, in voxels.void setReflectionCubicFiltering ( bool filtering ) #
Enables or disables cubic filtering for reflections of the voxel probe.Arguments
- bool filtering - 1 to enable cubic filtering for reflections; 0 to disable it.
If cubic filtering is disabled, linear texture filtering is used.
bool isReflectionCubicFiltering ( ) const#
Returns a value indicating if cubic filtering is applied to reflections textures.Return value
1 if the cubic filtering is applied to reflections textures; otherwise, 0.void setReflectionVisibilityRoughnessMin ( float val ) #
Sets the lower bound of the roughness range within which the reflections of the voxel probe are visible.Arguments
- float val - The lower roughness value within the [0.0f, 1.0f] range.
float getReflectionVisibilityRoughnessMin ( ) const#
Returns the lower bound of the roughness range within which the reflections of the voxel probe are visible.Return value
Lower material roughness value within the [0.0f, 1.0f] range.void setReflectionVisibilityRoughnessMax ( float val ) #
Sets the higher bound of the roughness range within which the reflections of the voxel probe are visible.Arguments
- float val - Higher roughness value within the [0.0f, 1.0f] range.
float getReflectionVisibilityRoughnessMax ( ) const#
Returns the higher bound of the roughness range within which the reflections of the voxel probe are visible.Return value
The higher roughness value within the [0.0f, 1.0f] range.static int type ( ) #
Returns the type of the node.Return value
LightVoxelProbe type identifier.long long getVideoMemoryUsage ( ) #
Returns a value defining how much memory the light texture takes according to its size. The memory is calculated in accordance to the following formula: Memory = SizeX × SizeY × SizeZ × Sides × FormatMemory- SizeX, SizeY, SizeZ - the dimensions of the 3D light texture, in voxels.
- Sides - number of sides of each voxel, equal to 6.
- FormatMemory - a memory usage amount for the texture in RGBA16 format, equal to 8.
Return value
A texture memory usage, in bytes.void setBakeVisibilityEmission ( bool emission ) #
Enables or disables baking of emission light sources to the voxel probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.Arguments
- bool emission - 1 to enable baking of emission light sources to the voxel probe; 0 to disable it.
bool isBakeVisibilityEmission ( ) const#
Returns a value indicating if emission light sources are to be baked to the voxel probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.Return value
1 if emission light sources are to be baked to the voxel probe; otherwise, 0.void setBakeVisibilitySky ( bool sky ) #
Enables or disables baking of lighting from the sky to the voxel probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.Arguments
- bool sky - 1 to enable baking of lighting from the sky to the voxel probe; 0 to disable it.
bool isBakeVisibilitySky ( ) const#
Returns a value indicating if lighting from the sky is to be baked to the voxel probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.Return value
1 if lighting from the sky is to be baked to the voxel probe; otherwise, 0.void setBakeVisibilityLightWorld ( bool world ) #
Enables or disables baking of world light sources to the voxel probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.Arguments
- bool world - 1 to enable baking of world light sources to the voxel probe; 0 to disable it.
bool isBakeVisibilityLightWorld ( ) const#
Returns a value indicating if world light sources are to be baked to the voxel probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.Return value
1 if world light sources are to be baked to the voxel probe; otherwise, 0.void setBakeVisibilityLightOmni ( bool omni ) #
Enables or disables baking of omni light sources to the voxel probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.Arguments
- bool omni - 1 to enable baking of omni light sources to the voxel probe; 0 to disable it.
bool isBakeVisibilityLightOmni ( ) const#
Returns a value indicating if omni light sources are to be baked to the voxel probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.Return value
1 if omni light sources are to be baked to the voxel probe; otherwise, 0.void setBakeVisibilityLightProj ( bool proj ) #
Enables or disables baking of projected light sources to the voxel probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.Arguments
- bool proj - 1 to enable baking of projected light sources to the voxel probe; 0 to disable it.
bool isBakeVisibilityLightProj ( ) const#
Returns a value indicating if projected light sources are to be baked to the voxel probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.Return value
1 if the projected light sources are to be baked to the voxel probe; otherwise, 0.void setBakeVisibilityVoxelProbe ( bool probe ) #
Enables or disables baking of other voxel probe light sources to the voxel probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.Arguments
- bool probe - 1 to enable baking of other voxel probe light sources to the voxel probe; 0 to disable it.
bool isBakeVisibilityVoxelProbe ( ) const#
Returns a value indicating if other voxel probe light sources are to be baked to the voxel probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.Return value
1 if other voxel probe light sources are to be baked to the voxel probe; otherwise, 0.void setBakeVisibilityLightmap ( bool lightmap ) #
Enables or disables baking of lightmapped surfaces to the voxel probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.Arguments
- bool lightmap - 1 to enable baking of lightmapped surfaces to the voxel probe; 0 to disable it.
bool isBakeVisibilityLightmap ( ) const#
Returns a value indicating if lightmapped surfaces are to be baked to the voxel probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.Return value
1 if lightmapped surfaces are to be baked to the voxel probe; otherwise, 0.void setBakeVisibilityEnvironmentProbe ( bool probe ) #
Enables or disables baking of environment probe light sources to the voxel probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.Arguments
- bool probe - true to enable baking of environment probe light sources to the voxel probe; false to disable it.
bool isBakeVisibilityEnvironmentProbe ( ) const#
Returns a value indicating if environment probe light sources are to be baked to the voxel probe. You can use this option together with additive blending to provide more flexibility in light baking. Thus, you can make voxel probes independent of each other and combine them to produce some sort of dynamic GI effect.Return value
true if environment probe light sources are to be baked to the voxel probe; otherwise, false.void setBakeQuality ( LightVoxelProbe::BAKE_QUALITY quality ) #
Sets the baking quality for the light probe.Arguments
- LightVoxelProbe::BAKE_QUALITY quality - One of BAKE_QUALITY values.
LightVoxelProbe::BAKE_QUALITY getBakeQuality ( ) const#
Returns the current baking quality for the voxel probe.Return value
The bake quality. One of BAKE_QUALITY values.void setBlendMode ( LightVoxelProbe::BLEND mode ) #
Sets the blending mode for the light voxel probe.Arguments
- LightVoxelProbe::BLEND mode - The blending mode. One of BLEND values.
LightVoxelProbe::BLEND getBlendMode ( ) const#
Returns the current blending mode for the light voxel probe.Return value
The blending mode. One of BLEND values.Last update:
19.04.2024
Помогите сделать статью лучше
Была ли эта статья полезной?
(или выберите слово/фразу и нажмите Ctrl+Enter