State of the art cloth simulation

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
chen
Posts: 2
Joined: Tue Jul 23, 2019 7:52 pm

State of the art cloth simulation

Post by chen »

Hi guys. What is the state of the art cloth simulation that can be approached at real-time? The technique I know is to use the mass-spring model then apply constraints and integrate using F=ma. Is there better ways to do this nowadays?
irlanrobson
Posts: 16
Joined: Sun Feb 08, 2015 3:21 pm
Location: Brazil

Re: State of the art cloth simulation

Post by irlanrobson »

A commonly used approach in the industry is the continuum approach described in the paper of David Baraff.

https://www.cs.cmu.edu/~baraff/papers/sig98.pdf

However, some forces like the shear (and bend) force can introduce problems into the linear system described above if included incorrectly so it can't be solved by the Conjugate Gradient method anymore.

Therefore, I would recommend a system that would mix the continuum approach with the mass-spring system approach.

For example, you can include the stretch forces using the continuum approach described above since they don't introduce problems into the system if included correctly. They can be effectively included correctly into the system.

Then you add shear and bend springs like the ones described below since they also don't introduce problems into the linear system. They also can be effectively included correctly into the system.

http://gamma.cs.unc.edu/CSTREAMS/cloth/cloth.pdf

Here Choi et al shows how to include a spring force into the system without introducing problems into it:

http://graphics.snu.ac.kr/~kjchoi/publication/cloth.pdf

Note this is not a mass-spring system approach. I would call it a semi-continuum approach. It can be made realtime by optimizing it. In the abscence of additional forces and particles, you can create a mechanism that allows us to build the Hessian in O(n) since the matrix topology is static. This is an interesting optimization.

Also look for Rony Goldenthal PhD thesis. He adresses implicit integration with constraints.
Last edited by irlanrobson on Mon Jan 16, 2023 7:35 pm, edited 2 times in total.
irlanrobson
Posts: 16
Joined: Sun Feb 08, 2015 3:21 pm
Location: Brazil

Re: State of the art cloth simulation

Post by irlanrobson »

Then there is corotational FEM which can be done realtime. The algorithm complexity of this solver is dominated by the CG method as in David Baraff's cloth solver.

You can apply the same constraint satisfaction technique described in Baraff's solver to a corotational FEM solver.

For cloth it seems that there is a specific FEM solver described in this paper:

https://animation.rwth-aachen.de/media/ ... eCloth.pdf

It's important to remember that corotational FEM is considered by many as state of the art soft body simulation for games.
Last edited by irlanrobson on Mon Jan 16, 2023 7:37 pm, edited 2 times in total.
chen
Posts: 2
Joined: Tue Jul 23, 2019 7:52 pm

Re: State of the art cloth simulation

Post by chen »

Wow, awesome information! Thanks for the help, that was really good info!
irlanrobson
Posts: 16
Joined: Sun Feb 08, 2015 3:21 pm
Location: Brazil

Re: State of the art cloth simulation

Post by irlanrobson »

For collision detection between cloth and arbitrary convex/concave meshes you want fast point queries. This can be done using a signed distance field (SDF). For convex shapes, calling GJK thousands of times per step can substantially hit performance.

SDF allow O(1) evaluation of distance between a point and the mesh. It also gives you the normal at the boundary.

For simple shapes like spheres or capsules you can use implicit functions since the query is also O(1).

The PBD framework has good examples of using Discregrid's SDF and implicit functions for collision detection. Though is used in a different context, rigid body dynamics:

https://github.com/InteractiveComputerG ... edDynamics

Bullet also contains good examples of using Discregrid's SDF for collision detection.
Last edited by irlanrobson on Mon Jan 16, 2023 7:38 pm, edited 2 times in total.
irlanrobson
Posts: 16
Joined: Sun Feb 08, 2015 3:21 pm
Location: Brazil

Re: State of the art cloth simulation

Post by irlanrobson »

It's worth mentioning that there is a book about cloth simulation that was released recently. The author announced the book release in this thread last year:

viewtopic.php?f=6&t=12356

I don't own one, but it seems a good book, and it has some math. The part about artistic driven cloth simulation seems interesting and state of the art as well.
Post Reply