diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-08-28 16:55:55 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-01-20 11:29:21 +0300 |
commit | ba8b8ec99870e61ba7496b3c55795e5acf9bd573 (patch) | |
tree | 3d70aa0652d219d16eb0009ded98686100d0f5a7 /source/blender/makesrna/intern/rna_cloth.c | |
parent | 345c7b144d0ddeb6dbf2b7ba77ae9ac89b8c9671 (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.c | 12 |
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); |