University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

Import characters from Blender | 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
Import characters from Blender
April 28, 2016
2:10 am
Avatar
Member
Members
Forum Posts: 7
Member Since:
April 28, 2016
sp_UserOfflineSmall Offline

Hi,

For an internship I have to work with SmartBody and create some new characters. I am creating the characters using Blender. After reading the documentation extensively I figured out how to correctly rig the characters and export them. When I try to import the character as a .dae file into SmartBody, the character appears in a T-pose but with a wrong rotation (screenshot can be found in the attachment).

The rig doesn't appear to work at all, I tried three things:

1. Tick the box "include armature"  in the export options of Blender.
2. Export the rig as a seperate .dae file and import this in SmartBody
3. Export the rig as a seperate .fbx file and import this in SmartBody

Neither of the three options seem to work in my case.

When I try to show the rig, it shows up as a single dot. When I do this for ChrBrad, it shows me all the joints of that skeleton.

With the post I will enclose the .blend files, the .dae files and finally some screenshots to walk you through the steps I have taken.
https://www.dropbox.com/sh/rtdxal2k7fmcu7i/AADGvqpruny0wBxXAqik3ViHa?dl=0

Would it possible help to use the FBXtoSBConverter? However, I could not find where to obtain this.

I hope you can help me solve this problem.

Kind regards,
Yannick

May 10, 2016
6:42 am
Avatar
Member
Members
Forum Posts: 7
Member Since:
April 28, 2016
sp_UserOfflineSmall Offline

Hi Ari,

I still haven't found a solution. If you could help me out, that would be great!

Kind regards,

Yannick

May 16, 2016
11:35 am
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

The fbxtosbconverter is located in the source distribution on SourceForge (sourceforge.net/projects/smartbody) under the tools/FbxToSBConverter.

 

However, the .dae option should work..

Can you send me the .dae?

 

Ari

May 18, 2016
1:02 am
Avatar
Member
Members
Forum Posts: 7
Member Since:
April 28, 2016
sp_UserOfflineSmall Offline

Hi Ari,

This are the .dae files I use. I've added a .txt file with additional information on the code and what I've tried.

Link to Dropbox

Regards,

Yannick

May 19, 2016
9:32 am
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

On line 11 of your .dae file there is an XML element called '<up_axis>'.

Change it from Z_UP to Y_UP and your problem should be fixed.

 

Ari

May 23, 2016
1:14 am
Avatar
Member
Members
Forum Posts: 7
Member Since:
April 28, 2016
sp_UserOfflineSmall Offline

Hi Ari,

Thank you for the response. However changing that line does not seem to impact the rotation in Smartbody (it does in Blender). I've now solved the rotational issue by applying a 90 degrees y-rotation in Blender.

When I export the character with the armature (thus the skinning information) included, it does not appear in SmartBody. Does the character with skeleton work for you?

I have now used this character:

Link to Dropbox

Yannick

May 25, 2016
6:05 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

I can see the skinned character in grayscale. Does it not appear for you?

June 6, 2016
1:25 am
Avatar
Member
Members
Forum Posts: 7
Member Since:
April 28, 2016
sp_UserOfflineSmall Offline

Hi,

We use SmartBody implemented in ViSTA. When I import the skinned character into here, I am not able to see it. However, when I import it without armature data, it does show up.

I will try to import the skinned character into the standalone application to try to backtrace the problem.

Regards,

Yannick

June 7, 2016
1:57 am
Avatar
Member
Members
Forum Posts: 7
Member Since:
April 28, 2016
sp_UserOfflineSmall Offline

Hi,

I have tried to get it working in the standalone application. When I drag-and-drop the character in, it shows up. I then retarget the bones in order to use existing animations. However, when I play an animation the character deforms rather odd and later even disappears.

I have enclosed another dropbox link with the .dae file I used and a short video of what is happening.

Link to dropbox

Regards,

Yannick

June 8, 2016
2:05 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

You won't be able to use the automatic mapping for your character; you'll need to create a script that maps your character's names to the standard SmartBody names.  So the steps are :

 

1) Create a mapping script, here's a sample one (substitute your joint names):

def mymap():

# Mapping from ipiSoft skeleton to SmartBody skeleton

jointMapManager = scene.getJointMapManager()
mymap= jointMapManager.getJointMap("ipisoft")
if (mymap== None):
mymap= jointMapManager.createJointMap('mymap')

# Core
mymap.setMapping("Hip", "base")
mymap.setMapping("LowerSpine", "spine1")
mymap.setMapping("MiddleSpine", "spine2")
mymap.setMapping("Chest", "spine3")
#mymap.setMapping("", "spine4")
mymap.setMapping("Neck", "spine5")
mymap.setMapping("Head", "skullbase")

# Arm, left
mymap.setMapping("LClavicle", "l_sternoclavicular")
mymap.setMapping("LShoulder", "l_shoulder")
#mymap.setMapping("", "l_upperarm1")
#mymap.setMapping("", "l_upperarm2")
mymap.setMapping("LForearm", "l_elbow")
#mymap.setMapping("", "l_forearm1")
#mymap.setMapping("", "l_forearm2")
mymap.setMapping("LHand", "l_wrist")
mymap.setMapping("LFinger0", "l_thumb1")
mymap.setMapping("LFinger01", "l_thumb2")
mymap.setMapping("LFinger02", "l_thumb3")
mymap.setMapping("LFinger02EndSite", "l_thumb4")
mymap.setMapping("LFinger1", "l_index1")
mymap.setMapping("LFinger11", "l_index2")
mymap.setMapping("LFinger12", "l_index3")
mymap.setMapping("LFinger12EndSite", "l_index4")
mymap.setMapping("LFinger2", "l_middle1")
mymap.setMapping("LFinger21", "l_middle2")
mymap.setMapping("LFinger22", "l_middle3")
mymap.setMapping("LFinger22EndSite", "l_middle4")
mymap.setMapping("LFinger3", "l_ring1")
ipisoftMap.setMapping("LFinger31", "l_ring2")
mymap.setMapping("LFinger32", "l_ring3")
mymap.setMapping("LFinger32EndSite", "l_ring4")
mymap.setMapping("LFinger4", "l_pinky1")
mymap.setMapping("LFinger41", "l_pinky2")
mymap.setMapping("LFinger42", "l_pinky3")
mymap.setMapping("LFinger42EndSite", "l_pinky4")

# Arm, right
mymap.setMapping("RClavicle", "r_sternoclavicular")
mymap.setMapping("RShoulder", "r_shoulder")
#mymap.setMapping("", "r_upperarm1")
#mymap.setMapping("", "r_upperarm2")
mymap.setMapping("RForearm", "r_elbow")
#mymap.setMapping("", "r_forearm1")
#mymap.setMapping("", "r_forearm2")
mymap.setMapping("RHand", "r_wrist")
mymap.setMapping("RFinger0", "r_thumb1")
mymap.setMapping("RFinger01", "r_thumb2")
mymap.setMapping("RFinger02", "r_thumb3")
mymap.setMapping("RFinger02EndSite", "r_thumb4")
mymap.setMapping("RFinger1", "r_index1")
mymap.setMapping("RFinger11", "r_index2")
mymap.setMapping("RFinger12", "r_index3")
mymap.setMapping("RFinger12EndSite", "r_index4")
mymap.setMapping("RFinger2", "r_middle1")
mymap.setMapping("RFinger21", "r_middle2")
mymap.setMapping("RFinger22", "r_middle3")
mymap.setMapping("RFinger22EndSite", "r_middle4")
mymap.setMapping("RFinger3", "r_ring1")
mymap.setMapping("RFinger31", "r_ring2")
mymap.setMapping("RFinger32", "r_ring3")
mymap.setMapping("RFinger32EndSite", "r_ring4")
mymap.setMapping("RFinger4", "r_pinky1")
mymap.setMapping("RFinger41", "r_pinky2")
mymap.setMapping("RFinger42", "r_pinky3")
mymap.setMapping("RFinger42EndSite", "r_pinky4")

# Leg, left
mymap.setMapping("LThigh", "l_hip")
mymap.setMapping("LShin", "l_knee")
mymap.setMapping("LFoot", "l_ankle")
mymap.setMapping("LToe", "l_forefoot")
mymap.setMapping("LToeEndSite", "l_toe")

# Leg, right
mymap.setMapping("RThigh", "r_hip")
mymap.setMapping("RShin", "r_knee")
mymap.setMapping("RFoot", "r_ankle")
mymap.setMapping("RToe", "r_forefoot")
mymap.setMapping("RToeEndSite", "r_toe")

# Head, left
#mymap.setMapping("JtEyeLf", "eyeball_left")
#mymap.setMapping("JtEyelidUpperLf", "upper_eyelid_left")
#mymap.setMapping("JtEyelidLowerLf", "lower_eyelid_left")

# Head, right
#mymap.setMapping("JtEyeRt", "eyeball_right")
#mymap.setMapping("JtEyelidUpperRt", "upper_eyelid_right")
#mymap.setMapping("JtEyelidLowerRt", "lower_eyelid_right")

#mymap.setMapping("eyeJoint_R", "eyeball_right")
#mymap.setMapping("eyeJoint_L", "eyeball_left")

 

mymap()

 

2. Load the character (either drag and drop or via the command line, then apply the joint map to the skeleton:

scene.loadAssetsFromPath("/path/to/myfile/FirstCharacter.dae")

c = scene.createCharacter("mycharacter", "")

s = scene.createSkeleton("FirstCharacer.dae")

c.setSkeleton(s)

j = scene.getJointMapManager().getJointMap("mymap")

j.applySkeleton(s)

 

 

Ari

June 16, 2016
7:02 am
Avatar
Member
Members
Forum Posts: 7
Member Since:
April 28, 2016
sp_UserOfflineSmall Offline

Hi Ari,

Thank you for the detailed response. I tried what you said, however the character still acts rather weird when applying animations.

So if I understand correctly:

1. I run the first script you posted (ofcourse with adjusted joints).
2. I drag and drop the character into SmartBody.
3. Finally I run the second script you posted.

4. Then I go into the Retarget Viewer and choose on of the animations, apply that.
5. Go into the Blend Viewer and run one of the animations.

When I run the second script, I get a number of errors. I will enclose the smartbody.log file as well as the scripts.

Link to dropbox

Thank you in advance!

Kind regards,

Yannick

Forum Timezone: America/Los_Angeles

Most Users Ever Online: 733

Currently Online: Jamesnuh, gotselyuk1987mon, levinebarron45, koenig62ramos, krygerhagen69, coxgeorge3, doyle68bekker, ludvigsen62abbott, shortstext78, cormierhopper5
69 Guest(s)

Currently Browsing this Page:
1 Guest(s)

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: 100502

Moderators: 3

Admins: 4

Forum Stats:

Groups: 1

Forums: 5

Topics: 460

Posts: 2403