Cloth: Implement angular bending springs
authorLuca Rood <dev@lucarood.com>
Mon, 5 Dec 2016 23:39:29 +0000 (21:39 -0200)
committerLuca Rood <dev@lucarood.com>
Fri, 31 Aug 2018 14:39:43 +0000 (16:39 +0200)
commitb6f0f8a5b5a4871603755d4413e47f054ecd5b68
tree50b10fa4e995a133c2ad42e31f8d6acb205ed552
parente3d31b8dfbdc3f4412e12fa1594927098ed0654d
Cloth: Implement angular bending springs

This implements angular bending springs for cloth simulation. This also
adds shearing springs for n-gons.

This angular spring implementation does not include Jacobian matrices,
as the springs can exist between polygons of different vertex counts,
rendering their relationships asymmetrical, and thus impossible to solve
with the current implementation. This means that the bending component
is solved explicitly. However, this is usually not a big problem, as
bending springs contribute less to instability than structural springs.

The the old linear bending model can still be used, and is the default for
existing files, to keep compatibility. However, the new angular bending
model is the default for any new simulation.

This commit makes small breaking changes, in that shearing springs are
now created on n-gons (also in linear bending mode), while n-gons were
previously ignored.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D3662
release/scripts/addons
source/blender/blenkernel/BKE_cloth.h
source/blender/blenkernel/intern/cloth.c
source/blender/physics/intern/BPH_mass_spring.cpp
source/blender/physics/intern/implicit.h
source/blender/physics/intern/implicit_blender.c