[Bf-blender-cvs] [74e07a644a] fluid-mantaflow: extrapolate obvels outside of obstacle and set them afterwards with option for borderWidth

Sebastián Barschkis noreply at git.blender.org
Tue Mar 7 01:26:38 CET 2017


Commit: 74e07a644adcb85ebce6387a0520fc6597130503
Author: Sebastián Barschkis
Date:   Tue Feb 28 02:34:14 2017 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB74e07a644adcb85ebce6387a0520fc6597130503

extrapolate obvels outside of obstacle and set them afterwards with option for borderWidth

===================================================================

M	intern/mantaflow/intern/strings/smoke_script.h

===================================================================

diff --git a/intern/mantaflow/intern/strings/smoke_script.h b/intern/mantaflow/intern/strings/smoke_script.h
index e1c2daca6c..9909122306 100644
--- a/intern/mantaflow/intern/strings/smoke_script.h
+++ b/intern/mantaflow/intern/strings/smoke_script.h
@@ -59,7 +59,8 @@ using_colors    = $USING_COLORS$\n\
 using_heat      = $USING_HEAT$\n\
 using_fire      = $USING_FIRE$\n\
 using_highres   = $USING_HIGHRES$\n\
-vorticity       = $VORTICITY$\n";
+vorticity       = $VORTICITY$\n\
+obvel_border    = 2\n";
 
 const std::string smoke_variables_high = "\n\
 mantaMsg('Smoke variables high')\n\
@@ -277,7 +278,8 @@ def step_low():\n\
     averageGrid(grid=obvel, num=numObs)\n\
     # ensure velocities inside of obs object, slightly add obvels outside of obs object\n\
     extrapolateVec3Simple(vel=obvel, phi=phiObsIn, distance=res/2, inside=True)\n\
-    setObstacleVelocity(flags=flags, vel=vel, obvel=obvel)\n\
+    extrapolateVec3Simple(vel=obvel, phi=phiObsIn, distance=obvel_border, inside=False)\n\
+    setObstacleVelocity(flags=flags, vel=vel, obvel=obvel, borderWidth=obvel_border-1)\n\
     \n\
     mantaMsg('Advecting density')\n\
     advectSemiLagrange(flags=flags, vel=vel, grid=density, order=$ADVECT_ORDER$)\n\




More information about the Bf-blender-cvs mailing list