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:
authorDaniel Genrich <daniel.genrich@gmx.net>2012-05-27 22:45:16 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2012-05-27 22:45:16 +0400
commit1e13168183361e65e01c7613f094407780d0967e (patch)
tree3280df668a40b1d1be227bb9338133e3fced26e2 /source/blender/blenkernel/intern/smoke.c
parentd4b6927179e3a6ac5d4d3efa4b0bb8b785dd1822 (diff)
Smoke:
a) Another boundary fix. Resulted in smoke getting "sucked" back into the domain b) Disabling substeps (internal thing). Fixes arbitrary explosions/instabilities. Part of my Blender Smoke Development.
Diffstat (limited to 'source/blender/blenkernel/intern/smoke.c')
-rw-r--r--source/blender/blenkernel/intern/smoke.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index edb4348dc5a..ce739a00bb4 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -1592,8 +1592,8 @@ static void step(Scene *scene, Object *ob, SmokeModifierData *smd, float fps)
/* adapt timestep for different framerates, dt = 0.1 is at 25fps */
dt *= (25.0f / fps);
- // maximum timestep/"CFL" constraint: dt < dx * maxVel
- maxVel = (sds->dx * 1.0);
+ // maximum timestep/"CFL" constraint: dt < 5.0 *dx / maxVel
+ maxVel = (sds->dx * 5.0);
for(i = 0; i < size; i++)
{
@@ -1607,7 +1607,8 @@ static void step(Scene *scene, Object *ob, SmokeModifierData *smd, float fps)
totalSubsteps = (totalSubsteps < 1) ? 1 : totalSubsteps;
totalSubsteps = (totalSubsteps > maxSubSteps) ? maxSubSteps : totalSubsteps;
- // totalSubsteps = 2.0f; // DEBUG
+ /* Disable substeps for now, since it results in numerical instability */
+ totalSubsteps = 1.0f;
dtSubdiv = (float)dt / (float)totalSubsteps;