OpenVDB  11.0.0
Public Types | Public Member Functions | List of all members
FrustumRasterizer< PointDataGridT > Class Template Reference

Efficient rasterization of one or more VDB Points grids into a linear or frustum volume with the option to bake in camera or geometry motion blur. More...

#include <openvdb/points/PointRasterizeFrustum.h>

Public Types

using GridPtr = typename PointDataGridT::Ptr
 
using GridConstPtr = typename PointDataGridT::ConstPtr
 
using GridToRasterize = point_rasterize_internal::GridToRasterize< PointDataGridT >
 

Public Member Functions

 FrustumRasterizer (const FrustumRasterizerSettings &settings, const FrustumRasterizerMask &mask=FrustumRasterizerMask(), util::NullInterrupter *interrupt=nullptr)
 main constructor More...
 
void addPoints (GridConstPtr &points)
 Append a PointDataGrid to the rasterizer (but don't rasterize yet). More...
 
void addPoints (GridPtr &points, bool stream=false)
 Append a PointDataGrid to the rasterizer (but don't rasterize yet). More...
 
void clear ()
 Clear all PointDataGrids in the rasterizer. More...
 
size_t size () const
 Return number of PointDataGrids in the rasterizer. More...
 
size_t memUsage () const
 Return memory usage of the rasterizer. More...
 
template<typename FilterT = points::NullFilter>
FloatGrid::Ptr rasterizeUniformDensity (RasterMode mode=RasterMode::MAXIMUM, bool reduceMemory=false, float scale=1.0f, const FilterT &filter=FilterT())
 
template<typename FilterT = points::NullFilter>
FloatGrid::Ptr rasterizeDensity (const openvdb::Name &attribute, RasterMode mode=RasterMode::MAXIMUM, bool reduceMemory=false, float scale=1.0f, const FilterT &filter=FilterT())
 
template<typename FilterT = points::NullFilter>
GridBase::Ptr rasterizeAttribute (const Name &attribute, RasterMode mode=RasterMode::ACCUMULATE, bool reduceMemory=false, float scale=1.0f, const FilterT &filter=FilterT())
 
template<typename GridT , typename AttributeT , typename FilterT = points::NullFilter>
GridT::Ptr rasterizeAttribute (const Name &attribute, RasterMode mode=RasterMode::ACCUMULATE, bool reduceMemory=false, float scale=1.0f, const FilterT &filter=FilterT())
 
template<typename GridT , typename FilterT = points::NullFilter>
GridT::Ptr rasterizeMask (bool reduceMemory=false, const FilterT &filter=FilterT())
 

Detailed Description

template<typename PointDataGridT>
class openvdb::v11_0::points::FrustumRasterizer< PointDataGridT >

Efficient rasterization of one or more VDB Points grids into a linear or frustum volume with the option to bake in camera or geometry motion blur.

The camera transform can be provided using a RasterCamera object to offer linear camera motion blur and geometry motion blur is computed from reading a velocity attribute on the points. Sub-sampled camera motion blur is planned.

Note
For maximum memory efficiency, the data can optionally be streamed from disk where the input VDB point grids are collapsed as they are read.
The total contribution for each point is spread across all the voxels being rasterized into and weighted by the total volume represented by each voxel. In an example use case where a point is moving away from a camera that is used to generate a frustum volume being rasterized into, each successive voxel is larger in size.

Member Typedef Documentation

using GridConstPtr = typename PointDataGridT::ConstPtr
using GridPtr = typename PointDataGridT::Ptr

Constructor & Destructor Documentation

FrustumRasterizer ( const FrustumRasterizerSettings settings,
const FrustumRasterizerMask mask = FrustumRasterizerMask(),
util::NullInterrupter interrupt = nullptr 
)
explicit

main constructor

Parameters
settingsthe shared settings for rasterizing, see class for more details
maska spatial mask to use to define the areas of rasterization
interrupta pointer adhering to the util::NullInterrupter interface

Member Function Documentation

void addPoints ( GridConstPtr points)

Append a PointDataGrid to the rasterizer (but don't rasterize yet).

Parameters
pointsthe PointDataGrid
void addPoints ( GridPtr points,
bool  stream = false 
)

Append a PointDataGrid to the rasterizer (but don't rasterize yet).

Parameters
pointsthe non-const PointDataGrid
streamif true, will destructively collapse attributes while accessing so as to minimize the memory footprint.
void clear ( )

Clear all PointDataGrids in the rasterizer.

size_t memUsage ( ) const

Return memory usage of the rasterizer.

GridBase::Ptr rasterizeAttribute ( const Name attribute,
RasterMode  mode = RasterMode::ACCUMULATE,
bool  reduceMemory = false,
float  scale = 1.0f,
const FilterT &  filter = FilterT() 
)
GridT::Ptr rasterizeAttribute ( const Name attribute,
RasterMode  mode = RasterMode::ACCUMULATE,
bool  reduceMemory = false,
float  scale = 1.0f,
const FilterT &  filter = FilterT() 
)
FloatGrid::Ptr rasterizeDensity ( const openvdb::Name attribute,
RasterMode  mode = RasterMode::MAXIMUM,
bool  reduceMemory = false,
float  scale = 1.0f,
const FilterT &  filter = FilterT() 
)
GridT::Ptr rasterizeMask ( bool  reduceMemory = false,
const FilterT &  filter = FilterT() 
)
FloatGrid::Ptr rasterizeUniformDensity ( RasterMode  mode = RasterMode::MAXIMUM,
bool  reduceMemory = false,
float  scale = 1.0f,
const FilterT &  filter = FilterT() 
)
size_t size ( ) const

Return number of PointDataGrids in the rasterizer.