Disabled the velocity filtering feature for now, since the weighting is

incorrect.

The voxel grid needs better tool support to make it usable, so fixing
the filtering is not high priority right now.
This commit is contained in:
2014-09-18 09:24:31 +02:00
parent 226beb9866
commit f03d253f55
5 changed files with 8 additions and 1 deletions

View File

@@ -431,8 +431,10 @@ static void cloth_calc_volume_force(ClothModifierData *clmd)
}
BPH_hair_volume_normalize_vertex_grid(vertex_grid);
#if 0
/* apply velocity filter */
BPH_hair_volume_vertex_grid_filter_box(vertex_grid, clmd->sim_parms->voxel_filter_size);
#endif
for (i = 0; i < numverts; i++) {
float x[3], v[3], f[3], dfdx[3][3], dfdv[3][3];

View File

@@ -295,6 +295,7 @@ void BPH_hair_volume_normalize_vertex_grid(HairVertexGrid *grid)
}
}
#if 0 /* XXX weighting is incorrect, disabled for now */
/* Velocity filter kernel
* See http://en.wikipedia.org/wiki/Filter_%28large_eddy_simulation%29
*/
@@ -363,6 +364,7 @@ void BPH_hair_volume_vertex_grid_filter_box(HairVertexGrid *grid, int kernel_siz
copy_v3_v3(grid->verts[i].velocity, grid->verts[i].velocity_smooth);
}
}
#endif
HairVertexGrid *BPH_hair_volume_create_vertex_grid(int res, const float gmin[3], const float gmax[3])
{

View File

@@ -155,7 +155,9 @@ void BPH_hair_volume_free_vertex_grid(struct HairVertexGrid *grid);
void BPH_hair_volume_add_vertex(struct HairVertexGrid *grid, const float x[3], const float v[3]);
void BPH_hair_volume_normalize_vertex_grid(struct HairVertexGrid *grid);
#if 0 /* XXX weighting is incorrect, disabled for now */
void BPH_hair_volume_vertex_grid_filter_box(struct HairVertexGrid *grid, int kernel_size);
#endif
void BPH_hair_volume_vertex_grid_forces(struct HairVertexGrid *grid, const float x[3], const float v[3],
float smoothfac, float pressurefac, float minpressure,
float f[3], float dfdx[3][3], float dfdv[3][3]);