diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2012-05-27 22:45:16 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2012-05-27 22:45:16 +0400 |
commit | 1e13168183361e65e01c7613f094407780d0967e (patch) | |
tree | 3280df668a40b1d1be227bb9338133e3fced26e2 /source | |
parent | d4b6927179e3a6ac5d4d3efa4b0bb8b785dd1822 (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')
-rw-r--r-- | source/blender/blenkernel/intern/smoke.c | 7 |
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; |