[Bf-blender-cvs] [1797850eeec] fluid-mantaflow: use larger surface distance value so that obvels cover larger area. manta can then better extrpolate those obvels

Sebastián Barschkis noreply at git.blender.org
Sat May 27 22:53:58 CEST 2017


Commit: 1797850eeec126b02d360db581d10838f6ae09ec
Author: Sebastián Barschkis
Date:   Thu Apr 13 19:11:42 2017 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB1797850eeec126b02d360db581d10838f6ae09ec

use larger surface distance value so that obvels cover larger area. manta can then better extrpolate those obvels

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

M	source/blender/blenkernel/intern/smoke.c

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

diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index f9e504cfe6d..e0dd4b57fed 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -840,7 +840,8 @@ static void obstacles_from_derivedmesh_task_cb(void *userdata, const int z)
 	SmokeDomainSettings *sds = data->sds;
 
 	/* slightly rounded-up sqrt(3 * (0.5)^2) == max. distance of cell boundary along the diagonal */
-	const float surface_distance = 0.867f;
+	const float surface_distance = 2.0f; //0.867f;
+	/* Note: Use larger surface distance to cover larger area with obvel. Manta will use these obvels and extrapolate them (inside and outside obstacle) */
 
 	for (int x = sds->res_min[0]; x < sds->res_max[0]; x++) {
 		for (int y = sds->res_min[1]; y < sds->res_max[1]; y++) {
@@ -880,6 +881,8 @@ static void obstacles_from_derivedmesh_task_cb(void *userdata, const int z)
 					data->num_obstacles[index]++;
 				}
 			}
+
+			/* Get distance to mesh surface from both within and outside grid (mantaflow phi grid) */
 			update_mesh_distances(index, data->distances_map, data->tree, ray_start);
 		}
 	}




More information about the Bf-blender-cvs mailing list