Analyze 3D objects by Voxels

333 Views Asked by At

I plan to use OpenVDB to analyze 3D objects/meshes. The objective is:

  • To detect object surface regions with a certain criterion, like slope
  • Then manipulate those regions
  • The manipulation might be adding other 3D objects to those regions, for example

Teapot model

OpenVDB has some tools available:

  1. Conversion Tools
  2. Filters
  3. Topological Operations
  4. Level Set Tools
  5. Morphological Operations
  6. Geometric Transforms
  7. Compositing Tools
  8. ...

It is a large set of confusing tools to choose from. Does anybody with OpenVDB experience know:

  1. Is OpenVDB the proper library to achieve my objective
  2. If so, which OpenVDB tool best suits my needs
1

There are 1 best solutions below

0
On BEST ANSWER

Answer provided by OpenVDB community:

An important question is what you mean by "3D objects/meshes."

OpenVDB is very good at performing those regions with surfaces by representing them as signed distance fields. But the word "mesh" raises some alarm bells that you may want to maintain topology. In this case another library may be more effective.

It also sounds like you have a problem domain you are trying to explore. For that, I would not go straight to code but instead explore solutions using 3d applications first. My own biased first choice would be Houdini, whose apprentice version you can get for free. This provides most of the VDB code as separate nodes. So, for example, you can use a File SOP to load a mesh from disk, a VDB From Polygons to convert it to a Signed Distance FIeld, and then VDB Analysis to compute the Gradient. The gradient I think matches what you are looking for as slope, but it is also possible you are looking for curvature...

To return to mesh land, you can use a VDB Convert. Finally a ROP Geometry can save it out.

Attached is a file showing a network to compute an approximate Y-slope as a volume, apply it back to a mesh, and save to disk.

Attached file