[Bf-committers] New force type patch: Spring (Farsthary)

Raul Fernandez Hernandez raulf at info.upr.edu.cu
Thu Dec 17 16:56:52 CET 2009


Hi BM


> These features are in soft / cloth but handled in a context specific way.
> I'd like to see them i a larger, more general framework.
> For cloth ( hair is even worse )  i am not sure if it works since it
> must use topological properties of the mesh for untangling and such,
> but  borders from viscous particle fluids to soft 'solids' are not
> really there.  ( Only depends on the spring structure inside )
> So it should be possible for soft bodies.

 Yes, the spring force for particle systems add softbody-like behavior but
not hair-like/cloth-like because as you said it requires topological
information that by its very definiton a particle system don't have and
also is not needed.
 The spring force is juts another force type (like vortex, magnetic, wind,
etc), a force type that have its use cases, is not an attemp of
unification of the physics system, it just add elastic behavor to the
particle system in a consistent and easy way.
  In theory a particle system could became everything and include all
simulation effects (cloth,hair,softbody,fluids,smoke....) and while
having a general physisc framework is a desirable feature I don't think
is feasible rigth now but that should not be an excuse to let the users
waitin for those features.
   What we (Stephen,Jahka,me) are doing is adding those behaviors to the
particle system: now spring forces that adds elastic/plastic
softbody-like behavior and soon SPH particles that add fluid like
behavior.
  Specialization vs generalization will always be an eternal debate and I
think the best option is a mix of both.

  This patch add a simple spring force type, we are working also in a more
softbody like model with dynamic arrays of springs that perhaps fulfill
more the rigid/sorftbody target. :)


> On the long run i can imagine the entire soft body module moving to there.
> Though the mayor part of the soft body code deals with building up and
> managing states of
> complex spring structures with respect to ( vertex group ) painted
> distributions of mass, spring constants and damping.
> Accumulation of forces and solving differential equations is the far
> smaller part :)
> Beside it deals ( in pretty clumsy way ) with edge vs face collisions
> which particles due to the vertex only nature
> don't need, but would need for nice hair. As i said before hair is even
> worse. Good hair needs collision and untangling of strands
> -> definitely makes use of topological properties.
> Still, that would be a very nice unification of the 'spread all over
> physics' right now.
> Don't know how that fits to the mesh modifiers then?

 Again, I don't think it will happen, while particle systems could feature
sotbody behavior I think there always be cases where an especialized
softbody implementation that could use the topological information of
meshes is the best choice and in the case of clothes and hair is even
less possible.
   But then again, I don't think is a necesity :)

> I think damping along the spring direction is needed:
> Think of a vertex orbiting around the centre an only radial components
> decay.
> (And yes i know it is a 3 liner, if the velocity of the vertex is
> available)
> For more complex meshes that would keep the motion of the entire object
> but eating
> 'inner' vibrations. Like a lava eruption from a planet with no
> atmosphere and too small
> to keep the lava blob in range via gravitation.

 While that could be achieved curretly simply increasing the particle damp
value it will not harm then implementing velocity damping inside the
spring force.


> Finally i have to say: I am very impressed/pleased to see which
> direction the 'physics thing' is taking and
> like to be constructive, productive, helping .. when ever i can.
> So don't take this as  /ME rants 'will never work .. grumble'
> but things i'd like to be thought of before making decisions.
> BM

    It's OK :) , I preciate every feedback and I really thank you for
taking your time and discuss this topics with me, your doubts could be
the doubts of many and we all end up winning here ;)

    I still need the approval of Jahka to take some design decitions but
if it gets in I could elaborate with more time an extensive
documentation and tutorials about this feature, since a video tells
more than words :)

                                                Cheers  Raul (Farsthary)



More information about the Bf-committers mailing list