[Bf-blender-cvs] [a4b48c95d9a] fluid-mantaflow: interpolating phi later in step
Sebastián Barschkis
noreply at git.blender.org
Sat May 27 22:53:59 CEST 2017
Commit: a4b48c95d9a61485398c8cd81c1d4d00fc2c8b07
Author: Sebastián Barschkis
Date: Fri Apr 14 00:36:29 2017 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rBa4b48c95d9a61485398c8cd81c1d4d00fc2c8b07
interpolating phi later in step
interpolation needs to come later to avoid weird mesh resizing in first frames (occurred between frame 1 and 2)
===================================================================
M intern/mantaflow/intern/strings/liquid_script.h
===================================================================
diff --git a/intern/mantaflow/intern/strings/liquid_script.h b/intern/mantaflow/intern/strings/liquid_script.h
index 4b6e3643872..6a8e8744315 100644
--- a/intern/mantaflow/intern/strings/liquid_script.h
+++ b/intern/mantaflow/intern/strings/liquid_script.h
@@ -211,10 +211,6 @@ def liquid_step_$ID$():\n\
mantaMsg('Advecting velocity')\n\
advectSemiLagrange(flags=flags_s$ID$, vel=vel_s$ID$, grid=vel_s$ID$, order=2, openBounds=doOpen_s$ID$, boundaryWidth=boundaryWidth_s$ID$)\n\
\n\
- # Create interpolated version of original phi grid for later use in (optional) high-res step\n\
- if using_highres_s$ID$:\n\
- interpolateGrid(target=phi_xl$ID$, source=phi_s$ID$)\n\
- \n\
# create level set of particles\n\
gridParticleIndex(parts=pp_s$ID$, flags=flags_s$ID$, indexSys=pindex_s$ID$, index=gpi_s$ID$)\n\
unionParticleLevelset(pp_s$ID$, pindex_s$ID$, flags_s$ID$, gpi_s$ID$, phiParts_s$ID$)\n\
@@ -253,6 +249,10 @@ def liquid_step_$ID$():\n\
phiParts_s$ID$.setBound(0.5,0)\n\
phiParts_s$ID$.createMesh(mesh_s$ID$)\n\
\n\
+ # Create interpolated version of original phi grid for later use in (optional) high-res step\n\
+ if using_highres_s$ID$:\n\
+ interpolateGrid(target=phi_xl$ID$, source=phiParts_s$ID$)\n\
+ \n\
# set source grids for resampling, used in adjustNumber!\n\
pVel_s$ID$.setSource(vel_s$ID$, isMAC=True)\n\
adjustNumber(parts=pp_s$ID$, vel=vel_s$ID$, flags=flags_s$ID$, minParticles=1*minParticles_s$ID$, maxParticles=2*minParticles_s$ID$, phi=phi_s$ID$, exclude=phiObs_s$ID$, radiusFactor=radiusFactor_s$ID$, narrowBand=narrowBandWidth_s$ID$)\n\
More information about the Bf-blender-cvs
mailing list