OpenVdbMap

Overview

OpenVdbMap reads a grid from a vdb file as a texture map.


Attribute Reference

Advanced attributes

show_active_field

Bool
default: False

When enabled active/inactive field locations will be white/black, respectively

General attributes

default_value

Rgb
default: [ 0, 0, 0 ]

A default value to use when A) the .vdb file is not found, B) the requested grid is not found, C) the grid is unspecified, but no grid is found

grid_name

String
default:

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

input_texture_coordinates

Vec3f bindable
default: [ 0, 0, 0 ]

The world-space coordinate to use when 'texture coordinates' is set to 'input texture coordinates'

interpolation

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

The type of interpolation to use when sampling the vdb

openvdb_geometry

Geometry
default: None

The OpenVdbGeometry object from which to retrieve the .vdb filename and transform when 'vdb source' is set to 'from OpenVdbGeometry'

show_warnings

Bool
default: False

Enables a warning message when A) the .vdb file is not found, B) the requested grid is not found, C) the grid is unspecified, but no grid is found

texture

String filename
default:

texture_coordinates

Int enum
  0 = “position” (default)
  1 = “reference position”
  2 = “input texture coordinates”

Which coordinate source to use for the texture lookup

vdb_source

Int enum
  0 = “from texture” (default)
  1 = “from OpenVdbGeometry”

Where to look for the vdb filename. Choose 'from texture' to specify a .vdb filename directly via the 'texture' attribute. Choose 'from OpenVdbGeometry' to use the .vdb filename and transform from an OpenVdbGeometry object in the scene using the 'openvdb geometry' attribute