For my 3rd year programming assignment I wanted to find something fun to build – soft body dynamics sounded like a great start :). 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 done so, besides the Bullet bindings inside Fabric.
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).
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.
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.