Enzo Crema

ZephirFX

About Me

Software Engineer, Houdini Technical Artist & Graphics Programming Enthusiast :)
専門知識
Developer
業界:
Education  | Film/TV

Connect

LOCATION
Dublin, Ireland
ウェブサイト

Houdini Engine

ADVANCED
プロシージャルワークフロー  | Environments  | Digital Assets  | Pyro FX  | Fluids
INTERMEDIATE
Solaris  | Mantra  | Karma  | Realtime FX  | PDG  | VEX  | Python
BEGINNER
キャラクタ & アニメーション  | Motion Editing  | Animation  | Hair & Fur  | Cloth  | Crowds  | Muscles  | Lighting  | 説明

Availability

I am currently a student at Griffith College Dublin

Recent Forum Posts

[HDK] Create a NanoVDB grid using a Cuda Device Buffer ? 2024年12月13日13:43

w1755396536
Hello, have you solved it? I also encountered the same problem.
Hey, yes I solved it.
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 2024年9月4日19:24

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]

[HDK] Building NanoVDB grids in Houdini 2024年9月4日18:56

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.