Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

SmartBody is a modular, controller-based character animation system. SmartBody uses the Behavior Markup Language (wiki spec and discussion forum) to describe a character's performance, and composes multiple behaviors into a single coherent animation, synchronizing skeletal animation, spoken audio, and other control channels.

SmartBody is released on SourceForge. Here are the most relevant links:

Users

Running SmartBody

There are two version of SmartBody distributed with the toolkit:

  • Embedded DLL, used for Gamebryo and Unity
  • Stand alone, used for Ogre

The Gamebryo and Unity renderers have SmartBody embedded, and will automatically load it; you do not have to do anything for this.

If you want to run Ogre, you will have to run SmartBody manually, with sequence/init file 'init-ogre-basiclevel-brad', after Ogre is up and running.

Alternatively, you can select any of the Gamebryo, Ogre or Unity profiles from the Launcher menu (Profiles), which will automatically select all the correct settings. The only thing you have to do is is click Launch in the Run Check line, under Run It All. Be sure to quickly select the Ogre options, in order to give it time to be up and running before SmartBody is launched after 15 seconds.

Making Brad Walk

You can make Brad move using the below keys:

  • T - Forward
  • G - Backward
  • H - turn right
  • F - turn left
  • R - strafe right
  • Y - strafe left
  • C - increase speed
  • V - decrease speed

For more information on SmartBody Locomotion, see below.

Authors

SmarBody can be instructed by sending it Body Markup Language (BML). Most of the toolkit components communicate with messages passing, see Architecture.

The NPCEditor sends a vrExpress message with the text to be spoken to the Nonverbal Behavior Generator (NVBG). The NVBG selects animations and gaze behavior, which is send to SmartBody in a vrSpeak (or vrAgentBML) message, containing BML. You can look at all the messages in the Logger, to see what is going on when Brad talks, gestures and gazes.

For example, you can have Brad look up and to his right by sending the following message (either from the Logger or the Launcher):

Panel

vrSpeak brad all message-id-1 <?xml version="1.0" encoding="UTF-8" standalone="no" ?><act>
<participant id="brad" role="actor"/>
<bml>

<gaze angle="20" direction="UPRIGHT" priority="1" xmlns:sbm="http://ict.usc.edu" sbm:joint-range="HEAD EYES" target="user"/>
</bml>
</act>

Alternatively, you can edit the sequence file that initializes SmartBody. For Gamebryo, that is init-gb-basiclevel-brad.seq in \data\sbm-toolkit\scripts. You can add 'pawns' that specify points in the environment. For instance, we have defined a pawn called 'user', which is basically the location of the camera (line 38 in the file). You can have Brad look at the pawns by sending vrSpeak messages with BML, or you can take a short cut for testing purposes by sending a 'sbm test bml' message, like 'sbm test bml character brad gaze user', where the last argument is the name of the pawn.

You can learn a lot by looking at the messages in the Logger to see how animations, etc. are begin triggered. For more in-depth documentation of SmartBody, see http://smartbody-anim.org/.

Developers

Smartbody Data Viewer

The smartbody data viewer is a very useful tool within smartbody, which enables users and developers to view, either in real-time or offline, the translations and rotational values of each joint/channel in the smartbody skeleton.

In order to launch this tool, go to the smartbody console and type "viewer open". This will launch the smartbody viewer.
Click on 'Window->Data Viewer'. This will launch the data viewer.

Image Removed

As shown in the above image, you can select which character's joints you want to monitor using the 'Character' drop down list. This should display all the characters currently loaded in smartbody.

The 'Controller' drop down list allows us to observe how the joints are affected upto the selected controller.
i.e. The controllers form a hierarchy where the controller lower in hierarchy has the priority say on the position/orientation of the joints as compared to the controller above it.
e.g. The "motion schedule" overrides the "posture" schedule. So if we have an idle posture which specifies the position/orientation of the joints, then the "motion schedule" which is in charge of playing animations overrides the joint information specified by the "posture schedule".
Thus by selecting the appropriate controller, we can monitor where in the hierarchy the joints are being modified in case of an error.

  • Using the "channels" and "monitored" lists, we can select which specific joints to monitor. Just use the buttons to select which joints to monitor. Only the selected joint information will show up in the graph.
  • The "Motion" dropdown list displays a list of all the animations that smartbody has loaded currently. By selecting a motion, we can see how that particular animation affects the selected joints over time.
  • The "No. of frames shown" option allows us to set the horizontal range of the graph and see how the joints are affected over that range of frames.
  • The "Rotation shown as" dropdown list allows us to choose how the rotations are displayed i.e. either as quarternions, euler angles or swing twist.
  • The X, Y and Z checkboxes allow us to select which component of the rotation is displayed in the graph.
  • The "Freeze" button allows us to freeze the progression of the graph and lock it upto that instant of time

Smartbody BML Viewer

The smartbody bml viewer is a tool within smartbody that allows us to see in detail the bml data that is being passed through smartbody in a graphical representation.

In order to launch this tool, go to the smartbody console and type "viewer open". This will launch the smartbody viewer.
Click on 'Window->BML Viewer'. This will launch the BML viewer.

Image Removed

As shown in the above image, the "Contexts" dropdown menu lets us select which bml we want to observe at a time. As smartbody keeps receiving the bmls, the numbers within the "Contexts" list will get populated.The
The timeline is from left to right, so we can see how the various animations, speech, head-nods, gazes occur with respect to each other in time.

As you can see above, the various components of the bml are divided into rows. In the above image, the first row displays the start, ready, stroke and end marks for the animations in the bml.
The speech row shows where in time the timemarks for each word occur. i.e. the first word begins at T0, the next at T1/T2 and so on.
The viseme row shows when each individual viseme is triggered with respect to the others.
The speechTimeMark row shows the start, ready, stroke and end marks for the visemes from the previous rows.
The event/Gaze/nod rows show when in the timespan of the bml, the particular event was triggered.
The Replay BML button allows us to resend the currently selected BML.

As we can see this is a very useful tool and can be invaluable in debugging applications and figuring out how the animations and other bml events affect each other.

Locomotion

Smartbody now provides for locomotion, which enables us to make the character walk using key strokes or commands.
In order to be able to do this, we have to first initialize the locomotion engine in smartbody. In order to do this, please follow the below steps.

Include the below commands in the sequence file that you use to initialize smartbody

e.g. in the case of the default character, Brad, the sequence file is "init-gb-basiclevel-brad.seq", for Gamebryo.
The commands used to initialize locomotion for Brad are as below.

Panel

test locomotion initialize
test loco char brad anim standing HandsAtSide_Motex
test loco char brad anim walking Walk 17 28 4 37 9 23
test loco char brad anim walking Strafe 25 39 1 52 25 27
test loco char brad enable

Explanation:

  • The first command i.e. "test locomotion initialize" initializes the locomotion engine.
  • The second command specifies the standing animation for the character which in the above case is "HandsAtSide_Motex"
  • The third command specifies the walking animation for the character (walk forward/backward. In the example the strafe animation is called "Strafe". The numbers after the command are actually frame numbers from the animation in question, and are basically as follows
  1. Frame number in the animation for left foot when the foot is in forward position
  2. Frame number in the animation for left foot when both feet are back together
  3. Frame number in the animation for left foot when the right foot is forward and the left foot is about to be lifted again
  4. Frame number in the animation for right foot when the foot is in forward position
  5. Frame number in the animation for right foot when both feet are back together
  6. Frame number in the animation for right foot when the left foot is forward and the right foot is about to be lifted again
  • The next command is similar to the previous one, but specifies the Strafe animation. In the example the strafe animation is called "Strafe". The numbers after the command are like the above, but in this case the frame numbers are from the strafe animation instead of the walk animation.
  • The final command lets smartbody know that the character brads locomotion has been setup

Currently all three engines i.e. Gamebryo, Unity and Ogre have locomotion enabled in them for the example 'Brad' character. You can make Brad move using the below keys

Panel

T - Forward
G - Backward
H - turn right
F - turn left
R - strafe right
Y - strafe left
C - increase speed
V - decrease speed

The actual code for generating locomotion can be found in the application code for each of the engines in the toolkit.
The example locomotion implemented in the toolkit is pretty basic, but depending on the application, it can be very sophisticated. Ultimately, smartbody needs to receive the locomotion commands with the calculated parameters which specify the direction, speed and some other values. So the calculations are done on the application side and the values are made available to smartbody through the below command

Panel

sbm test loco char character name leftward-rightward-forward-backward speed time (this value specifies the fadeout time so the character doesn't stop abruptly)

The VHGB library provides a wrapper for this command using the VHGB::MoveCharacter() method. Look at the example code in the engines for how this method is used.

Message API

List here all the (ActiveMQ) messages this module receives and sends. You can use this section to explain how this module fits within the overall architecture.

Known Issues

Provide a list of known issues and peculiarities. Allow the reader to give feedback, probably by giving a link to the /wiki/spaces/VHTK/pages/14583665 page.

FAQ

Probably just link to the appropriate section in the Main FAQ.character animation platform that provides locomotion, steering, object manipulation, lip syncing, gazing and nonverbal behavior in real time. It is written in C++ and can be incorporated into most game and simulation engines. SmartBody is a Behavioral Markup Language (BML) realization engine that transforms BML behavior descriptions into realtime animations. It runs on Windows, Linux, OsX as well as the iPhone and Android devices.

SmartBody is integrated with a variety of game engines. Within ICT, the main target platform is Unity. SmartBody integration is included in the /wiki/spaces/VH/pages/30081705

For more information on SmartBody, see the SmartBody Manual