[Bf-committers] Softbody architecture

Ton Roosendaal ton at blender.org
Tue Feb 1 15:09:26 CET 2005


Hi,

Checking on the softbody status;
http://wiki.blender.org/bin/view.pl/Blenderdev/Softbodies
I'm still hesitating to make a choice for how to proceed with  
integrating it... with Blender's animation system in mind we can  
basically make three choices;

1) Integrated in Object types (Mesh, Curve, etc)
The simplest method is adding the necessary data for softbody (like  
'spring' and 'goal' constants) to existing structures in Mesh (like  
vertex groups). That way it can quickly work, including tools for  
vertex painting etc.
Disadvantage; add softbody to Curve, Lattice etc. then is very  
cumbersome

2) Generic Object level Softbody data
Each Object can get the full data required for softbody, including all  
vertex information (with indices mapped to actual vertices for 3d  
coords) and springs. Routines (special editing mode?) are needed to  
convert Mesh->Softbody, edit springs and 'body points', and new tools  
have to be written for painting tools.
This is how Maya does it, including the 'error' that arises when  
editing the Mesh itself; deleting vertices then screws up the indices  
in the Softbody structure. We can do better, of course. :)
Disadvantage: This method is a bit 'un-blenderish', especially because  
the object itself is extended with a lot of data and editing methods...  
probably causing clumsy (modal) UI methods as well.

3) New Object type
We can also provide a new type of Object, which then offers a 'soft  
body construction kit' in editing mode, allowing its own editmode for  
physically behaving bodypoints to be added, springs, painting weights,  
etc. Main issue to solve then is establishing relationship(s) with  
another Object (or Objects). However, this can be done based on a  
deforming (parent) relationship (like a Lattice), or on a "map indices"  
method - where the vertex coordinates of a softbody are copied from/to  
another Object based on index numbers, like in the previous type. Plus  
it can support Hooks, vertex parents, etc.
Disadvantage: Making a Mesh Object to "Softbody" then is a bit  
clumsy... but could be done with an option that automatically converts  
the Mesh data to a new Object, and inserting it as a Parent...

Writing down the three choices makes me tend to the third option, which  
basically is the mythical Emo Object, as being hyped a while during  
conferences. :)
Best positive side of the third choice is that it becomes very  
'Blenderish', fitting in the current architecture (and UI) nicely.

-Ton-

------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton at blender.org  
http://www.blender.org



More information about the Bf-committers mailing list