Ideal representation for 3D point clouds with multiple fields #1433
Replies: 2 comments 1 reply
-
Hi Yoshua Nava, This is a great question. I'll do my best to answer but I'm sure other members of the TSC will have thoughts on this too. My TL;DR would be to, for dynamic point cloud representation, use
These two methods are extremely similar. Creation/deletion would be relative to the ValueType you end up choosing. So long as the type is trivially copyable the data can be represented efficiently (see As well as having all element data available on request, using a single topology would also allow you to write algorithms which could benefit from subsequent accesses using VDB's ValueAccessor. If you write two or more "disjoint" algorithms then there is little benefit to this data living together. For example if you need to process 'occupancy' on all points before processing 'curvature', then whether this data lives in a single consolidated structure won't have much of an impact. Another thing to think about is whether or not you need serialization support for this data or if it's only required as a temporary in-memory representation (i.e. [read custom data in]->[transform to vdb]->[process]->[back to custom format]->[write]). If you're reading and writing it as VDB data you may benefit from Delay Load support. This is where leaf data is de-serialized on buffer accesses, not on file read. If you only need to read portions of your data set or if you only need to read specific attributes then storing all this data in one type may not be ideal as all data that corresponds to a particular leaf node would need to be read from disk. Regarding using existing VDB algorithms with custom data types; it's very much dependent on the type of operation you'd want to run. It is possible to, say, run a level set utility on a custom type - but it would require your type to define various operations. These operations may also not be valid with other VDB algorithms. Whether you use a custom type or use an existing VDB type doesn't really change this as I doubt your data will have a semantic meaning as a VDB type. That is, you'd still have to define how your data is interpreted between different VDB tools. These methods can be compared directly to the multiple FloatGrid solution; if you're writing a bunch of mega-tools which need all point data, and the data can be represented as a trivial type, then it may be worth using a custom type. There is little benefit to using an existing VDB type as far as utilizing existing VDB algorithms go, unless your data makes sense in the context of the VDB type you use. The main thing using an existing VDB type would give you is native serialization support in other applications that read VDB files.
The main trade off here are the duplicate topology and inability to share ValueAccessor caches. You would however benefit from being able to individually de/serialize data if that was important to you. It very much depends on the type of algorithms you want to run and whether you're running them across the entire data structure. This would lend itself far nicer to using existing VDB tooling. If you choose either the above or this technique, my advise would be to start off with multiple grids and see what kind of performance/usability you get. You should find it easier to implement your tools and use existing methods with this method and can switch if you think it's necessary. You can currently only store a single
I think conceptually this is the way to go. I'm not entirely sure how you plan to represent 3D point information in a numerical VDB without discretizing it or without using dynamic data per leaf. Using PointData/PointIndex Grids would allow you to store any number of 3D point information per leaf without the need to worry about discretizing it. With In terms of voxel storage, both
You could also use You can't currently go directly from a Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
@Idclip thank you very much for your thorough reply. I'm reading through it in full detail 🙂 |
Beta Was this translation helpful? Give feedback.
-
Hi,
Thanks for this awesome library.
Im planning to use OpenVDB for 3D mapping. For that, I need to represent 3D points, normals (always expected, at the point, and leaf node levels) and optional multi-dimensional fields (e.g. occupancy, signed distance, local curvature, Color, etc). I would also like to use standard VDB tools to perform filtering, ray casting, and meshing.
After reading through the documentation, GitHub issues/discussions and Google forum threads I found at least 4 suggested approaches to represent point cloud data:
I wanted to ask for your feedback on this matter. There is no direct comparison between the approaches cited above, and I think there is high potential for VDB to deliver value to 3D mapping.
Best regards,
Yoshua Nava
Beta Was this translation helpful? Give feedback.
All reactions