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-09-19 13:15:16 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-20 11:30:02 +0300
commit7a7778d003d1a31fb4eb3411e1b0512981cc4614 (patch)
tree0488266c11cbaf505c02de1eb34bcaf42486e1d4 /source/blender/blenkernel/BKE_cloth.h
parent86a4da1c5416c36d2e860720d474f394146ecc2d (diff)
Simple initial implementation of angular bending springs.
These are much better suited for creating stiff hair. The previous bending springs are based on "push" type spring along the hypothenuse of 3 hair vertices. This sort of spring requires a very large force in the direction of the spring for any angular effect, and is still unstable in the equilibrium. The new bending spring model is based on "target" vectors defined in a local hair frame, which generates a force perpendicular to the hair segment. For further details see "Artistic Simulation of Curly Hair" (Pixar technical memo #12-03a) or "A Mass Spring Model for Hair Simulation" (Selle, Lentine, Fedkiw 2008) Currently the implementation uses a single root frame that is not yet propagated along the hair, so the resulting rest shape is not very natural. Also damping and derivatives are still missing.
Diffstat (limited to 'source/blender/blenkernel/BKE_cloth.h')
-rw-r--r--source/blender/blenkernel/BKE_cloth.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h
index 571c0ec89a1..838388f428c 100644
--- a/source/blender/blenkernel/BKE_cloth.h
+++ b/source/blender/blenkernel/BKE_cloth.h
@@ -124,6 +124,7 @@ ClothVertex;
typedef struct ClothSpring {
int ij; /* Pij from the paper, one end of the spring. */
int kl; /* Pkl from the paper, one end of the spring. */
+ int mn;
float restlen; /* The original length of the spring. */
int matrix_index; /* needed for implicit solver (fast lookup) */
int type; /* types defined in BKE_cloth.h ("springType") */
@@ -175,7 +176,8 @@ typedef enum {
CLOTH_SPRING_TYPE_SHEAR = (1 << 2),
CLOTH_SPRING_TYPE_BENDING = (1 << 3),
CLOTH_SPRING_TYPE_GOAL = (1 << 4),
- CLOTH_SPRING_TYPE_SEWING = (1 << 5)
+ CLOTH_SPRING_TYPE_SEWING = (1 << 5),
+ CLOTH_SPRING_TYPE_BENDING_ANG = (1 << 6),
} CLOTH_SPRING_TYPES;
/* SPRING FLAGS */