University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

Updated Version | 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
Updated Version
January 12, 2017
6:05 pm
Avatar
Member
Members
Forum Posts: 9
Member Since:
January 9, 2017
sp_UserOfflineSmall Offline

Hello Ari,

Is there an updated version of SmartBody aside from the one in SoureForge? We currently have a project that needs the software to be on Android but the version we have cannot import the third party models.

Yours truly,

Jarl

January 13, 2017
12:05 pm
Avatar
Admin
Forum Posts: 944
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

I would need to update the Android version to make sure it is working. There is a working version of SmartBody on android in the form of the VHVanilla/VHMobile project. http://smartbody.ict.usc.edu/v.....a-download

January 25, 2017
11:19 pm
Avatar
Member
Members
Forum Posts: 9
Member Since:
January 9, 2017
sp_UserOfflineSmall Offline

Hello,

Thanks! I'll look into it but can I ask for some help with these problems I encountered?

1. The scene that I export (assuming this is the equivalent of the 'save' option for others) cannot be 'Run Script' or 'Load from Script' for some reason. It always shows me this error:

smartbody save how

2. I was trying out the seventh tutorial (with an imported model) but SmartBody couldn't recognize 'ChrBrad@face_neutral' for some reason. Its in this link: https://imgur.com/a/UQidqJarl

January 26, 2017
10:51 am
Avatar
Admin
Forum Posts: 944
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

hmmm...

 

1) go to your saved scene file, and add the line:

import os

at the top

 

2) Your link is broken, can you repost?

 

ari

January 30, 2017
7:41 pm
Avatar
Member
Members
Forum Posts: 9
Member Since:
January 9, 2017
sp_UserOfflineSmall Offline

Aw, sorry about that. The link is

View post on imgur.com

My name got mixed in the URL.

Anyway, I was able to load the scene but its broken. According to the console, it could not get the texture properly from what I read. Though, the errors were plenty. Another problem is also the weird posture its doing as well as not loading the motions I included during the retargeting.

Here is the image:

View post on imgur.com

Also, how do you import a model with animation from Blender? When I dragged and dropped the dae file I created, it was able to import the model and skeleton (as well as popping up the retarget viewer). However, when I check the motions, there was a Dino.dae (which is also the file name of the dae file) in it that does nothing.

I checked the manual about importing custom skeletons and animations but the part where it mentions the motions is blank.

EDIT: May I also know how to get the Fbx to skm converter? I heard from someone that it might solve the problem regarding custom animations being imported into Smartbody.

January 31, 2017
10:14 pm
Avatar
Member
Members
Forum Posts: 9
Member Since:
January 9, 2017
sp_UserOfflineSmall Offline

I was able to import the model through a script but I can't make the model move even with the bones mapped. I was basing this on the tutorials but I can't seem to get where I'm doing it wrong.

Here is the source code for the import script

import inspect

#assetManager = scene.getAssetManager()

#fileMediaPath = "C:/Users/Jarl Brent/Desktop/Current School Work/SmartBody/DinoTest"

#scene.setMediaPath(fileMediaPath)

scene.loadAssetsFromPath("C:/Users/Jarl Brent/Desktop/Current School Work/SmartBody/DinoTest/Assets/Dino/Dino.dae")
scene.loadAssetsFromPath("C:/Users/Jarl Brent/Desktop/Current School Work/SmartBody/DinoTest/dino-map.py")
scene.loadAssetsFromPath("C:/Users/Jarl Brent/Desktop/Current School Work/SmartBody/DinoTest/Assets/behaviorsets/motions/ChrBrad@Idle01.skm")

#assetManager.addAssetPath("mesh", "Dino")

scene.run("dino-map.py")

dino = scene.createCharacter("Dino", "")

jointMap = scene.getJointMapManager().getJointMap("dinoSkeleton")

if jointMap != None :
    skeleton = scene.createSkeleton("Dino.dae")
    
    dino.setSkeleton(skeleton)
    dino.createStandardControllers()
    jointMap.applySkeleton(skeleton)
    jointMap.applyMotionRecurse('Dino.dae')
    
    dino.setStringAttribute('deformableMesh', 'Dino.dae')
    
    dino.setStringAttribute('displayType', 'GPUmesh')

 This is the code for the mapping, "dino-map.py":

def DinoMap():
    print "Went in script"
    jointMapManager = scene.getJointMapManager()
    jointMap = jointMapManager.getJointMap("dinoSkeleton")
    if ( jointMap == None ) :
        jointMap = jointMapManager.createJointMap("dinoSkeleton")
        print "Created Skeleton Map"
    
    jointMap.setMapping("brow01_L", "brow01_left")
    jointMap.setMapping("brow01_R", "brow01_right")
    jointMap.setMapping("brow02_L", "brow02_left")
    jointMap.setMapping("brow02_R", "brow02_right")
    jointMap.setMapping("brow03_L", "brow03_left")
    jointMap.setMapping("brow03_R", "brow03_right")
    jointMap.setMapping("brow04_L", "brow04_left")
    jointMap.setMapping("brow04_R", "brow04_right")
    jointMap.setMapping("cheek_low_L", "cheek_low_left")
    jointMap.setMapping("cheek_low_R", "cheek_low_right")
    jointMap.setMapping("cheek_up_L", "Cheek_up_left")
    jointMap.setMapping("cheek_up_R", "Cheek_up_right")
    jointMap.setMapping("chest", "spine3")
    jointMap.setMapping("eyeball_L", "eyeball_left")
    jointMap.setMapping("eyeball_R", "eyeball_right")
    jointMap.setMapping("foot_L", "l_ankle")
    jointMap.setMapping("foot_R", "r_ankle")
    jointMap.setMapping("forearm_L", "l_elbow")
    jointMap.setMapping("forearm_R", "r_elbow")
    jointMap.setMapping("hand_L", "l_wrist")
    jointMap.setMapping("hand_R", "r_wrist")
    jointMap.setMapping("head", "skullbase")
    jointMap.setMapping("hip", "base")
    jointMap.setMapping("index1_L", "l_index1")
    jointMap.setMapping("index1_R", "r_index1")
    jointMap.setMapping("index2_L", "l_index2")
    jointMap.setMapping("index2_R", "r_index2")
    jointMap.setMapping("index3_L", "l_index3")
    jointMap.setMapping("index3_R", "r_index3")
    jointMap.setMapping("jaw_back", "Jaw_back")
    jointMap.setMapping("jaw_front", "Jaw_front")
    jointMap.setMapping("lip_btm_L", "Lip_bttm_left")
    jointMap.setMapping("lip_btm_R", "Lip_bttm_right")
    jointMap.setMapping("lip_btm_mid", "Lip_bttm_mid")
    jointMap.setMapping("lip_out_L", "Lip_out_left")
    jointMap.setMapping("lip_out_R", "Lip_out_right")
    jointMap.setMapping("lip_top_L", "Lip_top_left")
    jointMap.setMapping("lip_top_R", "Lip_top_right")
    jointMap.setMapping("lip_top_mid", "Lip_top_mid")
    jointMap.setMapping("middle1_L", "l_middle1")
    jointMap.setMapping("middle1_R", "r_middle1")
    jointMap.setMapping("middle2_L", "l_middle2")
    jointMap.setMapping("middle2_R", "r_middle2")
    jointMap.setMapping("middle3_L", "l_middle3")
    jointMap.setMapping("middle3_R", "r_middle3")
    jointMap.setMapping("neck", "spine5")
    jointMap.setMapping("pinky1_L", "l_pinky1")
    jointMap.setMapping("pinky1_R", "r_pinky1")
    jointMap.setMapping("pinky2_L", "l_pinky2")
    jointMap.setMapping("pinky2_R", "r_pinky2")
    jointMap.setMapping("pinky3_L", "l_pinky3")
    jointMap.setMapping("pinky3_R", "r_pinky3")
    jointMap.setMapping("shin_L", "l_knee")
    jointMap.setMapping("shin_R", "r_knee")
    jointMap.setMapping("shoulder_L", "l_sternoclavicular")
    jointMap.setMapping("shoulder_R", "r_sternoclavicular")
    jointMap.setMapping("spine", "spine1")
    jointMap.setMapping("thigh_L", "l_hip")
    jointMap.setMapping("thigh_R", "r_hip")
    jointMap.setMapping("thumb1_L", "l_thumb1")
    jointMap.setMapping("thumb1_R", "r_thumb1")
    jointMap.setMapping("thumb2_L", "l_thumb2")
    jointMap.setMapping("thumb2_R", "r_thumb2")
    jointMap.setMapping("thumb3_L", "l_thumb3")
    jointMap.setMapping("thumb3_R", "r_thumb3")
    jointMap.setMapping("toe_L", "l_forefoot")
    jointMap.setMapping("toe_R", "r_forefoot")
    jointMap.setMapping("upper_arm_L", "l_shoulder")
    jointMap.setMapping("upper_arm_R", "r_shoulder")
    jointMap.setMapping("upper_eyelid_L", "upper_eyelid_left")
    jointMap.setMapping("upper_eyelid_R", "upper_eyelid_right")
    
    print "Done"
    
DinoMap()

Here is the link to the zip file of the directory I'm using: https://www.dropbox.com/s/oa5fe6q40t6i6jx/DinoTest.zip?dl=0

February 2, 2017
11:42 am
Avatar
Admin
Forum Posts: 944
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

try this as your TestImport.py code:

import inspect

#assetManager = scene.getAssetManager()

#fileMediaPath = "C:/Users/Jarl Brent/Desktop/Current School Work/SmartBody/DinoTest"

#scene.setMediaPath(fileMediaPath)

scene.setScale(.01)

scene.loadAssetsFromPath("C:/Users/Jarl Brent/Desktop/Current School Work/SmartBody/DinoTest/Assets/Dino/Dino.dae")
scene.loadAssetsFromPath("C:/Users/Jarl Brent/Desktop/Current School Work/SmartBody/DinoTest/dino-map.py")
scene.loadAssetsFromPath("C:/Users/Jarl Brent/Desktop/Current School Work/SmartBody/DinoTest/Assets/behaviorsets/motions/ChrBrad@Idle01.skm")

#assetManager.addAssetPath("mesh", "Dino")

scene.addAssetPath("script", "E:/sbsupport/nepped_student/DinoTest")
scene.run("dino-map.py")

scene.addAssetPath("mesh", "C:/Users/Jarl Brent/Desktop/Current School Work/SmartBody/DinoTest/Assets")
scene.addAssetPath("script", "behaviorsets")

dino = scene.createCharacter("Dino", "")

jointMap = scene.getJointMapManager().getJointMap("dinoSkeleton")

if jointMap != None :

skeleton = scene.getSkeleton("Dino.dae")
jointMap.applySkeleton(skeleton)
#jointMap.applyMotionRecurse('Dino.dae')

dino.setSkeleton(scene.createSkeleton("Dino.dae"))
dino.createStandardControllers()

dino.setStringAttribute('deformableMesh', 'Dino.dae')

dino.setStringAttribute('displayType', 'GPUmesh')

# setup locomotion
scene.run('BehaviorSetMaleMocapLocomotion.py')
setupBehaviorSet()
retargetBehaviorSet("Dino")

 

Ari

February 7, 2017
8:24 pm
Avatar
Member
Members
Forum Posts: 9
Member Since:
January 9, 2017
sp_UserOfflineSmall Offline

Thanks, man. Managed to tweak it a bit so that it'll work for the ChrBrad motions, though I had to put the scripts on the media path's root just so it would find them.

Gonna try doing it for the android (which means I'm not done bothering you, yet. Sorry.).

February 15, 2017
12:46 am
Avatar
Member
Members
Forum Posts: 9
Member Since:
January 9, 2017
sp_UserOfflineSmall Offline

Hello,

I've managed to import the model into an android device (yipee!). Though, I have a different problem now.

How do you import custom animations? I was checking the documentation but I can't seem to find the code snippet for setting the motion (if there is one because I saw a portion of the documentation that looks like it was cut off). Also, I'm coming from Blender.

When I check the motions hierarchy after dragging and dropping the model, I was able to see a motion of the same name as the model (that has the custom animation from Blender) but, when I try to play it, nothing happens. The model could do the premade motions available, by the way, like ChrBrad@Idle. I'm assuming that it can identify the animation but it can't seem to play it. I've tried playing it with the motion editor but to no avail.

Are there certain import settings in Blender that I have to tick? Or do I have to do something like the retargeting with the skeleton importing. Currently trying to figure out doing it on desktop before attempting it on android.

Jarl

February 15, 2017
5:30 pm
Avatar
Admin
Forum Posts: 944
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

For every motion:

1) You need to create a joint map that matches your own animation name to the SmartBody internal names

2) Your motions have a 'source' skeleton; you need to indicate what is that original source skeleton, then create a retarget instance between that skeleton and the skeleton of the character that you are using.

 

Ari

February 16, 2017
7:58 pm
Avatar
Member
Members
Forum Posts: 9
Member Since:
January 9, 2017
sp_UserOfflineSmall Offline

So, does that mean I'll have to export an animation separate from each other? Like I'll create animations from the same model but each one is contained in a separate copy?

Also, what are the Smartbody Internal Names? Is it done the same way as mapping the joints of an external rigged model?

Jarl

February 24, 2017
7:26 am
Avatar
New Member
Members
Forum Posts: 1
Member Since:
January 7, 2017
sp_UserOfflineSmall Offline

Hello,

I've managed to import the model into an android device (yipee!). Though, I have a different problem now.

How do you import custom animations? I was checking the documentation but I can't seem to find the code snippet for setting the motion (if there is one because I saw a portion of the documentation that looks like it was cut off). Also, I'm coming from Blender.

When I check the motions hierarchy after dragging and dropping the model, I was able to see a motion of the same name as the model (that has the custom animation from Blender) but, when I try to play it, nothing happens. The model could do the premade motions available, by the way, like ChrBrad@Idle. I'm assuming that it can identify the animation but it can't seem to play it. I've tried playing it with the motion editor but to no avail.

Are there certain import settings in Blender that I have to tick? Or do I have to do something like the retargeting with the skeleton importing. Currently trying to figure out doing it on desktop before attempting it on android.

Jarl

 

اهم النصائح للتسويق على اليوتيوب

February 24, 2017
10:57 am
Avatar
Admin
Forum Posts: 944
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

You can play any animation on the character using a bml command, but the names of the joints need to match the SmartBody names, so every animation should be joint-mapped to convert it to a format that SmartBody understands. Also, if you want the animation to be retargeted to your character properly, you need to specify what skeleton that animation is originally derived from (if it is different from your existing skeleton) and create a retarget instance between that skeleton and the skeleton that your character uses (again, if you used your character's skeleton as a basis to create the animation, then you can skip the retargeting step, since the motion will already match it...)

I probably need to write a clearer guide about this, and make this process easier.

Ari

March 22, 2017
6:33 pm
Avatar
Member
Members
Forum Posts: 9
Member Since:
January 9, 2017
sp_UserOfflineSmall Offline
14sp_Permalink
Awaiting Moderation

Forum Timezone: America/Los_Angeles

Most Users Ever Online: 733

Currently Online: bonadio56, irmawy11
26 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Member Stats:

Guest Posters: 61

Members: 11750

Moderators: 3

Admins: 4

Forum Stats:

Groups: 1

Forums: 5

Topics: 409

Posts: 2264