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:
authorLuca Rood <dev@lucarood.com>2018-08-29 01:29:37 +0300
committerLuca Rood <dev@lucarood.com>2018-08-31 17:33:59 +0300
commite3d31b8dfbdc3f4412e12fa1594927098ed0654d (patch)
treeabc629afab10eca51ddc52a3d3550cfcc3291565 /source/blender/makesdna
parentec3357e03ab1cf3bad48b0460a62761aae206278 (diff)
Cloth: Componentize forces
This separates cloth stiffness and damping forces into tension, compression, and shearing components, allowing more control over the cloth behaviour. This also adds a bending model selector (although the new bending model itself is not implemented in this commit). This is because some of the features implemented here only make sense within the new bending model, while the old model is kept for compatibility. This commit makes non-breaking changes, and thus maintains full compatibility with existing simulations. Reviewed By: brecht Differential Revision: http://developer.blender.org/D3655
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_cloth_types.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h
index 940872fd08d..1b7f3ab9c4a 100644
--- a/source/blender/makesdna/DNA_cloth_types.h
+++ b/source/blender/makesdna/DNA_cloth_types.h
@@ -49,17 +49,17 @@
typedef struct ClothSimSettings {
struct LinkNode *cache; /* UNUSED atm */
float mingoal; /* see SB */
- float Cdis; /* Mechanical damping of springs. */
+ float Cdis DNA_DEPRECATED; /* Mechanical damping of springs. */
float Cvi; /* Viscous/fluid damping. */
float gravity[3]; /* Gravity/external force vector. */
float dt; /* This is the duration of our time step, computed. */
float mass; /* The mass of the entire cloth. */
- float structural; /* Structural spring stiffness. */
+ float structural DNA_DEPRECATED; /* Structural spring stiffness. */
float shear; /* Shear spring stiffness. */
float bending; /* Flexion spring stiffness. */
float max_bend; /* max bending scaling value, min is "bending" */
- float max_struct; /* max structural scaling value, min is "structural" */
- float max_shear; /* max shear scaling value, UNUSED */
+ float max_struct DNA_DEPRECATED; /* max structural scaling value, min is "structural" */
+ float max_shear; /* max shear scaling value */
float max_sewing; /* max sewing force */
float avg_spring_len; /* used for normalized springs */
float timescale; /* parameter how fast cloth runs */
@@ -101,6 +101,16 @@ typedef struct ClothSimSettings {
char pad0[4];
struct EffectorWeights *effector_weights;
+
+ short bending_model;
+ short vgroup_shear; /* Vertex group for scaling structural stiffness. */
+ float tension;
+ float compression;
+ float max_tension;
+ float max_compression;
+ float tension_damp; /* Mechanical damping of tension springs. */
+ float compression_damp; /* Mechanical damping of compression springs. */
+ float shear_damp; /* Mechanical damping of shear springs. */
} ClothSimSettings;