Table of Contents

BML Realizer - SmartBody Commands

This list is NOT 100% complete. More advanced commands and advanced optional parameters are possibly not included.

Official SmartBody wiki - Commands

Command variables are presented between angle brackets, < and >.

Optional arguments are presented between square brackets, [ and ].

bp

Internal BML Processor commands

bp reset

Clears any currently pending BML acts, thus freeing their act ids for reuse. Outside of debugging with .seq files, all BML acts should have unique character and act id key pairs, so this should not be an critical issue. Also, once all the failure cases are checked with timeouts, this command should not be necessary anymore.

bp speech_ready <character id> <request id> SUCCESS

A SmartBody::SpeechInterface callback, informing the BML processor that speech data is ready.

bp speech_ready <character id> <request id> FAILURE <error message or reason>

A SmartBody::SpeechInterface callback, informing the BML processor that speech data failed to be compiled.

camera

Configures the camera in the scene viewer window

camera eye <x> <y> <z>

Sets the camera position in the scene.

camera center <x> <y> <z>

Sets the point that the camera looks at in the scene.

camera scale <scale>

Sets the camera scale.

camera default

Restore the camera to its default configuration.

char

Commands used to create, control, and remove characters at runtime

char <name> init <skeleton file> <class>

Creates and initializes a character with the <skeleton file> (found on the ME path) and the <class>. The class is evaluated by a renderer, such as BMLR.

char <name> remove

Removes the character from the scene.

char <name> inspect

Prints out debug information about the character.

char <name> prune

Prunes the controller trees of unused/overwritten controllers.

char <name> ctrl

Adds or removes a named test controller.

char <name> viseme <viseme id> <weight> <rampin duration>

Sets the weight of a character's viseme. The <rampin duration> (in seconds) enables the viseme weight to change gradually.

char <name> bone <bone id> <w> <x> <y> <z>

Sets the quaternion rotation of the character's bone named <bone id>.

set char

set char <name> world_offset [x <x>] [y <y>] [z <z>] [h <h>] [p <p>] [r <r>]

Sets the characters position and orientation in the world. XYZ is the position and HPR is the orientation, where h is heading (yaw), p is pitch and r is roll. Any combination of xyzhpr in any order can be specified. See the coordinate systems section.

set char <name> voice <remote> <voiceID>

Sets the characters voice, using a speech synthesizer.

set char <name> voice <audiofile> <voicePath>

Sets the characters voice, using pre-recorded audio files.

ctrl

Commands to create, initialize and destroy named controllers. These commands are primarily test commands available for controller programmers.

divulge

Prints contents of:

srHashMap <SkPosture>		pose_map;
srHashMap <SkMotion>		motion_map;
srHashMap <MeCtPose>		pose_ctrl_map;
srHashMap <MeCtMotion>	motion_ctrl_map;
srHashMap <MeCtSimpleNod>	snod_ctrl_map;
srHashMap <MeCtAnkleLilt>	lilt_ctrl_map;
srHashMap <MeCtScheduler2>	sched_ctrl_map;
srHashMap <MeController>	controller_map; 

echo

Echos text to the SBM console. Usually used for annotations inside sequences

echo <text>

Prints <text> to the console.

J_L

Shorthand for joint_logger

joint_logger

The joint logger is used for debugging animations and motion controllers

joint_logger <start/stop>

Starts or stops the joint logger.

set joint_logger joints [< +/- >] <joints>

Adds or removes a joint from being logged. If +/- are not specified, the complete list is defined.

set joint_logger duration <time>

Starts the joint logger for <time> seconds.

gaze

gaze <ctrl_name> target point <x y z>
gaze <ctrl_name> target euler <p h r>
gaze <ctrl_name> smooth <basis>
gaze <ctrl_name> speed <deg-per-sec>
gaze <ctrl_name> bias <key> <p h r>

lilt

This command is primarily a test command available for controller programmers

lilt <controllerID> <duration> <magnitude>

Creates a named lilt controller.

load

Loads SmartBody skeletons, motions, poses, etc

load motion[s] <path>

Loads all .skm motion files from <path> into SBM's list of known animations.

load pose[s] <path>

Loads all .skp pose files from <path> into SBM's list of known animations.

net_reset

Resynchs TCP connection

net_reset

Helpful in resyncing TCP socket connection to renderer.

pawn

To create a pawn:

 pawn PawnName init

To change the location of a pawn:

 set pawn PawnName world_offset x 0 y 160 z 45

As with characters, world_offset can be any combination of x y z h p r

path

Sets the working paths to SmartBody's data

path <path id> <pathname>

Appends <pathname> to a path list <path id>.

Currently valid <path id>s are:

seq Used to search for .seq files during a seq command.
me Used by MotionEngine to load .me MeContent files and .sk skeleton files.
bp Unused, but reserved by the BML processor for loading configuration data.

print

Print various internal variables to the console.

q

Shorthand for quit

quit

Quits the SBM process

quit

reset

Resets initial variables in mcuCBHandle class (mcu).

sbm

Communication between different SBM processes

sbm [id <process-id>] <sbm command>

Loopback command that calls the following arguments as another SBM command. It exists as a way for the elvin listener to trigger any command from the message type 'sbm'. Optional process-id supports targeting a specific SBM process. A non-matching process will discard the message.

sched

Test command for controller programmers

sched <schedulerControllerID> add <controllerID> <time> [<ease in> <ease out>]

Adds controller <controller id> to schedule <schedulerControllerID> at time <time> (in seconds). <Ease in> and <ease out> are schdeule duration (in seconds) for interpolating into and out of the controller.

set

Set various internal variables.

send

Sends messages to the message broker

send <elvin message>

Transmits <elvin message> using the ttu elvin wrapper.

seq

Execution of scripts that perform a sequence of other commands

seq <seq name> at <time> <sbm command>

Schedules <sbm command> at time <time> (in seconds) in the sequence <seq name>.

seq <seq name> [begin]

Starts running the sequence <seq name>. If the sequence was not generated at runtime by seq <seq name> at … commands, the system will search the seq path for a file named <seq name>.seq.

seq <seq name> abort

Stops running the sequence <seq name>.

seq <seq name> print

Prints the scheduled time and commands of sequence <seq name>.

snod

Test command for controller programmers

snod <controller id> <duration> <magnitude> [<repitiions> [<affirmitive>]]

Creates a named SimpleNod controller named <controller id> with the following parameters:

duration, in seconds

magnitude, in degrees

repitiions, where one repitition includes both up and down (or both left and right) components. Defaults to 1.0.

affirmative as an integer, so non-zero implies an vertical affirmative nod and zero is a horizontal head shake.

This command is primarily a test command available for controller programmers.

test

test bml [char <charname>] <bml>

Simple interface for building and sending basic BML requests

test fml <fml>

Simple interface for building and sending basic FML requests

viewer

Controls the SBM scene viewer window.

viewer open <width> <height> <x> <y>

Opens the viewer with dimensions <width>,<height> and at pixel position <x>,<y>.

viewer show

Opens the SBM scene viewer window with previously set size and position.

viewer hides

Closes the SBM scene viewer window.

vrAllCall

Notifies the renderer that SmartBody is ready to accept commands/BML.

vrAgentBML

Partially implemented replacement to the vrSpeak messages. This message specification should not be considered final, and should not be used in production environments.

Request

Request to SBM for a new BML performance, similar to vrSpeak.

vrAgentBML <character-id> <audience-id> <message-id> request <XML-act>

<character-id>	Character identifier
<audience-id>	Unused recipient or audience identifier
<message-id>	Per-character unique message identifier
<XML-act>	BML inside <act> element, prefixed with XML prolog

Start

Signals SBM has begun performance a BML request.

vrAgentBML <character-id> <audience-id> <message-id> start

<character-id>	Character identifier
<audience-id>	Unused recipient or audience identifier
<message-id>	Per-character unique message identifier

End

Signals SBM has halted processing of a BML request. This could be because the perfromance completed normally, was interrupted, or caused an error during processing.

vrAgentBML <character-id> <audience-id> <message-id> end <reason-id>

<character-id>	Character identifier
<audience-id>	Unused recipient or audience identifier
<message-id>	Per-character unique message identifier
<reason-id>	One of complete, interrupted, or error

vrSpeak

Evaluates BML blocks

vrSpeak <charID> <audienceID> <actID> <BML>

Commands <charID> to perform the act specified in <BML>. <charID> and <actID> should be a unique key pair over the life of the SBM process. <audienceID> is effective ignored.

<BML> is an XML message that should be of the form:

<?xml version="1.0" encoding="UTF-8"?>
<act>
 <!-- siblings to <bml> are ignored -->
 <bml>
  <!-- BML behaviors -->
 </bml>
</act>

Including the XML prolog (but not necessarily a DTD reference).

vrSpeak <charID> <audienceID> <actID> <BML_filename>

A variant of the normal vrSpeak used in testing where the BML is retrieved from a file instead of inline with the message.

uscriptexec

uscriptexec <string>

Sends string over UDP to the renderer.

wsp

wsp <command>

World State Protocol for the distributed version of SmartBody.