SmartBody : Constraint

Description

SmartBody contains a constraint system that allow a character to maintain an end effector (hand, foot, head) at a particular position. This is useful is you want a character to maintain contact with a particular point in the world (such as on the wall, a table, or another character). Such constraints can be used when trying to maintain contact with an object while gazing and engaging enough of the body to break the point of contact.

The left image shows the character gazing at the pawn (red sphere). Since character's upper body is engaged in the gaze, his hands also shift from their original position (imaging his hands resting on a table). With two constraints enabled (one for each hand), the right image shows the character gazing at the pawn again, but the hands maintain their original positions.

Requirements

A chain of joints from the root to the end effector of any name.

 

Usage

<sbm:constraint 
   effector="r_wrist" 
   sbm:effector-root="r_sternoclavicular" 
   sbm:fade-in="1" 
   sbm:handle="myconstraint" 
   target="elder:l_wrist"/>

 

Note that any number of end effectors can simultaneously use a different constraint. Note that using constraints is somewhat performance-intensive, and may reduce the frame rate of the simulation. Also note that the constraint system in SmartBody is intended to keep the character in particular positions or orientations, but not for bringing the character into those positions. Thus, constraints are most effective when their effect is subtle or small.

Parameters

ParameterDescriptionExample
targettarget pawn/joint whose the positional or rotational values will be used as constraints
<sbm:constraint 
effector="r_wrist"
sbm:effector-root="r_sternoclavicular"
sbm:fade-in="1"
sbm:handle="myconstraint"
target="elder:l_wrist"/>
sbm:handleHandle of this constraint instance, can be reused during later constraint commands.
as above
sbm:rootthe root joint for the current character. by default it is the base joint.
<sbm:constraint effector="r_wrist" 
sbm:effector-root="r_sternoclavicular"
sbm:fade-in="1"
sbm:handle="myconstraint"
target="elder:l_wrist"
sbm:root="base"/>
effectorthe end effector where the constraint will be enforced through optimization
as above
sbm:effector-rootthe influence root of this end effector. anything higher than this root will not be affected by optimization
as above
sbm:fade-inthe time for the constraint to blend in. this option is ignored if set to negative
as above
sbm:fade-outthe time for the constraint to blend out. this option is ignored if set to negative
<sbm:constraint
sbm:handle="myconstraint"
sbm:fade-out="1'/>
sbm:constraint-typethe constraint type to be enforced. it can be positional or rotational constraint
<sbm:constraint effector="r_wrist" 
sbm:effector-root="r_sternoclavicular"
sbm:fade-in="1"
sbm:handle="myconstraint"
target="elder:l_wrist"
sbm:root="base"
sbm:constraint-type="pos"/>
pos-xthe x positional offset added on top of positional constraint
 <sbm:constraint effector="r_wrist" 
sbm:effector-root="r_sternoclavicular"
sbm:fade-in="1"
sbm:handle="myconstraint"
target="elder:l_wrist"
sbm:root="base"
sbm:constraint-type="pos"
pos-y="10"
pos-x="15"
pos-z="5"/>
pos-ythe y positional offset added on top of positional constraint as above
pos-zthe z positional offset added on top of positional constraint as above
rot-xthe x rotational offset added on top of positional constraint 
<sbm:constraint effector="r_wrist" 
sbm:effector-root="r_sternoclavicular"
sbm:fade-in="1"
sbm:handle="myconstraint"
target="elder:l_wrist"
sbm:root="base"
sbm:constraint-type="pos"
rot-y="10"
rot-x="15"
rot-z="5"/>
rot-ythe y rotational offset added on top of positional constraint  as above
rot-zthe z rotational offset added on top of positional constraint  as above
startwhen to start the constraint
 <sbm:constraint effector="r_wrist" 
sbm:effector-root="r_sternoclavicular"
sbm:fade-in="1"
sbm:handle="myconstraint"
target="elder:l_wrist"
sbm:root="base"
start="3"
ready="4"/>
readywhen the constraint is fully engaged  as above

Attachments:

utah_constraint.png (image/png)
utah_no_constraint.png (image/png)
handsontableoff.png (image/png)
handsontableoff.png (image/png)
handsontableon.png (image/png)