Folding cloths in blender

Is there a way to fold cloth together, like in this Cinema 4D Video?

How do I flat e.g. a shirt like in the video?
And how do I fold it together?