diff options
author | Janne Karhu <jhkarh@gmail.com> | 2011-01-07 14:24:34 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2011-01-07 14:24:34 +0300 |
commit | 29efbf8a04c66a6c0e71c63140185a603d4e684b (patch) | |
tree | 49905b40499e2bde748e52d7aa735c9dd98e9e97 /source/blender/makesrna/intern/rna_particle.c | |
parent | 7ad97b04b7faf4640d953b8c6066b88b9154ba89 (diff) |
New hair child options:
* Renamed children to "simple" and "interpolated" as this is
easier to explain and more descriptive than "from particles"
and "from faces".
* Also shuffled the child ui around a bit to make it clearer.
* Child seed parameter allows to change the seed for children
independent of the main seed value.
* Long hair mode for interpolated children:
- Making even haircuts was impossible before as the child
strand lengths were even, but their root coordinates were
not similar in relation to the parent strands.
- The "long hair" option uses the tips of the parent strands
to calculate the child strand tips.
* Hair parting options:
- Hair parting can now be calculated dynamically on the fly
when in 2.49 there was a cumbersome way of using emitter mesh
seams to define parting lines.
- For long hair parting can be created by a tip distance/root
distance threshold. For example setting the minimum threshold
to 2.0 creates partings between children belonging to parents
with tip distance of three times the root distance
((1+2)*root distance).
- For short hair the parting thresholds are used as angles
between the root directions.
* New kink parameters:
- Kink flatness calculates kink into a shape that would have
been achieved with an actual curling iron.
- Kink amplitude clump determines how much the main clump value
effects the kink amplitude.
- The beginning of kink is now smoothed to make the hair look
more natural close to the roots.
* Some bugs fixed along the way too:
- Child parent's were not determined correctly in some cases.
- Children didn't always look correct in particle mode.
- Changing child parameters caused actual particles to be
recalculated.
* Also cleaned up some deprecated code.
All in all there should be no real changes to how old files look
(except perhaps a bit better!), but the new options should make
hair/fur creation a bit more enjoyable. I'll try to make a video
demonstrating the new stuff shortly.
Diffstat (limited to 'source/blender/makesrna/intern/rna_particle.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 60 |
1 files changed, 39 insertions, 21 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 90aeba65118..6a7b77df905 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -1103,8 +1103,8 @@ static void rna_def_particle_settings(BlenderRNA *brna) static EnumPropertyItem child_type_items[] = { {0, "NONE", 0, "None", ""}, - {PART_CHILD_PARTICLES, "PARTICLES", 0, "Particles", ""}, - {PART_CHILD_FACES, "FACES", 0, "Faces", ""}, + {PART_CHILD_PARTICLES, "SIMPLE", 0, "Simple", ""}, + {PART_CHILD_FACES, "INTERPOLATED", 0, "Interpolated", ""}, {0, NULL, 0, NULL, NULL} }; @@ -1239,21 +1239,6 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Boids 2D", "Constrain boids to a surface"); RNA_def_property_update(prop, 0, "rna_Particle_reset"); - prop= RNA_def_property(srna, "use_branching", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_BRANCHING); - RNA_def_property_ui_text(prop, "Branching", "Branch child paths from each other"); - RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); - - prop= RNA_def_property(srna, "use_animate_branching", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_ANIM_BRANCHING); - RNA_def_property_ui_text(prop, "Animated", "Animate branching"); - RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); - - prop= RNA_def_property(srna, "use_symmetric_branching", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_SYMM_BRANCHING); - RNA_def_property_ui_text(prop, "Symmetric", "Start and end points are the same"); - RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); - prop= RNA_def_property(srna, "use_hair_bspline", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_HAIR_BSPLINE); RNA_def_property_ui_text(prop, "B-Spline", "Interpolate hair using B-Splines"); @@ -1269,10 +1254,10 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Children", "Apply effectors to children"); RNA_def_property_update(prop, 0, "rna_Particle_redo"); - //prop= RNA_def_property(srna, "child_seams", PROP_BOOLEAN, PROP_NONE); - //RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_SEAMS); - //RNA_def_property_ui_text(prop, "Use seams", "Use seams to determine parents"); - //RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); + prop= RNA_def_property(srna, "create_long_hair_children", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_LONG_HAIR); + RNA_def_property_ui_text(prop, "Long Hair", "Calculate children that suit long hair well"); + RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); prop= RNA_def_property(srna, "apply_guide_to_children", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_CHILD_GUIDE); @@ -1863,6 +1848,12 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Amplitude", "The amplitude of the offset"); RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); + prop= RNA_def_property(srna, "kink_amplitude_clump", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "kink_amp_clump"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Amplitude Clump", "How much clump effects kink amplitude"); + RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); + prop= RNA_def_property(srna, "kink_frequency", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "kink_freq"); RNA_def_property_range(prop, -100000.0f, 100000.0f); @@ -1875,6 +1866,10 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Shape", "Adjust the offset to the beginning/end"); RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); + prop= RNA_def_property(srna, "kink_flat", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Flatness", "How flat the hairs are"); + RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); /* rough */ prop= RNA_def_property(srna, "roughness_1", PROP_FLOAT, PROP_NONE); @@ -1936,6 +1931,25 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Threshold", "Amount of particles left untouched by child path length"); RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); + /* parting */ + prop= RNA_def_property(srna, "child_parting_factor", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "parting_fac"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Parting Factor", "Create parting in the children based on parent strands"); + RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); + + prop= RNA_def_property(srna, "child_parting_min", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "parting_min"); + RNA_def_property_range(prop, 0.0f, 180.0f); + RNA_def_property_ui_text(prop, "Parting Minimum", "Minimum root to tip angle (tip distance/root distance for long hair)"); + RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); + + prop= RNA_def_property(srna, "child_parting_max", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "parting_max"); + RNA_def_property_range(prop, 0.0f, 180.0f); + RNA_def_property_ui_text(prop, "Parting Maximum", "Maximum root to tip angle (tip distance/root distance for long hair)"); + RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); + /* branching */ prop= RNA_def_property(srna, "branch_threshold", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "branch_thres"); @@ -2152,6 +2166,10 @@ static void rna_def_particle_system(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Seed", "Offset in the random number table, to get a different randomized result"); RNA_def_property_update(prop, 0, "rna_Particle_reset"); + prop= RNA_def_property(srna, "child_seed", PROP_INT, PROP_UNSIGNED); + RNA_def_property_ui_text(prop, "Child Seed", "Offset in the random number table for child particles, to get a different randomized result"); + RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); + /* hair */ prop= RNA_def_property(srna, "is_global_hair", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_GLOBAL_HAIR); |