[Bf-committers] questions on the implicit solver commit
bjornmose at gmx.net
Thu Jan 10 02:01:10 CET 2008
just wanted to publish that here,
because i feel there is a rising divergence in what users think the
softbody module is for and what i am working on.
Even if the softbody module gets better in faking cloth it has other
tasks to cover /* such as make nice wobbeling bellies */ and just
because i 've added extensions to cover materials that have a distinct
behaviour on push and pull that does not mean the softbody module claims
anything close to true physical simulation, though i think keeping close
to the knowledge some physicists have won't hurt.
further more i am guilty for renaming controls to somethings non math
people might understand ..
i'd better stop now
why at all? because i spent the time to answer that mail
well, soft bodies are not exactly for cloth simulation, but as the name
says for soft jiggeling objects.
There is an extra branch in SVN intended to have cloth specialized code.
Most of the papers i read on cloth simulations deal with mass spring
I basicly refer to the Pixar paper by Baraff and Witkins and they state
that very hard springs are needed to get nice looking cloth.
Further it is well known that systems with strong elastic forces and
high damping lead to stiff sets of ODEs.
The general approach is to invoke a implicit solver. Since solving
inplicit nonlinear equations is a topic on its own
the way mostly followed is a taylor expansion to 1rst order and
rearrange the equations.
The most simpele variant of this is the so called impicit euler. This is
what i also committed here.
What's missing is a smart step size control to go as fast as possible
withing a given error limit.
The 'old' and good (fast) solver for soft bodies is a symplectic
adaptation of a 2nd order runge kutta type.
Of cause with adaptive step size.
Funny enough my experience so far is, because it is very simple it
performs faster than the implicit most of the times
though it has to do much smaller steps. But as i said in the commit,
building up and inverting that huge sparse matrix
is quite expensive so, that the benefit of going large steps is balanced
against the extra costs.
As stated before the softbody shoots in other directions than beeing a
perfect cloth solver.
But the papers i read made me 'steal' the concepts to widen the possible
use of the softbody engine.
Recent event to look into this a bit deeper is the new particle system.
Most of the complaints were about:
when softbodies are applied to 'hair' it was too stretchy. That is why
a gave it a try.
Tomas Björklund schrieb:
> I saw your post on the blender forum today. I can't say I understand
> exactly what you're doing (softbody or cloth or a hybrid of the two).
> What cought my attention was:
> 1. control on springs needs to be split in pushing and pulling /*
> fabric pushes easy but pulls hard */
> Now I don't now how heavily you are into math but as you probably have
> seen already springs aren't the best way to simulate cloth with. Yes,
> it might be the easiest but not the best. The problems you have
> discovered can't be worked around. Since cloth are very stiff you need
> very hard springs and with very hard springs you need short
> integration times - thus it becomes very sloooow. Cloth really doesn't
> act springlike if it is not pulled extremely hard so it isn't really
> natural do simulate them as strings anyhow.
> I have a friend that is right now working on his master thesis which
> should be done in a month or two. There he simulates a totally stiff
> string (1D-cloth). With stiff I mean it does not change length at all.
> I don't mean it can't bend, it is actually very good at bending. It
> can be everything between an overcooked spagetti or an uncooked
> spagetti (with realistic two point breaking of the uncooked spagetti
> strand when bent too much - try it yourself in the kitchen).
> The method he uses is calculations by Descrete Differential Geometry.
> What that actually does is calculate the bending energy of the
> curvature of the string. To solve it it is set up as a restrained
> system where the pulling/pushing forces are represented as lagrangian
> multipliers. Then he uses an symplectic integrator to calculate the
> position of each vertex so that the string doesn't loose energy over
> time. This, I *think* is repeated until convergence. At least,
> something is repeated until convergence ;-)
> The novelty in his thesis is the breaking part, the rest you should be
> able to find papers about on the net, though I have not looked myself.
> If you are interested I would suggest googling for the following
> (combined with cloth and string and such terms):
> 1. Descrete Differential Geometry
> 2. Symplectic integrator
> I have followed my friends thesis work over his shoulder so I know the
> basics of it but not closer than that. The work he is doing is for a
> company so I am not that thrilled on asking him to reveal the company
> secrets. But what I have disclosed here is of course not secret, it
> has been done before. And his thesis will of course be made public
> once finished.
> If you find some really good papers you might be able to pull it off
> integrating that in Blender. Then blender would have a totally
> kick-ass cloth system.
More information about the Bf-committers