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 <kevin.dietrich@mailoo.org>2018-02-22 18:26:50 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2018-02-24 15:37:58 +0300
commit4403ca80bda690c0ac44e4a6db0cddf4b2428006 (patch)
tree3a68b34c75f4f831840403950b4bde7f4ad938ce /intern/openvdb/openvdb_capi.cc
parent6d8a4c10b65c45b2bcc2eca7779cc541af0562fb (diff)
Smoke: expose empty space clipping property to the UI.
This is used to determine which voxels are to be considered empty space. Previously it was hardcoded for converting dense grids to OpenVDB grids to reduce disk space usage. This value is also useful for rendering engines to know, i.e. to optimize ray marching.
Diffstat (limited to 'intern/openvdb/openvdb_capi.cc')
-rw-r--r--intern/openvdb/openvdb_capi.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/intern/openvdb/openvdb_capi.cc b/intern/openvdb/openvdb_capi.cc
index ef4f8c8820f..1c8b51a23c4 100644
--- a/intern/openvdb/openvdb_capi.cc
+++ b/intern/openvdb/openvdb_capi.cc
@@ -39,7 +39,7 @@ int OpenVDB_getVersionHex()
OpenVDBFloatGrid *OpenVDB_export_grid_fl(
OpenVDBWriter *writer,
const char *name, float *data,
- const int res[3], float matrix[4][4],
+ const int res[3], float matrix[4][4], const float clipping,
OpenVDBFloatGrid *mask)
{
Timer(__func__);
@@ -53,6 +53,7 @@ OpenVDBFloatGrid *OpenVDB_export_grid_fl(
data,
res,
matrix,
+ clipping,
mask_grid);
return reinterpret_cast<OpenVDBFloatGrid *>(grid);
@@ -61,7 +62,7 @@ OpenVDBFloatGrid *OpenVDB_export_grid_fl(
OpenVDBIntGrid *OpenVDB_export_grid_ch(
OpenVDBWriter *writer,
const char *name, unsigned char *data,
- const int res[3], float matrix[4][4],
+ const int res[3], float matrix[4][4], const float clipping,
OpenVDBFloatGrid *mask)
{
Timer(__func__);
@@ -76,17 +77,17 @@ OpenVDBIntGrid *OpenVDB_export_grid_ch(
data,
res,
matrix,
+ clipping,
mask_grid);
return reinterpret_cast<OpenVDBIntGrid *>(grid);
}
-OpenVDBVectorGrid *OpenVDB_export_grid_vec(
- struct OpenVDBWriter *writer,
- const char *name,
- const float *data_x, const float *data_y, const float *data_z,
- const int res[3], float matrix[4][4], short vec_type,
- const bool is_color, OpenVDBFloatGrid *mask)
+OpenVDBVectorGrid *OpenVDB_export_grid_vec(struct OpenVDBWriter *writer,
+ const char *name,
+ const float *data_x, const float *data_y, const float *data_z,
+ const int res[3], float matrix[4][4], short vec_type, const float clipping,
+ const bool is_color, OpenVDBFloatGrid *mask)
{
Timer(__func__);
@@ -105,6 +106,7 @@ OpenVDBVectorGrid *OpenVDB_export_grid_vec(
matrix,
static_cast<VecType>(vec_type),
is_color,
+ clipping,
mask_grid);
return reinterpret_cast<OpenVDBVectorGrid *>(grid);