[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56952] trunk/blender/intern/smoke/intern/ FLUID_3D.cpp: Fix: Smoke simulations of very high resolutions often produced weird results, as if smoke was colliding in an invisible wall.

Miika Hamalainen blender at miikah.org
Tue May 21 21:20:48 CEST 2013


Revision: 56952
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56952
Author:   miikah
Date:     2013-05-21 19:20:48 +0000 (Tue, 21 May 2013)
Log Message:
-----------
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?

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46050

Modified Paths:
--------------
    trunk/blender/intern/smoke/intern/FLUID_3D.cpp

Modified: trunk/blender/intern/smoke/intern/FLUID_3D.cpp
===================================================================
--- trunk/blender/intern/smoke/intern/FLUID_3D.cpp	2013-05-21 18:59:46 UTC (rev 56951)
+++ trunk/blender/intern/smoke/intern/FLUID_3D.cpp	2013-05-21 19:20:48 UTC (rev 56952)
@@ -1030,10 +1030,10 @@
 				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");




More information about the Bf-blender-cvs mailing list