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>2016-09-24 22:41:16 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2016-09-24 23:21:02 +0300
commit4446acbf17748f30b163016cfc4b88bba8653517 (patch)
tree95529532e9be510c3eb6605aac0d5876239ac490 /source/blender/blenkernel/intern/smoke.c
parenta070a5befa1110120547333d84c6e67cae53d648 (diff)
Viewport smoke: add support for axis aligned slicing.
Current approach uses view aligned slicing to generate polygons for GL texturing such that the generated polygons are always facing the view plane. Now it is also possible to use object aligned slicing, which creates polygons by slicing the object perpendicular to whichever axis is facing the most the view plane. It is also possible to create a single slice for inspecting the volume, or for 2D rendering effects. Settings for this, along with a density multiplier setting, are to be found in a newly added "Smoke Display Settings" panel in the smoke domain properties tab. Reviewers: plasmasolutions, gottfried Differential Revision: https://developer.blender.org/D1733
Diffstat (limited to 'source/blender/blenkernel/intern/smoke.c')
-rw-r--r--source/blender/blenkernel/intern/smoke.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index f622d541f3a..d0f546e9bef 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -536,6 +536,13 @@ void smokeModifier_createType(struct SmokeModifierData *smd)
#endif
smd->domain->data_depth = 0;
smd->domain->cache_file_format = PTCACHE_FILE_PTCACHE;
+
+ smd->domain->display_thickness = 1.0f;
+ smd->domain->slice_method = MOD_SMOKE_SLICE_VIEW_ALIGNED;
+ smd->domain->axis_slice_method = AXIS_SLICE_FULL;
+ smd->domain->slice_per_voxel = 5.0f;
+ smd->domain->slice_depth = 0.5f;
+ smd->domain->slice_axis = 0;
}
else if (smd->type & MOD_SMOKE_TYPE_FLOW)
{
@@ -629,6 +636,12 @@ void smokeModifier_copy(struct SmokeModifierData *smd, struct SmokeModifierData
tsmd->domain->openvdb_comp = smd->domain->openvdb_comp;
tsmd->domain->data_depth = smd->domain->data_depth;
tsmd->domain->cache_file_format = smd->domain->cache_file_format;
+
+ tsmd->domain->slice_method = smd->domain->slice_method;
+ tsmd->domain->axis_slice_method = smd->domain->axis_slice_method;
+ tsmd->domain->slice_per_voxel = smd->domain->slice_per_voxel;
+ tsmd->domain->slice_depth = smd->domain->slice_depth;
+ tsmd->domain->slice_axis = smd->domain->slice_axis;
}
else if (tsmd->flow) {
tsmd->flow->psys = smd->flow->psys;