[Bf-blender-cvs] [1d8a08f] cloth-improvements: Add some comments about methods used for mass-spring model
Luca Rood
noreply at git.blender.org
Fri Dec 9 17:39:02 CET 2016
Commit: 1d8a08fb9ff6202570e6f61b9f254393d9286d90
Author: Luca Rood
Date: Thu Dec 8 16:27:48 2016 -0200
Branches: cloth-improvements
https://developer.blender.org/rB1d8a08fb9ff6202570e6f61b9f254393d9286d90
Add some comments about methods used for mass-spring model
===================================================================
M source/blender/physics/intern/implicit_blender.c
===================================================================
diff --git a/source/blender/physics/intern/implicit_blender.c b/source/blender/physics/intern/implicit_blender.c
index a2f9de3..6a4eb70 100644
--- a/source/blender/physics/intern/implicit_blender.c
+++ b/source/blender/physics/intern/implicit_blender.c
@@ -1605,6 +1605,7 @@ bool BPH_mass_spring_force_spring_linear(Implicit_Data *data, int i, int j, floa
}
/* Calculate compression forces */
+ /* this is based on the Choi and Ko bending model, which works surprisingly well for compression */
else if (!no_compress) {
float kb = compression;
float cb = kb; /* cb equal to kb seems to work, but a factor can be added if necessary */
@@ -1729,6 +1730,7 @@ BLI_INLINE bool spring_angle(Implicit_Data *data, int i, int j, int *i_a, int *i
return true;
}
+/* Angular springs roughly based on the bending model proposed by Baraff and Witkin in "Large Steps in Cloth Simulation" */
bool BPH_mass_spring_force_spring_angular(Implicit_Data *data, int i, int j, int *i_a, int *i_b, int len_a, int len_b,
float restang, float stiffness, float damping)
{
More information about the Bf-blender-cvs
mailing list