mmmovania/opencloth

IMEX integration

Closed this issue · 11 comments

Regarding your IMEX (implicit/explicit) integration implementation, your code 
says it is based on SIGGRAPH course notes "Realtime Physics" 
http://www.matthiasmueller.info/realtimephysics/coursenotes.pdf. 

The term 'IMEX' is always confusing me since people sometimes use it for 
symplectic or semi-implicit Euler integrator.

I believe the clearer definition of IMEX can be found from papers below. 

http://www.multires.caltech.edu/pubs/GI99.pdf

http://gris.uni-tuebingen.de/fileadmin/user_upload/Paper/Eberhardt-2000-Implicit
Explicit.pdf

Basically IMEX ignores rotational effect of Jacobian matrix. When df_dx (or 
df_dv) is calculated, if we ignore relative tangential movement of two vertices 
connected by a spring, the Jacobian matrix becomes constant. It means we can 
pre-compute it or even invert it once. In the second paper, it doesn't invert 
but still exploits its constant values and symmetric definite structure which 
almost guarantees fast CG solver convergence. The downside is that it doesn't 
conserve momentum. The first paper compensates it by adding extra angular 
momentum after integration process. 

In your IMEX code, I don't see this Jacobian matrix. So my question is if your 
predictor-corrector approach replaces Jacobian matrix. 

Thank you in advance. 




Original issue reported on code.google.com by saggitas...@gmail.com on 21 Mar 2012 at 4:49

Hi Saggita,
  Thanks for the input again. My reference for IMEX is the first paper you linked i.e. http://www.multires.caltech.edu/pubs/GI99.pdf . The code is entirely based on the pseudocode given in Fig. 6 I kept the variable names same as in the pseudocode. W is precalculated in lines 212-216 in InitGL function. 

I truncate the Hessian matrix to a 3x3 matrix since it will be used for each 
point individually rather than solving it for the whole system as is done in 
the implicit integration. 

I am not sure whether my approach of truncating the hessian matrix is correct 
what do you say. 

The reason I kept this code public was so that we could have a refined 
implementations as reference for others. However, you are the only person who 
is giving me good feedback and comments.

Thanks for the insights and valuable feedback i really admire your effort. I 
will answer the other issue in depth when I have some time.

Original comment by mmmova...@gmail.com on 22 Mar 2012 at 3:18

[deleted comment]
Hi Mobeen,

Thank you for your prompt answer. 

Regarding truncating H matrix, I don't think it is correct. The W matrix is 
supposed to be dense(not sparse matrix) even though H is sparse. Inverting a 
matrix is complicated process even for a sparse one. 

Thank you.

Dongsoo Han

Original comment by saggitas...@gmail.com on 23 Mar 2012 at 12:11

Hmm so I think I would have to generate a big matrix H for the entire point 
mesh (3x3 matrix per point as in implicit integration) and then solve it using 
an iterative solver? Is that the right approach?

Original comment by mmmova...@gmail.com on 25 Mar 2012 at 6:28

Hi saggita,
  I saw your youtube videos (all of them) you have some pretty solid work there. By the way based on your experience, I would like to ask you what is the best (fast and stable) method for doing collision in Cloth (both self collision and between cloth-triangular mesh).
I think for limiting the amount of tests, you have to use spatial hashing but 
do you know of a solid reference which deals with cloth collision in-depth?

Original comment by mmmova...@gmail.com on 25 Mar 2012 at 6:57

For example, in your cloth-bunny demo and cloth-cylinder demo, what method do u 
use for collision and how well does it perform? 

Original comment by mmmova...@gmail.com on 25 Mar 2012 at 6:59

[deleted comment]
Hi,

First of all, for the comment 4, if you want to invert the matrix H, I believe 
you can either use Gaussian elimination or backward substitute with LU 
decomposition. I believe there should be better way to do for sparse matrix but 
my knowledge is limited here.

Regarding comment 5 and 6, I am following the paper linked below.

http://www.graphics.stanford.edu/papers/cloth-sig02/

So all of cloth vs object or cloth vs cloth including self-collision is based 
on mesh-mesh collision handling using continuous collision detection. I don't 
use rigid impact zone though. My cloth simulation is not meant to be realtime. 

I will try to help you out later.
Thank you.

Dongsoo Han

Original comment by saggitas...@gmail.com on 26 Mar 2012 at 11:26

I found a good paper about sparse direct solvers as below:

ftp://ftp.numerical.rl.ac.uk/pub/reports/ghsRAL200505.pdf

I haven't tried any of them yet though. 

Original comment by saggitas...@gmail.com on 9 Apr 2012 at 8:50

OK I am working to remove this issue

Original comment by mmmova...@gmail.com on 29 Mar 2014 at 6:41

  • Changed state: Started
  • Added labels: Priority-High, OpSys-All
  • Removed labels: Priority-Medium
OK I have corrected my IMEX implementation based on Desbrun et al. paper 
http://www.multires.caltech.edu/pubs/GI99.pdf. The results are amazing. So this 
issue is resolved. I will check in the latest code very soon containing the new 
implementation. 

Original comment by mmmova...@gmail.com on 8 Apr 2014 at 7:25

  • Changed state: Fixed