diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-10-21 00:07:33 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-10-21 00:07:53 +0300 |
commit | 7167a57197e9732ddb0a23dc2cedc6651bd55987 (patch) | |
tree | acf1011a630db2c9b708ec3a1d586705171f60d8 /intern | |
parent | 14d56b4217f857eb78239051593c2391f9227b99 (diff) |
Fluid: Added obstacle fluid distance parameter
Being able to adjust the distance between fluid and obstacles comes in handy when trying to achieve a fluid motion over inclined obstacles.
Depending on the slope of such obstacles, already small adjustments of this value can help when particles stick to obstacle surfaces (i.e. make particles not stick to obstacles).
Diffstat (limited to 'intern')
-rw-r--r-- | intern/mantaflow/intern/MANTA_main.cpp | 1 | ||||
-rw-r--r-- | intern/mantaflow/intern/strings/liquid_script.h | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/intern/mantaflow/intern/MANTA_main.cpp b/intern/mantaflow/intern/MANTA_main.cpp index ef7cd4721b0..e15fe809b2d 100644 --- a/intern/mantaflow/intern/MANTA_main.cpp +++ b/intern/mantaflow/intern/MANTA_main.cpp @@ -845,6 +845,7 @@ void MANTA::initializeRNAMap(FluidModifierData *fmd) mRNAMap["PARTICLE_MAXIMUM"] = to_string(fds->particle_maximum); mRNAMap["PARTICLE_RADIUS"] = to_string(fds->particle_radius); mRNAMap["FRACTIONS_THRESHOLD"] = to_string(fds->fractions_threshold); + mRNAMap["FRACTIONS_DISTANCE"] = to_string(fds->fractions_distance); mRNAMap["MESH_CONCAVE_UPPER"] = to_string(fds->mesh_concave_upper); mRNAMap["MESH_CONCAVE_LOWER"] = to_string(fds->mesh_concave_lower); mRNAMap["MESH_PARTICLE_RADIUS"] = to_string(fds->mesh_particle_radius); diff --git a/intern/mantaflow/intern/strings/liquid_script.h b/intern/mantaflow/intern/strings/liquid_script.h index 6e78fce1d61..683d89a9cfc 100644 --- a/intern/mantaflow/intern/strings/liquid_script.h +++ b/intern/mantaflow/intern/strings/liquid_script.h @@ -41,6 +41,7 @@ using_mesh_s$ID$ = $USING_MESH$\n\ using_final_mesh_s$ID$ = $USING_IMPROVED_MESH$\n\ using_fractions_s$ID$ = $USING_FRACTIONS$\n\ fracThreshold_s$ID$ = $FRACTIONS_THRESHOLD$\n\ +fracDistance_s$ID$ = $FRACTIONS_DISTANCE$\n\ flipRatio_s$ID$ = $FLIP_RATIO$\n\ concaveUpper_s$ID$ = $MESH_CONCAVE_UPPER$\n\ concaveLower_s$ID$ = $MESH_CONCAVE_LOWER$\n\ @@ -243,6 +244,8 @@ def liquid_step_$ID$():\n\ pp_s$ID$.advectInGrid(flags=flags_s$ID$, vel=vel_s$ID$, integrationMode=IntRK4, deleteInObstacle=deleteInObstacle_s$ID$, stopInObstacle=False, skipNew=True)\n\ \n\ mantaMsg('Pushing particles out of obstacles')\n\ + if using_obstacle_s$ID$:\n\ + pushOutofObs(parts=pp_s$ID$, flags=flags_s$ID$, phiObs=phiObsIn_s$ID$, thresh=fracDistance_s$ID$)\n\ pushOutofObs(parts=pp_s$ID$, flags=flags_s$ID$, phiObs=phiObs_s$ID$)\n\ \n\ # save original states for later (used during mesh / secondary particle creation)\n\ |