Page MenuHome

Cloth: angular bending springs
ClosedPublic

Authored by Luca Rood (LucaRood) on Aug 30 2018, 5:37 PM.

Details

Summary

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.

Diff Detail

Repository
rB Blender

Event Timeline

I couldn't spot mistakes in the code, and in some simulation tests it also seems to be working as advertised. So looks good to me, with two minor comments.

source/blender/blenkernel/intern/cloth.c
1036

Convention is to use float functions like atan2f().

source/blender/physics/intern/implicit_blender.c
1715

Wrong indentation.

This revision is now accepted and ready to land.Aug 31 2018, 11:42 AM
This revision was automatically updated to reflect the committed changes.