[Bf-blender-cvs] [c8b4b4c0fa3] master: Fluid: Fixed issue with intial velocities in liquid domains
Sebastián Barschkis
noreply at git.blender.org
Thu Mar 19 00:04:23 CET 2020
Commit: c8b4b4c0fa3b1255a79b90393ee9f5ddb2ec35e9
Author: Sebastián Barschkis
Date: Thu Mar 19 00:03:47 2020 +0100
Branches: master
https://developer.blender.org/rBc8b4b4c0fa3b1255a79b90393ee9f5ddb2ec35e9
Fluid: Fixed issue with intial velocities in liquid domains
The fix for T74762 (bf9c4af9bb74) introduced this issue. Initial velocities were not applied to liquids anymore.
===================================================================
M source/blender/blenkernel/intern/fluid.c
===================================================================
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index dc872b933eb..edb3bc2cd4d 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -1834,7 +1834,6 @@ static void sample_mesh(FluidFlowSettings *mfs,
BVHTreeNearest nearest = {0};
float volume_factor = 0.0f;
- float emission_strength = 0.0f;
hit.index = -1;
hit.dist = PHI_MAX;
@@ -1849,6 +1848,10 @@ static void sample_mesh(FluidFlowSettings *mfs,
bool is_gas_flow = (mfs->type == FLUID_FLOW_TYPE_SMOKE || mfs->type == FLUID_FLOW_TYPE_FIRE ||
mfs->type == FLUID_FLOW_TYPE_SMOKEFIRE);
+ /* Emission strength for gases will be computed below.
+ * For liquids it's not needed. Just set to non zero value to allow initial velocity computation */
+ float emission_strength = (is_gas_flow) ? 0.0f : 1.0f;
+
/* Emission inside the flow object. */
if (is_gas_flow && mfs->volume_density) {
if (BLI_bvhtree_ray_cast(tree_data->tree,
More information about the Bf-blender-cvs
mailing list