如何在 OpenVDB 中对网格进行下采样
How to downsample grid in OpenVDB
有什么好的方法可以在 OpenVDB 中对体素网格进行下采样吗?
例如,我有 8x8x8 的网格,体素大小为 - 1.0,我想获得 4x4x4 的网格,体素大小为 - 2.0:
each voxel of new grid is some interpolation of original voxels, e. g. [0,0,0] voxel of new grid is average value of [0,0,0]-[1,1,1] (8 voxels) of original grid)
P.S。有办法手动完成,但我敢打赌 openvdb 有自己的实现
我要找的东西是 resampleToMatch
openvdb::FloatGrid::Ptr dest = openvdb::FloatGrid::create();
dest->setTransform( openvdb::math::Transform::createLinearTransform( 2.0f ) ); // org voxel size is 1.0f
openvdb::tools::resampleToMatch<openvdb::tools::BoxSampler>( *org, *dest );
有什么好的方法可以在 OpenVDB 中对体素网格进行下采样吗?
例如,我有 8x8x8 的网格,体素大小为 - 1.0,我想获得 4x4x4 的网格,体素大小为 - 2.0:
each voxel of new grid is some interpolation of original voxels, e. g. [0,0,0] voxel of new grid is average value of [0,0,0]-[1,1,1] (8 voxels) of original grid)
P.S。有办法手动完成,但我敢打赌 openvdb 有自己的实现
我要找的东西是 resampleToMatch
openvdb::FloatGrid::Ptr dest = openvdb::FloatGrid::create();
dest->setTransform( openvdb::math::Transform::createLinearTransform( 2.0f ) ); // org voxel size is 1.0f
openvdb::tools::resampleToMatch<openvdb::tools::BoxSampler>( *org, *dest );