Unigine.LightVoxelProbe Class
Inherits: | Light |
This class allows creating and managing voxel probes.
LightVoxelProbe Class
Enums
BAKE_INTERNAL_VOLUME#
Properties
Texture Texture#
The Texture instance containing the baked lighting.
set
Sets the given texture as the lighting texture of the voxel probe.
set value -
3D texture pointer to set.
string TexturePath#
The path to the lighting texture used for the voxel probe.
set
Sets a path to a light texture.
set value -
Path to a light texture.
bool IsBakeVisibilityEnvironmentProbe#
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.
set
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.
set value -
1 to enable baking of environment probe light sources to the voxel probe; 0 to disable it.
bool IsBakeVisibilityVoxelProbe#
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.
set
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.
set value -
1 to enable baking of other voxel probe light sources to the voxel probe; 0 to disable it.
bool IsBakeVisibilityLightProj#
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.
set
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.
set value -
1 to enable baking of projected light sources to the voxel probe; 0 to disable it.
bool IsBakeVisibilityLightOmni#
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.
set
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.
set value -
1 to enable baking of omni light sources to the voxel probe; 0 to disable it.
bool IsBakeVisibilityLightWorld#
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.
set
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.
set value -
1 to enable baking of world light sources to the voxel probe; 0 to disable it.
bool IsBakeVisibilitySky#
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.
set
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.
set value -
1 to enable baking of lighting from the sky to the voxel probe; 0 to disable it.
bool IsBakeVisibilityEmission#
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.
set
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.
set value -
1 to enable baking of emission light sources to the voxel probe; 0 to disable it.
bool IsBakeCaustic#
A value indicating if caustics calculation for the voxel probe is enabled.
set
Enables or disables caustics calculation for the voxel probe.
It is recommended to increase sampling resolution and number of rays when enabling this option. Enabling caustics calculation may result in increased noise.
set value -
1 to enable caustics calculation for the voxel probe; 0 to disable it.
bool IsBakeFullResolutionBounces#
A value defining if all light bounces are calculated at full resolution.
set
Enables or disables calculation of bounces at full resolution. Defines whether indirect light bounces are computed at the same full resolution as the last one or the resolution should increase from the lowest to full with each bounce iteration.
set value -
1 to enable light bounces computing at full resolution; 0 to disable it.
LightVoxelProbe.BAKE_INTERNAL_VOLUME BakeInternalVolume#
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.
set
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.
set value -
Internal volume baking mode to be set. One of the BAKE_INTERNAL_VOLUME_* values.
float BakeFixLightBleedingRadius#
The value of the Fix Light Bleeding Radius parameter which defines a radius of light bleeding correction.
set
Sets the radius of light bleeding correction.
set value -
radius of light bleeding correction.
float BakeFixLightBleedingIntensity#
The value of the Fix Light Bleeding Intensity parameter which defines a strength of light bleeding correction.
set
Sets the value of the Fix Light Bleeding Intensity parameter.
set value -
fix light bleeding intensity in the [0.0f, 1.0f] range.
bool IsBakeFixLightBleedingBounce#
A value indicating if the Fix Light Bleeding Bounce is enabled.
set
Enables or disables light bleeding bounce correction by setting the Fix Light Bleeding Bounce parameter.
set value -
1 to enable light bleeding bounce correction; 0 to disable.
float BakeZFar#
The distance to the far clipping plane used for every voxel during light baking.
set
Sets the distance to the far clipping plane used for every voxel during the light baking.
set value -
Distance to the far clipping plane, in units.
float BakeZNear#
The distance to the near clipping plane used for every voxel during light baking.
set
Sets the distance to the near clipping plane used for every voxel during light baking.
set value -
Distance to the near clipping plane.
int BakeNumRays#
Number of rays used in light baking.
set
Sets the number of rays used in light baking.
set value -
Number of rays.
int BakeSamplingMipOffset#
The mip offset of bake sampling.
set
Sets the mip offset of bake sampling.
set value -
Mip offset.
int BakeSamplingResolution#
A value defining the bake sampling resolution.
set
Sets the bake sampling resolution defining the size of one baked voxel side inside the lighting texture.
set value -
Bake sampling resolution.
int BakeViewportMask#
The mask that specifies materials taking part in baking.
set
Sets a mask that specifies materials to take part in light baking.
set value -
Bake viewport mask (integer, each bit of which is used to represent a mask).
bool IsReflectionCubicFiltering#
A value indicating if cubic filtering is applied to reflections textures.
set
Enables or disables cubic filtering for reflections of the voxel probe.
set value -
1 to enable cubic filtering for reflections; 0 to disable it.
If cubic filtering is disabled, linear texture filtering is used.
float ReflectionBias#
The bias of reflections.
set
Sets the bias for reflections of the voxel probe.
set value -
Reflection bias value, in voxels.
float ReflectionVisibilityRoughnessMax#
The higher bound of the roughness range within which the reflections of the voxel probe are visible.
set
Sets the higher bound of the roughness range within which the reflections of the voxel probe are visible.
set value -
Higher roughness value within the [0.0f, 1.0f] range.
float ReflectionVisibilityRoughnessMin#
The lower bound of the roughness range within which the reflections of the voxel probe are visible.
set
Sets the lower bound of the roughness range within which the reflections of the voxel probe are visible.
set value -
The lower roughness value within the [0.0f, 1.0f] range.
float ReflectionIntensity#
Reflection intensity of the lighvoxel probe.
set
Sets given reflection intensity value to the voxel probe.
set value -
Reflection intensity value.
vec4 ReflectionColor#
A reflection color of the voxel probe.
set
Sets given reflection color to the voxel probe.
set value -
Color value.
bool IsReflectionEnabled#
A value indicating if reflections are enabled for the voxel probe.
set
Enables or disables reflections for the voxel probe.
set value -
1 to enable reflections for the voxel probe; 0 to disable it.
bool IsAmbientCubicFiltering#
A value indicating if cubic filtering is applied to voxel probe ambient lighting.
set
Enables or disables cubic filtering for ambient lighting of voxel probe.
set value -
1 to enable cubic filtering of ambient lighting; 0 to disable it.
If cubic filtering is disabled, linear texture filtering is used.
float AmbientBias#
The bias of ambient lighting.
set
Sets the bias for ambient lighting for the voxel probe.
set value -
Ambient bias value, in voxels.
float AmbientIntensity#
Ambient intensity of the lightenvironment probe.
set
Sets ambient lighting intensity.
set value -
Ambient lighting intensity.
vec4 AmbientColor#
Ambient color value of the lightenvironment probe.
set
Sets given ambient color to the voxel probe.
set value -
Ambient color value.
bool IsAdditiveBlending#
A value indicating if the additive blending mode for the voxel probe is enabled. this option offers more flexibility in lighting control. you can use it to blend lighting of several voxel probes together and control them separately (e.g. make a separate voxel probe for an indoor emissive light source and blend it with another voxel probe with lighting baked from the sky, having the ability to enable and disable them separately).
Voxel probes with additive blending enabled cannot be used to add lighting details (e.g. creating a small high-detail voxel probe inside a large low-detail one). Such probes do not replace each other, as they are blended instead.
set
Enables or disables additive blending mode for the voxel probe. This option offers more flexibility in lighting control. You can use it to blend lighting of several voxel probes together and control them separately (e.g. make a separate voxel probe for an indoor emissive light source and blend it with another voxel probe with lighting baked from the sky, having the ability to enable and disable them separately).
Voxel probes with additive blending enabled cannot be used to add lighting details (e.g. creating a small high-detail voxel probe inside a large low-detail one). Such probes do not replace each other, as they are blended instead.
set value -
1 to enable additive blending mode for the voxel probe; 0 to disable it.
bool IsUseSunColor#
A value indicating if sun color modulation for the voxel probe is enabled.
set
Enables or disables sun color modulation for the voxel probe (the light of the environment probe changes as the sun 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.
set value -
1 to enable sun color modulation for the environment probe, 0 to disable it. The default value is 0.
float AttenuationPower#
The power of light attenuation used to simulate intensity gradual fading.
set
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.
set value -
Attenuation power value.
vec3 AttenuationDistance#
The distance from the light source shape, at which the light source doesn't illuminate anything.
set
Sets the distance from the light source shape, at which the light source doesn't illuminate anything.
set value -
Distance from the light source shape, in units along X, Y and Z axis.
float VoxelSize#
Voxel size of the voxel probe.
set
Sets the size of a voxel of the voxel probe.
set value -
Voxel Size value, in units.
vec3 BoxSize#
The current box size for the environment probe.
set
Sets the box size for the voxel probe.
set value -
Box size along X, Y and Z axes.
Members
static LightVoxelProbe ( ) #
Constructor. Creates a new voxel probe with default parameters.int SetTextureImage ( Image image ) #
Sets the given image as the 3D texture of the voxel probe.Arguments
- Image image - 3D texture to set.
Return value
1 if the cube texture is set successfully; otherwise, 0.int GetTextureImage ( Image image ) #
Bakes lighting and saves into the given Image instance.Arguments
- Image image - Image into which the light will be baked.
Return value
1 if the light has been baked successfully; otherwise, 0.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 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.Last update:
2020-04-10
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)