[Bf-blender-cvs] [f03d253] master: Disabled the velocity filtering feature for now, since the weighting is incorrect.

Lukas Tönne noreply at git.blender.org
Tue Jan 20 09:51:03 CET 2015


Commit: f03d253f55060d3ae238e068c620d76b7dcf0ede
Author: Lukas Tönne
Date:   Thu Sep 18 09:24:31 2014 +0200
Branches: master
https://developer.blender.org/rBf03d253f55060d3ae238e068c620d76b7dcf0ede

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.

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

M	release/scripts/startup/bl_ui/properties_particle.py
M	source/blender/makesrna/intern/rna_cloth.c
M	source/blender/physics/intern/BPH_mass_spring.cpp
M	source/blender/physics/intern/hair_volume.c
M	source/blender/physics/intern/implicit.h

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

diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 5b52475..8afd2d0 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -323,7 +323,6 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
         sub.separator()
         
         sub.prop(cloth, "voxel_resolution")
-        sub.prop(cloth, "voxel_filter_size")
 
         col = split.column()
         col.label(text="Damping:")
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index eff194f..154ab7d 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -417,12 +417,14 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Voxel Grid Resolution", "Resolution of the voxel grid for interaction effects");
 	RNA_def_property_update(prop, 0, "rna_cloth_update");
 
+#if 0 /* disabled */
 	prop = RNA_def_property(srna, "voxel_filter_size", PROP_INT, PROP_UNSIGNED);
 	RNA_def_property_int_sdna(prop, NULL, "voxel_filter_size");
 	RNA_def_property_range(prop, 0, 8);
 	RNA_def_property_int_default(prop, 0);
 	RNA_def_property_ui_text(prop, "Voxel Grid Filter Size", "Number of cells to use for filtering grid velocity");
 	RNA_def_property_update(prop, 0, "rna_cloth_update");
+#endif
 
 	/* springs */
 
diff --git a/source/blender/physics/intern/BPH_mass_spring.cpp b/source/blender/physics/intern/BPH_mass_spring.cpp
index 4d8f853..7f647d7 100644
--- a/source/blender/physics/intern/BPH_mass_spring.cpp
+++ b/source/blender/physics/intern/BPH_mass_spring.cpp
@@ -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];
diff --git a/source/blender/physics/intern/hair_volume.c b/source/blender/physics/intern/hair_volume.c
index 7f9704a..e72df49 100644
--- a/source/blender/physics/intern/hair_volume.c
+++ b/source/blender/physics/intern/hair_volume.c
@@ -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])
 {
diff --git a/source/blender/physics/intern/implicit.h b/source/blender/physics/intern/implicit.h
index 2945b07..7205b60 100644
--- a/source/blender/physics/intern/implicit.h
+++ b/source/blender/physics/intern/implicit.h
@@ -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]);




More information about the Bf-blender-cvs mailing list