MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::IO::VDBWriter Class Reference

VolumeWriter implementation backed by tinyvdb. More...

#include <VDBWriter.hpp>

+ Inheritance diagram for MayaFlux::IO::VDBWriter:
+ Collaboration diagram for MayaFlux::IO::VDBWriter:

Public Member Functions

bool can_write (const std::string &filepath) const override
 Check whether this writer handles the given filepath.
 
std::string get_last_error () const override
 Last error message or empty string.
 
std::vector< std::string > get_supported_extensions () const override
 File extensions handled by this writer (without dot).
 
 VDBWriter ()=default
 
bool write (const std::string &filepath, const Kakshya::VolumeData &data, const VolumeWriteOptions &options={}) override
 Write volume data to disk.
 
 ~VDBWriter () override=default
 
- Public Member Functions inherited from MayaFlux::IO::VolumeWriter
virtual ~VolumeWriter ()=default
 

Static Public Member Functions

static void register_with_registry ()
 Register this writer with the VolumeWriterRegistry.
 

Private Attributes

std::string m_last_error
 

Detailed Description

VolumeWriter implementation backed by tinyvdb.

Writes one .vdb per call, carrying every field of the supplied VolumeData as a separately named grid in that single file. Scalar fields become float grids, vector fields become vec3s grids. Values below the activity threshold are left inactive and take the background value, which is what makes the output sparse and therefore worth being a .vdb rather than a raw dump.

The lattice becomes a linear transform: scale by cell_size(), then translate by bounds.min plus half a cell, so index (i,j,k) maps to the world position Lattice3D::cell_center reports for it.

LatticeSemantics maps directly. LatticeValueClass corresponds to OpenVDB's GridClass and VectorVariance to its VecType, both one to one, so a field declared as a fog volume or a contravariant velocity arrives in Houdini, Blender or Maya resampling correctly rather than by coincidence.

No time dimension: an animated sequence is a sequence of calls with numbered paths, which is how every consumer of .vdb expects to find one.

Options honored:

Definition at line 38 of file VDBWriter.hpp.


The documentation for this class was generated from the following files: