Unreal Engine – Cloth Solver

I spent the weekend writing a cloth solver for Unreal Engine 4 after being inspired by the cloth placement tool I saw for Source 2’s Hammer editor.

The tweet which inspired me!

Currently it runs on the CPU & will generate its own primitive scene proxy to calculate the mesh on the render thread from the particle simulation.
It also collides with the scene in real time – works a lot better than I was expecting!

I am contemplating releasing this as a plugin for the marketplace, until then here are my plans:

  • Improve stability (ensure assert conditions won’t be hit as much as possible)
  • Double-check performance & provide CPU profiling stats akin to the CableComponent plugin
  • Move solver to GPU with a compute shader
  • Optional GPU scene depth collision

Leave a comment