University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

Generate bvh file and skm file by code or using smartBody GUI | General SmartBody Discussion | Forum


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
Generate bvh file and skm file by code or using smartBody GUI
April 14, 2015
2:17 pm
Forum Posts: 3
Member Since:
April 14, 2015
sp_UserOfflineSmall Offline

how to Generate bvh file and skm file by code or using smartBody GUI ?

and how to animate character by code?


April 14, 2015
4:59 pm
Forum Posts: 985
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

There are functions on the SBMotion object:



which allow you to save the contents of a motion to an .skm  or .bvh file. 

If you want to produce a motion object (that contains an animation by code) you can construct one using Python with the:



If you want to create animation on-the-fly, then you can write a controller to do so. Here's an example using Python:


class MyController (PythonController):
   def init(self, pawn):
      print "Setting up my controller..."
   def evaluate(self):
      # every time step, set a channel value

      self.setChannelPos("base", SrVec(1, 17,3)) # sets a translation channel

      self.setChannelQuat("l_wrist", SrQuat(1, 0, 0,0)) # sets a rotation/quaternion channel

      self.setChannelValue("open", .5) # sets a value for a channel

myc = MyController()
# get the character
character = scene.getCharacter('mycharacter')
# add the controller somewhere in the controller stack. In this case, after the 10th controller
character.addController(10, myc)


Is this the information you are looking for?



Forum Timezone: America/Los_Angeles

Most Users Ever Online: 733

Currently Online:
104 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

jwwalker: 80

jyambao: 53

rbaral: 47

adiaz: 30

WargnierP: 29

lucky7456969: 28

mbarros: 28

avida.matt: 26

JonathanW: 24

laguerre: 23

Member Stats:

Guest Posters: 72

Members: 2025

Moderators: 1

Admins: 3

Forum Stats:

Groups: 1

Forums: 5

Topics: 525

Posts: 2471

Moderators: smbyadmin: 0