[Bf-committers] On current collision detection code for softbodies

bjornmose bjornmose at gmx.net
Mon May 30 01:41:28 CEST 2005


Hi Ton and all,

eagerly reading Baraff [BA] papers on cloth simulation, I focussed on 
doing best for that in current collision detection for SB.

Best:
1. As stated in the papers [BA] it is no good idea to detect the 
tansition of a particle through a surface to have a stable cloth 
simulation. The basic reason is : if a particle got inside, may be by 
initial conditions or by any other 'accident' it will be stuck there. So 
this (detect the tansition of a particle through a surface) is what the 
'original' particle collision code does and is acceptable because one 
escaping particle won't spoil the over all illusion. OTH cloth particles 
  trapped on the wrong side of the colliding face look very nasty.

2. The basic idea in Baraff [BA] papers to apply a force on particles to 
drive them to the outside and optionally drive it at a certain distance 
to it. So, what the hell is 'outside'. Simple: where the face nomal 
points to.
But consider 2 paralell planes facing in opposite diretions:
The particle is always 'inside' one plane. So we have to limit the 
inside condition of the first plane not to extend 'too much' into the 
forces generated by the second plane, otherways the particle gets pushed 
out by plane[1] then gets pushed out by plane[2] until it ends up in 
void space.

3. Current implementation decides:
a:
if particle is inside the prism defined by a potential collision tri 
face ( quads are always broken to tris ) and it's normal, distance to 
tri face is calculated;
else this tri does not generate any forces (exit).

b: if (a:) if (particle is inside and distance to face is smaller than 
inner thickness) calculate exponetial repulsive force;
else
  if (further inside) apply no force (exit);
  if (distance to face is smaller than outer thickness) calculate weaker 
force which is zero at outer thickness.

Attached a InnerOuter.gif (i can host it for a while if this does not work)

ole
-------------- next part --------------
A non-text attachment was scrubbed...
Name: InnerOuter.gif
Type: image/gif
Size: 25677 bytes
Desc: not available
Url : http://projects.blender.org/pipermail/bf-committers/attachments/20050530/de9a2385/InnerOuter-0001.gif


More information about the Bf-committers mailing list