From b3cbafb96630c370d1750fc8cb59053ddae0d6f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Thu, 13 Nov 2014 16:06:39 +0100 Subject: Implementation of a target density feature for the hair simulation. This allows setting a target density which the fluid simulation will take into account as an additional term in the pressure Poisson equation. Based on two papers "Detail Preserving Continuum Simulation of Straight Hair" (McAdams et al. 2009) and "Two-way Coupled SPH and Particle Level Set Fluid Simulation" (Losasso et al. 2008) Currently the target pressure is specified directly, but it will be a lot more convenient to define this in terms of a geometric value such as "number of hairs per area" (combined with hair "thickness"). Conflicts: source/blender/physics/intern/BPH_mass_spring.cpp --- source/blender/makesrna/intern/rna_cloth.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/blender/makesrna/intern/rna_cloth.c') diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c index 1176da7642c..c31287097f6 100644 --- a/source/blender/makesrna/intern/rna_cloth.c +++ b/source/blender/makesrna/intern/rna_cloth.c @@ -385,16 +385,16 @@ 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"); + prop = RNA_def_property(srna, "density_target", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "density_target"); + RNA_def_property_range(prop, 0.0f, 1000000.0f); + RNA_def_property_ui_text(prop, "Target Density", "Maximum density of hair"); 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"); + prop = RNA_def_property(srna, "density_strength", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "density_strength"); 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_ui_text(prop, "Target Density Strength", "Influence of target density on the simulation"); RNA_def_property_update(prop, 0, "rna_cloth_update"); /* mass */ -- cgit v1.2.3