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

bjornmose bjornmose at gmx.net
Wed Dec 16 22:56:52 CET 2009


Hi Raul, 

Raul Fernandez Hernandez schrieb:
> Hi :)
>
>
>   
>> Hi Raul ,
>> hum .. still missing the point
>> to me it looks like a force field  ( potential )  .. having a minimum
>> at  R ( which you define as rest length )
>>     
>
>   Yes, that's the potential energy of the hook's force, there's nothing
> troublesome there :)
>   
right
>
>   
>> So..
>> 1. what is the point in having a potential  arranging  a mesh close to a
>> S3 (sphere in 3D )
>>     
>
>  That was just a quick/useless set up to show the effect, that is not a
> real use case, a more real use case is the first video in my site, the
> simple.wmv  where each particle extend springs to the rest, when you have
> tons of points pulling/pushing themselves around their relatives rest
> lengths interesting things happen and shapes arise, that bunch of points
> (particles, etc) became elastic :)
>   Also, in the first useless example you could set the center not just the
> force object center but the objects vertices or every surface point and
> then you will get more complex behaviors, not only OSCILATING the mesh
> around an S3.
>   
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. 
>   
>> 2. the lack of other forces .. like friction to surrounding media ..
>> even internal friction ..  makes it look quite. say .incomplete
>> but still
>> may be i am missing the very spot, enlighten me
>> BM
>>     
>
>  This force perfectly interacts with the rest of the forces, and although
> adding velocity damping is not difficult at all I think is redundant
> since those effects could be achieved with the particle damping factor in
> the Newtonian panel. Think of it as a system and not as an isolated
> force, the rest of the system have drag forces,damp factors etc, so for
> complex behaviors like dampen springs you just set them also and there's
> no need to increase force complexity adding those alreday calculated
> therms to the force source code.
>  (Againg, if there's some use cases that justify it in the force source
> code it will be a matter of minutes to add it)
>
>                                Cheers   Farsthary
>
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
>   
I see:

There is a change in the entire concept then.
The 'old' effectors had an empty to be the source of a field acting on 
other objects.
For example: soft bodies do all the internal force accumulation inside ( 
lots of springs and including collision )
and finally asks:
'anyone likes to add a force at this position?' ( hiding everything but 
the vertex position  --> forward dependency only )

Now the object vertices start interacting with each other.
That invokes: telling the effector system to add a force source myself 
and updating properties
(position,rest_length ...yes, could be animated ) of the source while 
running.
Also would require to fire dependency graph change event. ( on that 
level there is no 'affects only me' guarantee )
I smell trouble with the dependency graph there as soon as two objects 
of that kind interact. (e.g. collide)
(Sorry for being a bad boy again.)

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?

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.


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


More information about the Bf-committers mailing list