SmartBody BML
From smartbody
Contents |
SmartBody BML
Smartbody's SBM process uses a limited subset of the Behavior Markup Language. You can find the full SAIBA BML specification here.
XML Document Format
SBM requires the BML to include a proper XML prolog. The top level element must be <act>, within which there should be exactly one <bml> element and may additionally include an <fml>. SBM will attempt to parse every element inside the <bml> element as a behavior request, ignoring the behavior if it is unable to to parse the element.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<act>
<bml>
<!-- One or more behaviors... -->
<head type="nod"/>
</bml>
</act>
Behavior Elements
The following are the currently (2008 May 15) implemented behavior tags:
| <body> | Change body posture |
| <face> | FACS-based facial expressions and visemes |
| <gaze> | Gaze and spine control |
| <head> | Head nods and shakes |
| <sbm:animation> | Applying an animation |
| <sbm:event> | Timing feedback and other synchronized messages output |
| <speech> | Verbal behaviors with lip-syncing |
Identification
Each behavior can be identified with an id attribute.
<head type="NOD" id="nod1" />
The behavior ids act and bml should be considered reserved. act is used to refer to the start and end of a behavior set, and will eventually be transitioned to bml to match the current SAIBA specification.
Timing and Scheduling
Behaviors can be scheduled relative to each other via any of five sync points:
| start | The time at which the behavior starts to take effect. |
| ready | The time at which the behavior has completed any preparatory action. |
| stroke | The most effortful point of the behavior. For example, the beat of a beat gesture. |
| relax | The beginning of the retraction. |
| end | The completion of the behavior. |
Note: The standard BML sync points stroke-start and stroke-end are currently not implemented. Unfortunately, this makes it impossible to describe a anticipatory hold or continuation hold.
Each synch point is represented by an similarly named attribute. The attribute has the following syntax:
| Standard | behavior-id:synch-id | |
| with offset | behavior-id:synch-id + offset | |
| behavior-id:synch-id - offset | ||
| Shorthand | offset | Equivalent to bml:start+offset |
Note: The offset syntax has several bugs that prevent it from working properly at the moment.
