[Bf-blender-cvs] [1ad5aef63a] fluid-mantaflow: setting obstacle velocities
Sebastián Barschkis
noreply at git.blender.org
Tue Mar 7 01:26:37 CET 2017
Commit: 1ad5aef63a712a52d94c1d3fcc40f0b4af211bc2
Author: Sebastián Barschkis
Date: Tue Feb 28 02:33:29 2017 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB1ad5aef63a712a52d94c1d3fcc40f0b4af211bc2
setting obstacle velocities
for now we're doing this before advection. TODO: check if maybe doing this after pressure solve as in original code
===================================================================
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 b8142ffe93..e1c2daca6c 100644
--- a/intern/mantaflow/intern/strings/smoke_script.h
+++ b/intern/mantaflow/intern/strings/smoke_script.h
@@ -273,6 +273,12 @@ def step_low():\n\
clearInObstacle(flags=flags, grid=color_g)\n\
clearInObstacle(flags=flags, grid=color_b)\n\
\n\
+ mantaMsg('Adding object velocity')\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\
+ \n\
mantaMsg('Advecting density')\n\
advectSemiLagrange(flags=flags, vel=vel, grid=density, order=$ADVECT_ORDER$)\n\
\n\
More information about the Bf-blender-cvs
mailing list