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
path: root/intern
diff options
context:
space:
mode:
authorSebastián Barschkis <sebbas@sebbas.org>2020-04-27 14:22:47 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2020-04-30 16:42:44 +0300
commit4d63dfca4c63a3a0d159050bebd2ac05b3408838 (patch)
tree1ed3dcf6a33d13060c1f7b49ab28d7404aab4262 /intern
parent6121c28501eff722717fb8b777f6004fb6d4e152 (diff)
Fluid: Reset noise emission value at the beginning of an adaptive frame
Emission values should not accumulate beyond one frame, only during the adaptive steps of one frame.
Diffstat (limited to 'intern')
-rw-r--r--intern/mantaflow/intern/strings/smoke_script.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/mantaflow/intern/strings/smoke_script.h b/intern/mantaflow/intern/strings/smoke_script.h
index 146106fd147..fdb58543cec 100644
--- a/intern/mantaflow/intern/strings/smoke_script.h
+++ b/intern/mantaflow/intern/strings/smoke_script.h
@@ -302,6 +302,9 @@ def smoke_adaptive_step_$ID$(framenr):\n\
setObstacleFlags(flags=flags_s$ID$, phiObs=phiObs_s$ID$, phiOut=phiOut_s$ID$, phiIn=phiIn_s$ID$, boundaryWidth=1)\n\
flags_s$ID$.fillGrid()\n\
\n\
+ # reset emission accumulation at the beginning of an adaptive frame\n\
+ if not s$ID$.timePerFrame:\n\
+ emission_s$ID$.setConst(0.)\n\
# accumulate emission value per adaptive step for later use in noise computation\n\
emission_s$ID$.join(emissionIn_s$ID$)\n\
\n\