From 3df90de6c2268bef91d3754f71c7404cfbeeac90 Mon Sep 17 00:00:00 2001 From: Patrick Mours Date: Fri, 2 Oct 2020 17:40:28 +0200 Subject: Cycles: Add NanoVDB support for rendering volumes NanoVDB is a platform-independent sparse volume data structure that makes it possible to use OpenVDB volumes on the GPU. This patch uses it for volume rendering in Cycles, replacing the previous usage of dense 3D textures. Since it has a big impact on memory usage and performance and changes the OpenVDB branch used for the rest of Blender as well, this is not enabled by default yet, which will happen only after 2.82 was branched off. To enable it, build both dependencies and Blender itself with the "WITH_NANOVDB" CMake option. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8794 --- intern/cycles/render/image_vdb.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'intern/cycles/render/image_vdb.h') diff --git a/intern/cycles/render/image_vdb.h b/intern/cycles/render/image_vdb.h index 4500cfbfb88..71d10cc39f5 100644 --- a/intern/cycles/render/image_vdb.h +++ b/intern/cycles/render/image_vdb.h @@ -20,6 +20,9 @@ #ifdef WITH_OPENVDB # include #endif +#ifdef WITH_NANOVDB +# include +#endif #include "render/image.h" @@ -55,6 +58,9 @@ class VDBImageLoader : public ImageLoader { openvdb::GridBase::ConstPtr grid; openvdb::CoordBBox bbox; #endif +#ifdef WITH_NANOVDB + nanovdb::GridHandle<> nanogrid; +#endif }; CCL_NAMESPACE_END -- cgit v1.2.3