From 2345f0ee994719f13b74d94331d62b7c7a35e9a2 Mon Sep 17 00:00:00 2001 From: Miika Hamalainen Date: Tue, 21 May 2013 19:20:48 +0000 Subject: 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? --- intern/smoke/intern/FLUID_3D.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'intern') 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"); -- cgit v1.2.3