[Bf-committers] rest spring length for new softbody objects

Ton Roosendaal ton at blender.org
Fri Nov 18 11:01:26 CET 2005


Hi Jens Ole,

I would appreciate some more comments from you in the code...

- What are the position vectors origS, origE and origT again?

- You added a pointer to "rcs" to several calls, it seems to be for  
edge calculus, but why?
We could better define that for each call to "remake softbody", the  
spring lengths should be set OK, and not leave this to some later  
stage... otherwise we don't know for sure the original edge sizes.

I got confused a bit here, the lattice code you added makes springs,  
initializes them, but doesn't set the spring length (which is a  
constant even!). The Mesh code does set spring lengths however.

You agree with removing the 'rcs' variable, and set spring length in  
each "make softbody" calls? I can fix that :)

-Ton-




On 17 Nov, 2005, at 23:44, Ton Roosendaal wrote:

> Hi,
>
> Aah! that's indeed a flaw in the modifiers we need to tackle.
> The softbody modifier is not allowed to be after a destroying (or  
> adding) modifier, so at that time the original data is present.
>
> Since I know this code now, I'll put it on my list!
>
> -Ton-
>
> On 17 Nov, 2005, at 20:40, bjornmose wrote:
>
>> Hi ton and all,
>> there is an issue i want to discuss here:
>> The introduction of the modifier stack has changed the calculation of  
>> the lenght the springs try to preserve along edges. In order to  
>> remove all object (mesh) specific code Daniel introduced the spring  
>> lenght calulation with the vertices after they have been processed by  
>> the mofifier stack. This resulted in weird behavior of meshes when  
>> they were rigged to an armature and the armature is not in rest  
>> position while the softbody mesh is first created. The reason is,  
>> that the edges (spring) rest lengthes are calulated from the deformed  
>> mesh, so that the mesh tries to keep the edge lenght it had in the  
>> frame the SB object was created.
>>
>> For meshes i did reintroduce the spring lenght calculation from the  
>> original (unmodified) mesh to have predictable spring rest lenght no  
>> matter what the modifier stack does to the mesh later.
>>
>> However i left the default calulation for all other SB objects.
>> Well i assume lattices and curves are or should become deformable by  
>> armatures, hooks etc. so they will run in the same problem meshes  
>> had.
>>
>> My point of view is, that all objects should set rest lenght  
>> according to the vertex positions as they are in edit mode.
>>
>> Let me know what you think
>>
>> Jens Ole
>>
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at projects.blender.org
>> http://projects.blender.org/mailman/listinfo/bf-committers
>>
>>
> ----------------------------------------------------------------------- 
> ---
> Ton Roosendaal  Blender Foundation ton at blender.org  
> http://www.blender.org
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton at blender.org  
http://www.blender.org



More information about the Bf-committers mailing list