-
New Feature
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
Writing to the position attribute of a VDB Points grid with a fixed-point codec ensures that the value is clamped between the -0.5 => 0.5 range, however this clamping doesn't get applied for a null codec. This means there's some ambiguity as to whether the data in one of these position attributes might contain world-space or voxel-space data as the user can write whatever they like to this attribute.
There are two possible solutions I see to this:
- We use a new codec that applies the clamping - TypedAttributeArray<Vec3f, VoxelSpaceCodec> and implicitly indicates that it's in voxel-space. (The Convert VDB Points SOP and VDB Scatter SOPs would be updated to use this codec).
- We add a flag to the AttributeArray to mark that it's in world-space and otherwise default to using voxel-space for the "P" attribute.
The first one feels like the cleanest solution, but there's a question as to what will happen with existing grids that might be using a NullCodec as they'll now be interpreted as not being in voxel-space.