VdbLightFilter

Overview


The Vdb light filter uses a VDB volume as a filter to modulate the light’s output.


Attribute Reference

Properties attributes

blur_type

Int enum
  0 = “gaussian” (default)
  1 = “circular”

The type of blur to apply

blur_value

Float
default: 0.0

The blur radius

color_tint

Rgb
default: [ 0, 0, 0 ]

Tints the light filter. Lower density increases the shift toward the tint color.

density_grid_name

String
default:

The name of the grid within the .vdb file from which to sample for density(hint: use openvdb_print to see contents of .vdb file). If no grid is specified, it will use 'density' as the defaultIn cases where there are multiple grids with the same name, the grid name can be indexed (eg. density[1])

density_remap_input_max

Float
default: 1.0

Clamp the remapped input to this max value

density_remap_input_min

Float
default: 0.0

Clamp the remapped input to this min value

density_remap_inputs

FloatVector
default: {}

List of input remap curve values

density_remap_interpolation_types

IntVector
default: {}

List of density remap interpolation types

density_remap_output_max

Float
default: 1.0

Clamp the remapped output to this max value

density_remap_output_min

Float
default: 0.0

Clamp the remapped output to this min value

density_remap_outputs

FloatVector
default: {}

List of output remap curve values

density_rescale_enable

Bool
default: False

Enable density rescaling

invert_density

Bool
default: False

Invert the density with density = 1 - density

vdb_interpolation_type

Int enum
  0 = “point” (default)
  1 = “box”
  2 = “quadratic”

The type of interpolation to use when sampling the filter

vdb_map

String filename
default:

The path to the vdb

General attributes

node_xform

Mat4d blurrable
default: [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ]

The filter's orientation

on

Bool
default: True

Turns the light filter on/off.


Examples


Default (with torus VDB)
filter = VdbLightFilter("/Scene/lighting/vdb") {
    ["node_xform"] = scale(0.01, 0.05, 0.01) * translate(0, 0, -7),
    ["vdb_map"] = "torus.vdb",
}
Smooth interpolation (with torus VDB)
filter = VdbLightFilter("/Scene/lighting/vdb") {
    ["node_xform"] = scale(0.01, 0.05, 0.01) * translate(0, 0, -7),
    ["vdb_map"] = "torus.vdb",
    ["vdb_interpolation_type"] = 2,
}
Invert density (with torus VDB)
filter = VdbLightFilter("/Scene/lighting/vdb") {
    ["node_xform"] = scale(0.01, 0.05, 0.01) * translate(0, 0, -7),
    ["vdb_map"] = "torus.vdb",
    ["invert_density"] = true,
}
Blurred (with torus VDB)
filter = VdbLightFilter("/Scene/lighting/vdb") {
    ["node_xform"] = scale(0.01, 0.05, 0.01) * translate(0, 0, -7),
    ["vdb_map"] = "torus.vdb",
    ["blur_value"] = 40,
}
Tinted (with torus VDB)
filter = VdbLightFilter("/Scene/lighting/vdb") {
    ["node_xform"] = scale(0.01, 0.05, 0.01) * translate(0, 0, -7),
    ["vdb_map"] = "torus.vdb",
    ["color_tint"] = Rgb(0.8, 0.0, 0.0),
}