Enzo Crema
ZephirFX
About Me
Software Engineer,
Houdini Technical Artist &
Graphics Programming Enthusiast :)
EXPERTISE
Developer
INDUSTRY
Education | Film/TV
Connect
LOCATION
Dublin,
Ireland
WEBSITE
Houdini Skills
ADVANCED
Procedural Modeling | Environments | Digital Assets | Pyro FX | Fluids
INTERMEDIATE
Solaris | Mantra | Karma | Realtime FX | PDG | VEX | Python
BEGINNER
Character Rigging | Motion Editing | Animation | Hair & Fur | Cloth | Crowds | Muscles | Lighting | Destruction FX
Availability
I am currently a student at Griffith College Dublin
Recent Forum Posts
[HDK] Create a NanoVDB grid using a Cuda Device Buffer ? Dec. 13, 2024, 1:43 p.m.
w1755396536Hey, yes I solved it.
Hello, have you solved it? I also encountered the same problem.
Make sure your CMakeLists.txt includes :
project(XXX LANGUAGES CXX CUDA) # ------- Find CUDA ----------- find_package(CUDAToolkit REQUIRED) string(APPEND CMAKE_CUDA_FLAGS " --extended-lambda") set(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE OFF) set(BUILD_SHARED_LIBS ON) add_subdirectory(src/Cuda) # ------- End CUDA -----------
Then in your .cpp / .cu file make sure you have :
#define NANOVDB_USE_OPENVDB #include <NanoVDB.h> #include <nanovdb/util/CreateNanoGrids.h> nanovdb::GridHandle<nanovdb::CudaDeviceBuffer> handle = nanovdb::CreateNanoGrid(*grid); //grid is a pointer to a openvdb grid
[HDK] Building NanoVDB grids in Houdini Sept. 4, 2024, 7:24 p.m.
Oh cool I didn't look hard enough at fvdb
The problem isn't really traversal and memory efficiency, the problem is how to convert a NanoVDB grid back into OpenVDB since Houdini can only build openvdb::Grid<T> types.
I just managed to find a solution 20x faster than the NanoToOpen function :p this will do the work for now but i'll look more into fvdb to see if there's interesting stuff.
the commit if anyone wants to dive in : https://github.com/ZephirFXEC/HNanoSolver/commit/edc5d009c9575cb3089f73dab4edc4fc55996309 [github.com]
The problem isn't really traversal and memory efficiency, the problem is how to convert a NanoVDB grid back into OpenVDB since Houdini can only build openvdb::Grid<T> types.
I just managed to find a solution 20x faster than the NanoToOpen function :p this will do the work for now but i'll look more into fvdb to see if there's interesting stuff.
the commit if anyone wants to dive in : https://github.com/ZephirFXEC/HNanoSolver/commit/edc5d009c9575cb3089f73dab4edc4fc55996309 [github.com]
[HDK] Building NanoVDB grids in Houdini Sept. 4, 2024, 6:56 p.m.
PHENOMDESIGN
here are some branches on the OpenVDB github that could help. I believe one is specifically dynamic (they call it adaptive) and the fVDB which would be the new version of the GVDB. Both are branches off the main OpenVDB github.
I saw those but the adaptive openvdb branch is CPU based so unusable in my case and fvdb is python based and i'm kind of a python hater . No but i'd need to do some test as i'm really not as comfortable in python as I am in cpp.
PHENOMDESIGN
As far as transfer, have the grids already built and read/stream with text or json. I saw this in a thread in python but I definitely know you can do this in C++. So you are just transferring string data which should be super-fast.
Yes i'm not using strings as it is very inefficient but I'm traversing the tree on gpu and keeping track of active voxels and the value. Then I loop over those pair on the Host to build the grid.