diff options
author | Miika Hamalainen <blender@miikah.org> | 2013-05-21 23:20:48 +0400 |
---|---|---|
committer | Miika Hamalainen <blender@miikah.org> | 2013-05-21 23:20:48 +0400 |
commit | 2345f0ee994719f13b74d94331d62b7c7a35e9a2 (patch) | |
tree | 719a87c8e9ffb2fb42b2638558878df15740ffa3 /intern | |
parent | a8ec403d72030a2a568f358d4e16bc9bef31c827 (diff) |
Fix: Smoke simulations of very high resolutions often produced weird results, as if smoke was colliding in an invisible wall.
This was caused by a "hack" Daniel Genrich introduced in his moving obstacles commit in r46050. I suppose it was originally added to prevent issues with too fast moving obstacles, but now it ended up limiting maximum velocity of higher resolution simulations.
Here is an comparision of 184 resolution simulation (simulation area limited by adaptive domain):
https://www.miikah.org/blender/smoke_with_pressure_limit_hack.png
https://www.miikah.org/blender/smoke_without_pressure_limit_hack.png
I now reverted that hack until a better solution is found. Daniel, can you check this out? Pressure was limited to maximum of dt * dx (= dt / res) which doesn't make sense to limit pressure based on grid resolution. Maybe better to limit with a constant factor instead?
Diffstat (limited to 'intern')
-rw-r--r-- | intern/smoke/intern/FLUID_3D.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/smoke/intern/FLUID_3D.cpp b/intern/smoke/intern/FLUID_3D.cpp index 85d6a7a16b5..780a39e9e1b 100644 --- a/intern/smoke/intern/FLUID_3D.cpp +++ b/intern/smoke/intern/FLUID_3D.cpp @@ -1030,10 +1030,10 @@ void FLUID_3D::project() maxvalue = _pressure[i]; /* HACK: Animated collision object sometimes result in a non converging solvePressurePre() */ - if(_pressure[i] > _dx * _dt) + /*if(_pressure[i] > _dx * _dt) _pressure[i] = _dx * _dt; else if(_pressure[i] < -_dx * _dt) - _pressure[i] = -_dx * _dt; + _pressure[i] = -_dx * _dt;*/ // if(_obstacle[i] && _pressure[i] != 0.0) // printf("BAD PRESSURE i\n"); |