Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Dietrich <kevindietrich>2020-08-11 18:34:34 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-08-12 12:52:12 +0300
commit9280fb19e4ff5038734d9867d152c10d4daf03bb (patch)
treed33161bd823ee98d2db2f9ce296e60bf00b85b84 /intern/cycles/render/image_vdb.cpp
parentda95fa8344445814ed46a4346d8cbd22186b20cb (diff)
Fixes T77882: artifacts rendering OpenVDB volumes with multiple grids in Cycles
The previous algorithm was not using all of the requested grids to build a mesh around the volume due to limitations regarding the use of a dense buffer to gather information about the volume's topology. This resulted in artefacts during rendering. The mesh generation is now done by merging all of the input grids and using the resulting grid's topology to create the mesh. The generation of the mesh is still done in index space as before, and the vertices are converted to object space by using the merged topology grid indexToWorld transform. To be able to merge the grids together we have to make sure that their transformation matrices and their index spaces match, thus, if they do not match we simply resample the grids. This behaviour should tackle one other limitation of the current algorithm, which is that only one transformation matrix was used to generate the final mesh. If we do not have an OpenVDB grid for the requested volume data, we generate a temporary OpenVDB grid for it. Differential Revision: https://developer.blender.org/D8401
Diffstat (limited to 'intern/cycles/render/image_vdb.cpp')
-rw-r--r--intern/cycles/render/image_vdb.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/intern/cycles/render/image_vdb.cpp b/intern/cycles/render/image_vdb.cpp
index 500131c2d84..3f7dd45ee88 100644
--- a/intern/cycles/render/image_vdb.cpp
+++ b/intern/cycles/render/image_vdb.cpp
@@ -185,4 +185,16 @@ void VDBImageLoader::cleanup()
#endif
}
+bool VDBImageLoader::is_vdb_loader() const
+{
+ return true;
+}
+
+#ifdef WITH_OPENVDB
+openvdb::GridBase::ConstPtr VDBImageLoader::get_grid()
+{
+ return grid;
+}
+#endif
+
CCL_NAMESPACE_END