Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2014-09-18 11:06:25 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-20 11:30:01 +0300
commit226beb986690046adfdf10a3ed72034fa322ccdb (patch)
treea9dfd0f16c58d70566368cb9b0c3e695e06e44d9 /source/blender/makesrna/intern/rna_cloth.c
parentbbae8f88b8f305a8ed85cab718d2a66b476da3c1 (diff)
Added basic filtering feature for velocity smoothing.
This is part of the original method from "Volumetric Methods for Simulation and Rendering of Hair". The current filter is a simple box filter. Other energy-preserving filters such as gaussian filtering can be implemented later. The filter size is currently given as a cell count. This is not ideal, rather it should use a geometrical length value, but this is too abstract for proper artistical use. Eventually defining the whole grid in terms of spatial size might work better (possibly using an external object).
Diffstat (limited to 'source/blender/makesrna/intern/rna_cloth.c')
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index 8528a664458..eff194fcd5c 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -417,6 +417,13 @@ 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");
+ 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");
+
/* springs */
prop = RNA_def_property(srna, "use_stiffness_scale", PROP_BOOLEAN, PROP_NONE);