VolumeToMesh with sharp features reconstruction.

404 views
Skip to first unread message

Jérémie Dumas

unread,
Aug 3, 2019, 3:09:00 PM8/3/19
to OpenVDB Forum
Hi,


During SIGGRAPH's BoF, Ken mentioned that there is a way to call `openvdb::volumeToMesh()` with a reference mesh that can be used to reconstruct sharp features. E.g. when going mesh -> grid -> mesh, that would allow the output mesh to preserve sharp features. However, I looked a bit into the file `tools/VolumeToMesh.h`, but cannot find such a function. There is only a function called `findFeaturePoint()`, which doesn't seem to be used anywhere.

Can someone provide an example of how to use `openvdb::volumeToMesh()` with a reference mesh to preserve sharp features, if that is possible with the current version of OpenVDB?

Thanks!

edward

unread,
Aug 9, 2019, 8:02:57 AM8/9/19
to OpenVDB Forum
Hi Jérémie,

I took a quick look and the full algorithm you're looking for is currently implemented in the Houdini plugins because that's the platform which it was developed on. You can look at the referenceMeshing() method in SOP_OpenVDB_To_Polygons.cc [1] which uses SharpenFeaturesOp found in GeometryUtil.cc [2] from where it calls findFeaturePoint(). The "reference mesh" is provided to VolumeToMesh::setRefGrid() and requires a post-process on the output mesh to preserve the sharp features using additional data computed from the original mesh.

Cheers,
-Edward



Jérémie Dumas

unread,
Aug 9, 2019, 1:47:57 PM8/9/19
to OpenVDB Forum
Ah, thanks for the pointers, I will take a look!
Do you think it would be difficult to extract to use standalone in C++ (without having to build the Houdini plugin)?

edward

unread,
Aug 9, 2019, 6:26:05 PM8/9/19
to OpenVDB Forum
Offhand, I don't think so. It can probably be rewritten to directly take a mesh in the form of a pair of tools::PointList and tools::PolygonPoolList references instead of a GU_Detail. Not too hard to strip out the other code that outputs different point groups and/or attributes.

-Edward

Dan Bailey

unread,
Aug 12, 2019, 8:37:16 PM8/12/19
to OpenVDB Forum
There's quite a lot of logic in the Houdini plugin that should live in the core library. Houdini remains the application with the most comprehensive VDB support and the one we typically develop for which is why this is the case. Aside from the clear benefit of being able to more easily use this functionality elsewhere, it also means we can provide open source unit tests for this functionality. Right now we're relying quite a lot on SideFX's private suite of regression tests.

I believe we did suggest in the BOF that this particular feature was a core library one and as it turns out that this is not the case so apologies for that. Edward's suggestion is the way to go here, but just to acknowledge that this functionality should really be moved up into the core library.

shailesh karandikar

unread,
Jun 21, 2020, 5:02:43 PM6/21/20
to OpenVDB Forum
Hi

This is a useful discussion. Has anyone been able to port sharpen-feature code out of Houdini and convert into a pure open-vdb based version? I think it will be quite useful for the community. ATM, I am working on a 3D printing application for mechanical domain and having outer surface preserve sharp edges is quite critical, especially around circular holes, drafts, etc.

Regards

Reply all
Reply to author
Forward
0 new messages