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:
authorSebastián Barschkis <sebbas@sebbas.org>2020-02-14 16:21:58 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2020-02-14 16:22:36 +0300
commitd6d44ccc7786e36d9453a8e24cdc89f159bdd4ab (patch)
tree20479b49f719e186ac0c4d5d4d2e05d55807fcb2 /source/blender/blenkernel/intern/fluid.c
parent5ba727861db2603fe1ca9857b7f140a1271807ef (diff)
Fluid: Inflow object improvements
Various fixes for smoke / fire flow objects: - Apply inflow at every subframe (new: also emit during adaptive steps in between frames) - Fix issue with fire not being emitted on first frame - Higher value range for smoke flow density variable
Diffstat (limited to 'source/blender/blenkernel/intern/fluid.c')
-rw-r--r--source/blender/blenkernel/intern/fluid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 6cf748d6a7f..1d44604384a 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -2283,8 +2283,8 @@ BLI_INLINE void apply_inflow_fields(FluidFlowSettings *mfs,
/* Instead of using 1.0 for all new fuel add slight falloff to reduce flow blocky-ness. */
float value = 1.0f - pow2f(1.0f - emission_value);
- if (fuel[index] > FLT_EPSILON && value > react[index]) {
- float f = fuel_flow / fuel[index];
+ if (fuel_in[index] > FLT_EPSILON && value >= react[index]) {
+ float f = fuel_flow / fuel_in[index];
react_in[index] = value * f + (1.0f - f) * react[index];
CLAMP(react_in[index], 0.0f, value);
}