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-08-28 16:55:55 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-20 11:29:21 +0300
commitba8b8ec99870e61ba7496b3c55795e5acf9bd573 (patch)
tree3d70aa0652d219d16eb0009ded98686100d0f5a7 /source/blender/makesrna/intern/rna_cloth.c
parent345c7b144d0ddeb6dbf2b7ba77ae9ac89b8c9671 (diff)
Implemented internal hair pressure to prevent hair from collapsing in
on itself. This uses the same voxel structure as the hair smoothing algorithm. A slightly different method was suggested in the original paper (Volumetric Methods for Simulation and Rendering of Hair), but this is based on directing hair based on a target density, which is another way of implementing global goals. Our own approach is to define a pressure threshold above which the hair is repelled in the density gradient direction to simulate internal pressure from collisions.
Diffstat (limited to 'source/blender/makesrna/intern/rna_cloth.c')
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index cecc39c8e15..9ab6791b5fa 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -325,6 +325,18 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Collider Friction", "");
RNA_def_property_update(prop, 0, "rna_cloth_update");
+ prop = RNA_def_property(srna, "pressure", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "pressure");
+ RNA_def_property_range(prop, 0.0f, 1000.0f);
+ RNA_def_property_ui_text(prop, "Internal Pressure", "Generate outward force based on hair density");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
+
+ prop = RNA_def_property(srna, "pressure_threshold", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "pressure_threshold");
+ RNA_def_property_range(prop, 0.0f, 1000.0f);
+ RNA_def_property_ui_text(prop, "Internal Pressure Threshold", "No pressure force is generated below this pressure value");
+ RNA_def_property_update(prop, 0, "rna_cloth_update");
+
/* mass */
prop = RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE);