diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2012-05-24 22:22:36 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2012-05-24 22:22:36 +0400 |
commit | 8042c52fb6460cecbf4e8d580f21e8a2d759687e (patch) | |
tree | ff8de1060b6e156ba3eaa638a5376bab5e820db1 /source/blender | |
parent | da710b3e14e75db10f336009a9d32c187c632042 (diff) |
Smoke: Fix wrong maximum timestep, resulting in exploding/unstable fluids.
Part of my Smoke Development project.
In conjunction with MiikaH and his gSoC project.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/smoke.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 51183511454..06f98b0e840 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -1598,8 +1598,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); - // printf("test maxVel: %f\n", (sds->dx * 1.5) / dt); // gives 0.9 - maxVel = (sds->dx * 1.5); + // maximum timestep/"CFL" constraint: dt < dx * maxVel + maxVel = (sds->dx * 1.0); for(i = 0; i < size; i++) { |