[Bf-committers] Some Maths / ideas / solutions for Softbodies.

bjornmose at gmx.net bjornmose at gmx.net
Tue Nov 30 14:10:41 CET 2004


Hmm,  

I'd  like to point to that fact, that i never talked about cloth simulation
to be the guiding idea behind this approach. 

When you look at the Maya docs there are two features we first want to have.
1. Goals : The soft object is hanging elastic in its original static cage
2. General vertex to vertex (object to object) springs to modify elastic
properties of the object(s).

If you look closer at the Maya docs and the parameters used for setting such
systems up, may lead you to the suspect that Maya also is integrating the
system of ODEs, most likely using brute force forward euler, since for 
reasonalbe well behaving systems the calculation of the jakobian and setting
up a sparse matrix solver would be numerical overkill for a little yelo
wobble.

so much for that
/ole

> Hello !
> I quickly looked into the softbodies code.
> I'm not familiar at all with C++ and blender environment so i don't 
> understand everything.
> But i have some things that could interrest you.
> 
> Stability :
> The stability is the main problem with cloth simulation so i have some 
> tips to improve this.
> 1) We should either keep the system constraint based, or physic based, 
> but not mix the two if it isn't necessary.
> Ex : the system shouldn't be allowed to directly change the position 
> /speed of the vertices after integration.
> If we do that, we can forget all cool mathemathic theories that can help 
> us to keep the system stable with euler explicit.
> We can also forget about euler implicit method.
> So all constraint (I think of hooks that could affect vertices, 
> collisions,...) should be treated as forces, and Pixar's paper gives good
> solutions to do this.
> 2) Euler explicit isn't the better way to integrate. If we keep the 
> system totally physics based, then Implicit euler method could be 
> implemented
> and it is always stable. However it is a lot of hand calculus and it 
> isn't flexible at all, we cannot add wind or others things without 
> having to redo the maths.
> If we use Euler explicit, there is a stability condition that can be 
> evaluated and then we can adjust the step to keep the system stable.
> 
> let's state the euler explicit  solves : u'(x) =  f(x,u)  , u(0)  = x0, 
> and we use Euler with a step 'h'
> then : J(x,u(x)) (Jacobian matrix) = (in this case) df/du
> the stability condition is :
> h<-2/J(xu(x)) for every step. J has coefficent that will change each 
> step, so we must réevaluate.
> advantages : this is the only method to my knowledge to keep euler 
> explicit stable in a precise way (but my knowledge is limited ;) )
> disadventages : 
> - this states that no exterior error has been added to the function 
> between the steps. = no constraints.
> - we must evaluate J (but its not as complicated as implicit euler )
> We could however still use constraints and use a stricter condition, but 
> it will crash for crazy user imputs.
> 
> I don't have the stability conditions for heun in my courses :(
> 
> We could use slower but better integration methods :
> - Runge Kutta Fehlberg is an adaptive method. but it is really slow. 
> (it's matlab ode23 and ode45) But it is precise and quite stable.
> 
> I will look for the perfect integration method after my exams.
> 
> 3) Or, we could go for a totaly constraint based system :
> since integration errors are due to high forces variations on the 
> springs, we could use  small forces constants, but constraints to limit 
> elongation.
> It is well explained in this pdf,  
> http://www.mentalwarp.com/~fred/divers/E02.pdf
> 
> 4) I have read on many sources that the spring forces in clothes aren't 
> linear, but more like square or exponential. Linear give way to much 
> elasticity to the materials.
> But it will not solve stability problems :(
> 
> 5) Initial condition.
>  : freeze the scene an only simulate the cloth until it reaches its 
> equilibrium, then we use these values as initial conditions.
> Since only the equilibrium is needed we can use faster integration 
> methods, i will look how to do this.
> 
> Hope that it can help :)
> 
> -fred
> 
> 
> 
> 
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
> 

-- 
NEU +++ DSL Komplett von GMX +++ http://www.gmx.net/de/go/dsl
GMX DSL-Netzanschluss + Tarif zum supergünstigen Komplett-Preis!


More information about the Bf-committers mailing list