Unigine::LightVoxelProbe Class
Header: | #include <UnigineLights.h> |
Inherits from: | Light |
This class allows creating and managing Voxel Probe sources.
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#
Members
void setTextureFilePath ( const char * path ) #
Sets a new file path for the lighting texture used for the Voxel Probe.
Arguments
- const char * path - The path to the texture file.
String getTextureFilePath() const#
Returns the current file path for the lighting texture used for the Voxel Probe.
Return value
Current path to the texture file.void setBakeVisibilityEnvironmentProbe ( bool probe ) #
Sets a new 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.
Arguments
- bool probe - Set true to enable baking of environment probe light sources to the Voxel Probe; false - to disable it.
bool isBakeVisibilityEnvironmentProbe() const#
Returns the current 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 baking of environment probe light sources to the Voxel Probe is enabled; otherwise false.void setBakeVisibilityVoxelProbe ( bool probe ) #
Sets a new 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.
Arguments
- bool probe - Set true to enable baking of other Voxel Probe light sources to the Voxel Probe; false - to disable it.
bool isBakeVisibilityVoxelProbe() const#
Returns the current 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
true if baking of other Voxel Probe light sources to the Voxel Probe is enabled; otherwise false.void setBakeVisibilityLightProj ( bool proj ) #
Sets a new 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.
Arguments
- bool proj - Set true to enable baking of projected light sources to the Voxel Probe; false - to disable it.
bool isBakeVisibilityLightProj() const#
Returns the current 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
true if baking of projected light sources to the Voxel Probe is enabled; otherwise false.void setBakeVisibilityLightOmni ( bool omni ) #
Sets a new 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.
Arguments
- bool omni - Set true to enable baking of omni light sources to the Voxel Probe; false - to disable it.
bool isBakeVisibilityLightOmni() const#
Returns the current 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
true if baking of omni light sources to the Voxel Probe is enabled; otherwise false.void setBakeVisibilityLightWorld ( bool world ) #
Sets a new 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.
Arguments
- bool world - Set true to enable baking of world light sources to the Voxel Probe; false - to disable it.
bool isBakeVisibilityLightWorld() const#
Returns the current 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
true if baking of world light sources to the Voxel Probe is enabled; otherwise false.void setBakeVisibilitySky ( bool sky ) #
Sets a new 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.
Arguments
- bool sky - Set true to enable baking of lighting from the sky to the Voxel Probe; false - to disable it.
bool isBakeVisibilitySky() const#
Returns the current 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
true if baking of lighting from the sky to the Voxel Probe is enabled; otherwise false.void setBakeVisibilityEmission ( bool emission ) #
Sets a new 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.
Arguments
- bool emission - Set true to enable baking of emission light sources to the Voxel Probe; false - to disable it.
bool isBakeVisibilityEmission() const#
Returns the current 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
true if baking of emission light sources to the Voxel Probe is enabled; otherwise false.void setBakeVisibilityLightmap ( bool lightmap ) #
Sets a new value indicating if the lightmapped surfaces are to be baked to the Voxel Probe.
Arguments
- bool lightmap - Set true to enable baking of lightmapped surfaces to the Voxel Probe; false - to disable it.
bool isBakeVisibilityLightmap() const#
Returns the current value indicating if the lightmapped surfaces are to be baked to the Voxel Probe.
Return value
true if baking of lightmapped surfaces to the Voxel Probe is enabled; otherwise false.void setBakeInternalVolume ( LightVoxelProbe::BAKE_INTERNAL_VOLUME volume ) #
Sets a new internal volume baking mode for the Voxel Probe (voxels that don't touch geometry).
Notice
If internal volume baking is disabled, only the voxels covering geometry are baked while empty ones are skipped.
Arguments
- LightVoxelProbe::BAKE_INTERNAL_VOLUME volume - The 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).
Notice
If internal volume baking is disabled, only the voxels covering geometry are baked while empty ones are skipped.
Return value
Current Internal volume baking mode to be set. One of the BAKE_INTERNAL_VOLUME_* values.void setBakeZFar ( float zfar ) #
Sets a new distance to the far clipping plane used for every voxel during light baking.
Arguments
- float zfar - The distance to the far clipping plane.
float getBakeZFar() const#
Returns the current distance to the far clipping plane used for every voxel during light baking.
Return value
Current distance to the far clipping plane.void setBakeViewportMask ( int mask ) #
Sets a new mask that specifies materials taking part in baking.
Arguments
- int mask - The bake viewport mask (integer, each bit of which is used to represent a mask).
int getBakeViewportMask() const#
Returns the current mask that specifies materials taking part in baking.
Return value
Current bake viewport mask (integer, each bit of which is used to represent a mask).void setSpecularCubicFiltering ( bool filtering ) #
Sets a new value indicating if cubic filtering is applied to specular reflections textures.
Notice
If cubic filtering is disabled, linear texture filtering is used.
Arguments
- bool filtering - Set true to enable cubic filtering for specular reflections textures; false - to disable it.
bool isSpecularCubicFiltering() const#
Returns the current value indicating if cubic filtering is applied to specular reflections textures.
Notice
If cubic filtering is disabled, linear texture filtering is used.
Return value
true if cubic filtering for specular reflections textures is enabled; otherwise false.void setSpecularReflectionBias ( float bias ) #
Sets a new specular reflections offset along the reflection vector.
Arguments
- float bias - The specular reflections offset along the reflection vector
float getSpecularReflectionBias() const#
Returns the current specular reflections offset along the reflection vector.
Return value
Current specular reflections offset along the reflection vectorvoid setSpecularNormalBias ( float bias ) #
Sets a new specular reflections offset along the normal to the surface.
Arguments
- float bias - The specular reflections offset along the normal
float getSpecularNormalBias() const#
Returns the current specular reflections offset along the normal to the surface.
Return value
Current specular reflections offset along the normalvoid setSpecularTangentBias ( float bias ) #
Sets a new additional offset for specular reflections along the surface tangents. Adjusting this setting can help reduce reflection leaking in dark areas.
Arguments
- float bias - The offset for specular reflections along the surface tangents
float getSpecularTangentBias() const#
Returns the current additional offset for specular reflections along the surface tangents. Adjusting this setting can help reduce reflection leaking in dark areas.
Return value
Current offset for specular reflections along the surface tangentsvoid setSpecularVisibilityRoughnessMax ( float max ) #
Sets a new higher bound of the roughness range within which the specular reflections of the Voxel Probe are visible.
Arguments
- float max - The higher bound of the roughness range within which the specular reflections of the Voxel Probe are visible
float getSpecularVisibilityRoughnessMax() const#
Returns the current higher bound of the roughness range within which the specular reflections of the Voxel Probe are visible.
Return value
Current higher bound of the roughness range within which the specular reflections of the Voxel Probe are visiblevoid setSpecularVisibilityRoughnessMin ( float min ) #
Sets a new lower bound of the roughness range within which the specular reflections of the Voxel Probe are visible.
Arguments
- float min - The lower bound of the roughness range within which the specular reflections of the Voxel Probe are visible
float getSpecularVisibilityRoughnessMin() const#
Returns the current lower bound of the roughness range within which the specular reflections of the Voxel Probe are visible.
Return value
Current lower bound of the roughness range within which the specular reflections of the Voxel Probe are visiblevoid setSpecularEnabled ( bool enabled ) #
Sets a new value indicating if specular reflections are enabled for the Voxel Probe.
Arguments
- bool enabled - Set true to enable specular reflections for the Voxel Probe; false - to disable it.
bool isSpecularEnabled() const#
Returns the current value indicating if specular reflections are enabled for the Voxel Probe.
Return value
true if specular reflections for the Voxel Probe is enabled; otherwise false.void setDiffuseCubicFiltering ( bool filtering ) #
Sets a new value indicating if cubic filtering is applied to Voxel Probe diffuse lighting.
Arguments
- bool filtering - Set true to enable cubic filtering for Voxel Probe diffuse lighting; false - to disable it.
bool isDiffuseCubicFiltering() const#
Returns the current value indicating if cubic filtering is applied to Voxel Probe diffuse lighting.
Return value
true if cubic filtering for Voxel Probe diffuse lighting is enabled; otherwise false.void setDiffuseNormalBias ( float bias ) #
Sets a new bias of ambient lighting implemented as voxel projection offset along the normal to the surface.
Arguments
- float bias - The voxel projection offset along the normal
float getDiffuseNormalBias() const#
Returns the current bias of ambient lighting implemented as voxel projection offset along the normal to the surface.
Return value
Current voxel projection offset along the normalvoid setDiffuseTangentBias ( float bias ) #
Sets a new additional offset for voxel projection along the surface tangents. Adjusting this setting can help reduce light leaking in dark areas.
Arguments
- float bias - The offset for voxel projection along the surface tangents
float getDiffuseTangentBias() const#
Returns the current additional offset for voxel projection along the surface tangents. Adjusting this setting can help reduce light leaking in dark areas.
Return value
Current offset for voxel projection along the surface tangentsvoid setDiffuseTranslucentIndirect ( float indirect ) #
Sets a new intensity of the material's original diffuse lighting, as if the Translucent parameter were set to 0. Fine-tuning the current parameter can help correct artifacts caused by setDiffuseTranslucentSoftIndirect(), such as excessive darkening on materials.
Arguments
- float indirect - The intensity of the original diffuse lighting on the material
float getDiffuseTranslucentIndirect() const#
Returns the current intensity of the material's original diffuse lighting, as if the Translucent parameter were set to 0. Fine-tuning the current parameter can help correct artifacts caused by setDiffuseTranslucentSoftIndirect(), such as excessive darkening on materials.
Return value
Current intensity of the original diffuse lighting on the materialvoid setDiffuseTranslucentSoftIndirect ( float indirect ) #
Sets a new intensity of soft diffuse lighting calculated as the average illumination from all six directions. With such approach to lighting surface normals are not taken into account, thus increasing this value may result in a darker appearance than expected. However, this approach often produces a more realistic look, similar to the appearance of wax figures.
Arguments
- float indirect - The intensity of soft diffuse lighting
float getDiffuseTranslucentSoftIndirect() const#
Returns the current intensity of soft diffuse lighting calculated as the average illumination from all six directions. With such approach to lighting surface normals are not taken into account, thus increasing this value may result in a darker appearance than expected. However, this approach often produces a more realistic look, similar to the appearance of wax figures.
Return value
Current intensity of soft diffuse lightingvoid setUseSkyColor ( bool color ) #
Sets a new value indicating if sky color modulation for the Voxel Probe is enabled.
Arguments
- bool color - Set true to enable sky color modulation for the Voxel Probe; false - to disable it.
bool isUseSkyColor() const#
Returns the current value indicating if sky color modulation for the Voxel Probe is enabled.
Return value
true if sky color modulation for the Voxel Probe is enabled; otherwise false.void setAttenuationPower ( float power ) #
Sets a new 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 - The attenuation power value.
float getAttenuationPower() const#
Returns the current 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.
Return value
Current attenuation power value.void setAttenuationDistance ( const Math::vec3& distance ) #
Sets a new distance from the light source shape, at which the light source doesn't illuminate anything.
Arguments
- const Math::vec3& distance - The distance from the light source shape, in units, at which the light source doesn't illuminate anything.
Math::vec3 getAttenuationDistance() const#
Returns the current distance from the light source shape, at which the light source doesn't illuminate anything.
Return value
Current distance from the light source shape, in units, at which the light source doesn't illuminate anything.void setVoxelSize ( float size ) #
Sets a new size of each voxel in the Voxel Probe.
Arguments
- float size - The voxel size value, in units.
float getVoxelSize() const#
Returns the current size of each voxel in the Voxel Probe.
Return value
Current voxel size value, in units.void setBoxSize ( const Math::vec3& size ) #
Sets a new size of the whole box-type Voxel Probe.
Arguments
- const Math::vec3& size - The box-type Voxel Probe size along X, Y and Z axes.
Math::vec3 getBoxSize() const#
Returns the current size of the whole box-type Voxel Probe.
Return value
Current box-type Voxel Probe size along X, Y and Z axes.void setBakeQuality ( LightVoxelProbe::BAKE_QUALITY quality ) #
Sets a new baking quality for the Voxel Probe.
Arguments
- LightVoxelProbe::BAKE_QUALITY quality - The baking quality for the Voxel Probe, one of BAKE_QUALITY values.
LightVoxelProbe::BAKE_QUALITY getBakeQuality() const#
Returns the current baking quality for the Voxel Probe.
Return value
Current baking quality for the Voxel Probe, one of BAKE_QUALITY values.void setBlendMode ( LightVoxelProbe::BLEND mode ) #
Sets a new blending mode for the Voxel Probe.
Arguments
- LightVoxelProbe::BLEND mode - The blending mode for the Voxel Probe, one of BLEND values.
LightVoxelProbe::BLEND getBlendMode() const#
Returns the current blending mode for the Voxel Probe.
Return value
Current blending mode for the Voxel Probe, one of BLEND values.static LightVoxelProbePtr create ( ) #
Constructor. Creates a new Voxel Probe with default parameters.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.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.The information on this page is valid for UNIGINE 2.20 SDK.
Last update:
2025-05-30
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)