University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

How to do jump or Locomotion in android? | General SmartBody Discussion | Forum

Avatar

Please consider registering
guest

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
How to do jump or Locomotion in android?
October 8, 2015
2:38 am
Avatar
Member
Members
Forum Posts: 22
Member Since:
August 23, 2015
sp_UserOfflineSmall Offline

 Hi All,

I want to do jump or Locomotion in android app.  now I can only do head nod/shake and gaze.  can we do the motion by skm, not need to run the script such as "BehaviorSetMaleLocomotion.py" ?  

Thanks! 

Paul.

October 8, 2015
3:48 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

You can play any motion that you want once it's loaded via BML:

<animation name="myanimation"/>

So if you had a jumping motion, you could certainly play it at any time...

The purpose of the behavior set scripts (like the BehaviorSetMaleLocomotion.py one you mentioned) is to collect all the animation, scripts and other processess needed to configure a character with that behavior. For example, locomotion consists of a blend of 20 animations for walking/running/jogging, then another 4 for turning around in place, then another 8 for the first step you would take from a standing position, then the steering/navigation/obstacle avoidance, then the retargeting needed for each character. This is all very complicated, so I put them under a simpler interface (behavior sets) which take only three lines of code to work.

There is a jumping behavior set that allows the charater to jump from a standing position; I recommend using that if you are looking for standing jumps.

 

Ari

October 10, 2015
7:34 am
Avatar
Member
Members
Forum Posts: 22
Member Since:
August 23, 2015
sp_UserOfflineSmall Offline

Ari,

The motion is the skm file ?  so your means that only by play the BML with the motion file, without any script like BehaviorSetMaleLocomotion.py ?

 

Thanks,

Paul.

October 10, 2015
4:46 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

Yes, you can load a motion in SmartBody in the skm format, or you can load it in bvh, asf/amc, or dae format as  well.

If you want to play a motion, then you can make a BML call like:

 

bml.execBML('ChrBrad', '<animation name="myjumpingmotion"/>')

 

If you want to create a transition from one animation to another, you should use the blend interface, which allows you to specify in and out transitions as well as transition times (look at page 132 of the SmartBody Manual "Configuring Motion Blends/Parameterized Animations").

If you want to use the set of jumping blends that I have already designed you can use the jumping behavior set:

scene.run('BehaviorSetJumping.py')
setupBehaviorSet()
retargetBehaviorSet('ChrBrad')

 then call one of the jumps by setting the x (forward distance, 0 to 2.4), y (up, 0 to .4) or z (left or right, -1.56 to 1.56) directions like this:

bml.execBML('*', '<blend name="Jump" x="1.5"/>')

 

You can also experiment with the Blend Viewer to interactively play around with the jumps.

 

Ari

Forum Timezone: America/Los_Angeles

Top Posters:

jwwalker: 80

jyambao: 52

rbaral: 47

adiaz: 30

WargnierP: 29

lucky7456969: 28

mbarros: 28

avida.matt: 26

JonathanW: 24

laguerre: 23

Member Stats:

Guest Posters: 67

Members: 99543

Moderators: 3

Admins: 4

Forum Stats:

Groups: 1

Forums: 5

Topics: 458

Posts: 2401