University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

Improving Smartbody performance and mixing behavior sets? | General SmartBody Discussion | Forum


Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Improving Smartbody performance and mixing behavior sets?
September 1, 2014
6:24 pm
Forum Posts: 16
Member Since:
June 25, 2014
sp_UserOfflineSmall Offline

Hi Ari,

I would like to ask you a few questions regarding characters, behavior sets and performance.

1. I would like a character to be able to perform two behavior sets (motion and kicking), ¿is there a way to use the kick behavior set while a character is using a motion behavior set? for example, let's say a character is running and has to kick a soccer ball in front of him, which would be the steps required to allow the character to do that? Is there a way for the character to kick the ball as he moves? (i.e. blending in some way motion and kicking animations).

2. In order to set a character's orientation, I have come across a problem: when I set the character orientation with SBCharacter::setHPR() or SBCharacter::setOrientation(), the character is not able to reach a point when I send him locomotion commands (it seems like he is not able to turn, although he tries to do it), so I'm doing something wrong. The idea is setting the character orientation only at the begginning of the scene. Which would be the right way (or moment) to do it?

Also, I would like to know if is there a BML command to establish the facing of a character with animations (i.e., a BML command to set only the facing of the character) or if it must be always a parameter for a locomotion BML command with a particular target. I've tried executing a locomotion command setting as target the character's position and a different facing angle, but the character doesn't turn around.

3. About the motion behavior set, are there any parameters to control whether a character moves strafing or backstepping to reach his target? I've read the "Force no strafing?" thread in the forum, but I would like to know if there's an option to tell it "on the fly" with parameters. The idea is, depending on a parameter, send a BML locomotion command to the character indicating whether to go to the target strafing or backstepping

4. When a character is out of camera, I would like to update the minimum information for that character. I can handle transform buffer updating but, are there other parameters for that character that I could do not update to gain performance?

5. And finally, are there other optimizations regarding performance when it comes to motion behavior sets? maybe there are features which can be partially or totally disabled, or parameters which can be tuned in order to help characters to reach their targets saving computational cost (losing precision perhaps). I have 22 NPCs, and sometimes the frame rate slows down when the positions they have to reach change quickly or when they have to switch from walking to running and vice versa.

Edit: I've read about the MaxSimTime parameter, it helps a lot, but I wonder if there is also a specific approach for each character.


thank you very much again,


best regards,


September 3, 2014
1:04 am
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

1. If you want a character to kick a ball when he moves, you are best off creating such a motion set explicitly. The results of a (walk+kick) blend wouldn't be very good.


2. Setting the orientation of a character sets the global orientation of the character. No matter what this setting is, the character should be able to reach (via locomotion) his/her destination.

If you want the character to move to a new facing direction, you can always access the blend directly by first getting the current orientation, then moving a little towards the new orientation:

<blend name="mocapIdleTurn" value="30"/>

the above command will turn the character approximatly 30 degrees.


3. The locomotion happens automatically via the steering interface. But again, the locomotion is merely a set of blends that you can control directly if you like.


<blend name="mocapLocomotion" x="100" y="20" z="4"/>

where x = forward, y = turning angle, and z = strafing amount


4. I don't have any LOD controls for the character, although that is a good idea.


5. There are a lot of controllers, many of which could be disabled which might help performance improve.

Look at:






September 17, 2014
11:54 am
Forum Posts: 16
Member Since:
June 25, 2014
sp_UserOfflineSmall Offline

Hi Ary,


Thanks for your reply. Indeed, I was setting wrong the character orientation and now works fine. I have tried disabling all the non basic controllers for the characters and have experienced a 50% performance boost :)

Regarding the motion question, I have a small problem I present in a new thread,

Thanks a lot for your help,


best regards,