Bypass Points position attribute

80 views
Skip to first unread message

Austin Facey

unread,
Nov 2, 2021, 6:23:09 AM11/2/21
to OpenVDB Forum
Where is the default "p" attribute instantiated? I have a fluidsim algorithm that would normally use a SOA approach to position with xy&z separated from each other due to simd reasons. I do not use a deformer to move my points currently and I have a simple custom BuildMoveMapsOp implementation that allows me to move my points using these separate xyz attributes but I would like to forgo the ram cost of the default position attribute hanging in the background.

Thanks! 

Dan Bailey

unread,
Nov 10, 2021, 7:12:49 PM11/10/21
to OpenVDB Forum
Hi Austin,

Position is a mandatory attribute, so you wouldn't be able to remove it. However, when you first create the points grid, it will be set to a uniform zero value per-leaf by default which will use very minimal memory. If you're converting from an existing data set, you can also explicitly "drop" the values of a position attribute by calling attribute.collapse() which will set it back to a uniform zero value again.

Regarding BuildMoveMapsOp, I'm happy you've been able to create your own custom implementation, but just to note that I've been working on a much improved implementation of point moving that is based around the PointPartitioner to extend functionality to transforming and merging multiple point grids which I hope to share at some point. 

Cheers,
Reply all
Reply to author
Forward
0 new messages