diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-02-14 18:46:29 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-02-15 13:53:58 +0300 |
commit | 67cec97387965009dfaa57f7f4c8ab948e048e70 (patch) | |
tree | 7e2ec71d0db86c28a2a7ce051a4593661637f726 /source/blender/blenkernel/BKE_particle.h | |
parent | ffde74a878882618ab4d4179ba8dd9b98aab15e2 (diff) |
Simple hair children: Make twist affected by vertex group
The idea is to give a control over direction of twist, and maybe amount of
twist as well. More concrete example: make braids on left and right side of
character head to be twisting opposite directions.
Now, tricky part: we need some negative values to flip direction, but weights
can not be negative. So we use same trick as displacement map and tangent normal
maps, where 0.5 is neutral, values below 0.5 are considered negative and values
above 0.5 are considered positive.
Diffstat (limited to 'source/blender/blenkernel/BKE_particle.h')
-rw-r--r-- | source/blender/blenkernel/BKE_particle.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index 747a6b65bb0..0cda7dceb33 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -112,6 +112,7 @@ typedef struct ParticleTexture { float damp, gravity, field; /* used in physics */ float length, clump, kink_freq, kink_amp, effector; /* used in path caching */ float rough1, rough2, roughe; /* used in path caching */ + float twist; /* used in path caching */ } ParticleTexture; typedef struct ParticleSeam { @@ -159,6 +160,7 @@ typedef struct ParticleThreadContext { float *vg_length, *vg_clump, *vg_kink; float *vg_rough1, *vg_rough2, *vg_roughe; float *vg_effector; + float *vg_twist; struct CurveMapping *clumpcurve; struct CurveMapping *roughcurve; |