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.h
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.h')
-rw-r--r--intern/cycles/render/image_vdb.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/intern/cycles/render/image_vdb.h b/intern/cycles/render/image_vdb.h
index 7dec63b11e6..4500cfbfb88 100644
--- a/intern/cycles/render/image_vdb.h
+++ b/intern/cycles/render/image_vdb.h
@@ -43,6 +43,12 @@ class VDBImageLoader : public ImageLoader {
virtual void cleanup() override;
+ virtual bool is_vdb_loader() const override;
+
+#ifdef WITH_OPENVDB
+ openvdb::GridBase::ConstPtr get_grid();
+#endif
+
protected:
string grid_name;
#ifdef WITH_OPENVDB