Why Fabric?

For my 3rd year programming assignment I had to find something fun to build, soft body dynamics is something I’ve never really tried before that sounds interesting. I’ve also heard good things about Fabric Engine all year and figured I’d have a go at combining the two since as far as I can tell, noone else has really done so (outside of using the Bullet bindings inside Fabric).

Demo

Workflow

The recommended workflow for adding new systems to Fabric is to create an extension that defines all the custom structures/objects/interfaces in KL. These can then be easily distributed and imported into other extensions or directly into Canvas, where they are exposed as graph nodes that can be chained together.

Although there are plenty of tutorials explaining how to do things purely in Canvas or purely in KL, I found it difficult to find thorough explanations of best practices for things such as writing extensions that will be used in canvas. A lot of time was spent experimenting with what Canvas can do, as it is the main entry point to doing anything in Fabric (and Fabric Splice is deprecated, so going KL only isn’t possible).

Implementation

For the sake of time I’ve only focused on a very simple spring constraint setup that uses Verlet integration. Right now it only works properly on grid objects, I didn’t have time to implement the topology based constraint setup I planned to use.

Github Source

You can grab the extension code here, it’s still in a rough state and is untested in anything above Fabric 2.1.0 but it should work.

TomMinor/ClothSimulation-FabricEngine