[Bf-blender-cvs] [dde516b] fluid-mantaflow: added color code snippet, fixed buoyancy sign, cleaned up standalone mode

Sebastián Barschkis noreply at git.blender.org
Thu Mar 17 19:11:01 CET 2016


Commit: dde516be37565d957c4004fd1e5120a4a0bf486b
Author: Sebastián Barschkis
Date:   Mon Mar 14 07:57:01 2016 +0100
Branches: fluid-mantaflow
https://developer.blender.org/rBdde516be37565d957c4004fd1e5120a4a0bf486b

added color code snippet, fixed buoyancy sign, cleaned up standalone mode

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

M	intern/mantaflow/intern/strings/smoke.h

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

diff --git a/intern/mantaflow/intern/strings/smoke.h b/intern/mantaflow/intern/strings/smoke.h
index ddaea54..f13a98d 100644
--- a/intern/mantaflow/intern/strings/smoke.h
+++ b/intern/mantaflow/intern/strings/smoke.h
@@ -150,6 +150,12 @@ xl_wltnoise.timeAnim = $NOISE_TIMEANIM$\n";
 // ADDITIONAL GRIDS
 //////////////////////////////////////////////////////////////////////
 
+const string set_color_codes = "\n\
+mantaMsg('Setting color codes')\n\
+manta_color_r = $COLOR_R$\n\
+manta_color_g = $COLOR_G$\n\
+manta_color_b = $COLOR_B$\n";
+
 const string alloc_colors_low = "\n\
 mantaMsg('Allocating colors low')\n\
 color_r = s.create(RealGrid)\n\
@@ -220,23 +226,8 @@ import_grids_low()\n\
 if using_wavelets:\n\
   import_grids_high()\n\
 \n\
-for step in range(1000):\n\
-  apply_inflow()\n\
-  \n\
-  mantaMsg('Low step '+ str(step))\n\
-  if using_fire:\n\
-    process_burn_low()\n\
-  step_low()\n\
-  if using_fire:\n\
-    update_flame_low()\n\
-  \n\
-  if using_wavelets:\n\
-    mantaMsg('High step '+ str(step))\n\
-    if using_fire:\n\
-      process_burn_high()\n\
-    step_high()\n\
-    if using_fire:\n\
-      update_flame_high()\n";
+# All low and high res steps\n\
+manta_step()\n";
 
 //////////////////////////////////////////////////////////////////////
 // DESTRUCTION
@@ -402,8 +393,8 @@ def step_low():\n\
   if using_heat:\n\
     mantaMsg('Adding heat buoyancy')\n\
     gravity=vec3(0,0,-1) if dim==3 else vec3(0,-0.0981,0)\n\
-    addBuoyancy(flags=flags, density=density, vel=vel, gravity=gravity, coefficient=$ALPHA$*(-1))\n\
-    addBuoyancy(flags=flags, density=heat, vel=vel, gravity=gravity, coefficient=$BETA$*(-1))\n\
+    addBuoyancy(flags=flags, density=density, vel=vel, gravity=gravity, coefficient=$ALPHA$)\n\
+    addBuoyancy(flags=flags, density=heat, vel=vel, gravity=gravity, coefficient=$BETA$)\n\
   else:\n\
     mantaMsg('Adding buoyancy')\n\
     gravity=vec3(0,0,-0.01 * $ALPHA$) if dim==3 else vec3(0,-0.01* $ALPHA$,0)\n\
@@ -426,8 +417,6 @@ def step_low():\n\
   # TODO: addForceField(flags=flags, vel=vel, force=forces)\n\
   # TODO: forces.clear()\n\
   copyMacToReal(source=vel, targetX=x_vel, targetY=y_vel, targetZ=z_vel)\n\
-  # --> removing solver step for now from here \n\
-  # s.step()\n\
 \n\
 def process_burn_low():\n\
   mantaMsg('Process burn low')\n\
@@ -473,9 +462,6 @@ def step_high():\n\
     \n\
     mantaMsg('Advecting density high')\n\
     advectSemiLagrange(flags=xl_flags, vel=xl_vel, grid=xl_density, order=$ADVECT_ORDER$, openBounds=doOpen)\n\
-  \n\
-  # --> removing solver step for now from here\n\
-  # xl.step()\n\
 \n\
 def process_burn_high():\n\
   mantaMsg('Process burn high')\n\




More information about the Bf-blender-cvs mailing list