Hi,
Following the same setup for OpenCL kernels in the OpenCL node, the generated kernel snippet gives a void * type pointer to the bound VDB. Also, there are no readable/writeable checkboxes in the bindings for VDB type parameters. After searching on this forum and googling for a while, I still couldn't find a feasible way to interact with VDBs in the OpenCL node. Any help is appreciated!
Thanks,
Peter
Manipulating VDBs in OpenCL SOP Node?
2281 3 1- bwu
- Member
- 5 posts
- Joined: Dec. 2020
- Offline
- bwu
- Member
- 5 posts
- Joined: Dec. 2020
- Offline
- Nord3d
- Member
- 9 posts
- Joined: July 2010
- Offline
bwuOnly "CVDBUtil.h" must be included, the other two headers are included in it:
Just found two headers in the ocl/include path:#include "CNanoVDB.h" #include "CVDBUtil.h"
Then a recast to cnanovdb grid:const global cnanovdb_griddata *grid = (const global cnanovdb_griddata *) vdb;
Voila! Now I can use cnanovdb family of functions to read VDBs.
Hope this helps!
#include "CNanoVDB.h" #include "CSampleFromVoxels.h"
https://vimeo.com/477072175 [vimeo.com]
- animatrix_
- Member
- 4703 posts
- Joined: Feb. 2012
- Online
In Houdini 20, OpenCL SOP and Gas OpenCL DOP can write to VDBs;
https://www.sidefx.com/docs/houdini/news/20/vex.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/news/20/vex.html [www.sidefx.com]
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
-
- Quick Links