Export VDB component icon

Export VDB

Nickname ExportVDBMorphe › 3. Scalar Volume › OutputOutputs Text

Writes implicits and scalar volumes to one OpenVDB file, one grid each, for simulation tools that read VDB files. Each implicit is rasterised to a narrow-band level set, as Mesh From Implicit rasterises it before meshing.

How it works

The file holds one grid for each implicit and each scalar volume, implicits first. Each implicit is rasterised to a narrow-band level set as Mesh From Implicit rasterises it before meshing: MinFeatureSize is the voxel size, BoundingBox the region, and Smoothing the number of mean-curvature passes. Each scalar volume keeps its own voxel size and band.

Inputs

NameNickTypeDefaultDescription
ImplicitoptionalIImplicitlistImplicits to write, one grid each, rasterised with MinFeatureSize, BoundingBox, Smoothing and Bandwidth.
Scalar VolumeoptionalSScalar VolumelistScalar volumes to write, one grid each, with their own voxel size and band, after the grids of the implicits.
NamesoptionalNTextlistGrid names, one for each implicit and volume, implicits first. If omitted, a single grid is named volume, and several grids volume_0, volume_1 and onwards.
MinFeatureSizeMFNumber1Minimum feature size: the voxel size of the grid each implicit is rasterised to. Smaller resolves finer detail, at a higher cost and in a larger file.
BoundingBoxoptionalBBoxOptional box that sets the region each implicit is rasterised over. If omitted, the region encloses the surface of each implicit.
SmoothingSMInteger0Number of mean-curvature smoothing passes applied to each implicit before writing (0 = none). Higher values round the surface and soften sharp creases, with slight shrinkage; strength per pass scales with MinFeatureSize.
BandwidthBWNumber3Narrow-band half-width in voxels: how thick a shell of distance values wraps the surface. Raise it for large offsets, dilation, or heavy smoothing, which need band to grow into. Default 3. Applies to the implicits. Beyond the band the file holds plus or minus the band width, so raise it when the simulation reads distances further from the surface.
ScaleSCNumber1Factor applied to every length in the file: voxel positions and distance values. 0.001 writes a model drawn in millimetres in metres.
File PathFTextFull path of the .vdb file to write. A file at this path is replaced.
WriteWBooleanFalseWrites the file when true. A Button writes the file once for each click; a Toggle set to true writes the file again whenever an input changes.

Outputs

NameNickTypeDescription
NamesNTextlistNames of the grids in the file, one for each implicit and volume, implicits first. Empty until the file is written.

Tips

  • A VDB file has no unit. Set Scale to 0.001 to write a model drawn in millimetres in metres, and read the file back with Scalar Volume From File at a Scale of 1000.
  • Within the band the file holds true distances, and beyond it plus or minus the band width. Raise Bandwidth when the simulation reads distances further from the surface than three voxels.
  • Wire a Button into Write to write the file once for each click. A Toggle set to true writes the file again whenever an input changes, which rasterises every implicit again each time.
  • Give each grid a name in Names when the simulation looks its grids up by name.

Messages

What the component may report, shown as a balloon on the canvas.

LevelMessage
ErrorAn Implicit or Scalar Volume item is empty. Remove the empty items, so that each name matches its grid.
WarningConnect an implicit or a scalar volume to write.
ErrorMin feature size must be > 0.
ErrorScale must be a positive number.
WarningThe file name does not end in .vdb, the extension that programs reading VDB files expect.
WarningBounding Box input is null, invalid, or degenerate (linear/planar). Each implicit is rasterised over a region that encloses its surface.
Written for Morphé 1.0 · Rhino 8