University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

[OT] How can I attach animations with fbx files and find them within Smartbody? | 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
[OT] How can I attach animations with fbx files and find them within Smartbody?
November 24, 2015
12:32 pm
Avatar
Member
Members
Forum Posts: 28
Member Since:
November 5, 2015
sp_UserOfflineSmall Offline

I have created some fbx meshes as some character assets for a 3d simulation application.
And the meshes currently don't have any animations, like walking. I am not sure if I can actually attach animations with the fbx file while exporting them out from max?
If I can export animations with fbx files, and import them back into a C++ program using
assimp/smartbody. How can I find them?

I mean those animations are prebaked animations, and may/may not have to be blended with the motion database and IK

Sorry for OT question. Just wondering whether I can export prebaked animations with fbx files and play them back with Smartbody?
Thanks
Jack

November 24, 2015
3:50 pm
Avatar
Admin
Forum Posts: 980
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

Does  your mesh have a skeleton and rig already, or is it just a mesh? 

If it doesn't you can either rig it yourself, or autorig it with SmartBody. We also released a tool that does a better job rigging than does SmartBody here: http://smartbody.ict.usc.edu/a.....ndreshaper

When SmartBody reads an asset, it names it according to the filename and extension. So reading an animation from the file:

myanimation.fbx

would create a motion that is named 'myanimation.fbx'

If you wanted to play this animation on your character, you would invoke it by name:

 

<animation name="myanimation.fbx"/>

 

So you should be able to playback animations on your character the way you describe it.

 

Ari

November 25, 2015
9:02 am
Avatar
Member
Members
Forum Posts: 28
Member Since:
November 5, 2015
sp_UserOfflineSmall Offline

Tried this method. But it is not working. I play back my animation in Visual Studio 2013 (It contains a modeller),

And it is in there.

But the animation of the walking is not working.

[code]

if (sim->getTime() > 10.0f) {
        sim->setTime(0.0f);
        scene->getBmlProcessor()->execBML("mycharacter", "<sbm:reach sbm:action=\"touch\" target=\"touchPawn\" sbm:reach-finish=\"true\"/>");
        scene->getBmlProcessor()->execBML("mycharacter", "<gaze target=\"touchPawn\" sbm:joint-range=\"EYES NECK\"/>");
        scene->getBmlProcessor()->execBML("mycharacter", "<animation name = \"Operator.fbx\" />");
        
    }

[/code]

November 25, 2015
8:19 pm
Avatar
Admin
Forum Posts: 980
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

Can you send me the .fbx?  shapiro@ict.usc.edu

November 25, 2015
10:05 pm
Avatar
Admin
Forum Posts: 980
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

Also, have you created a joint map for the animation (mapping the names from the animation file to the smartbody-specific names?)

November 26, 2015
10:33 am
Avatar
Member
Members
Forum Posts: 28
Member Since:
November 5, 2015
sp_UserOfflineSmall Offline

I have sent you the file.

Thanks for helping

much appreciated!

November 27, 2015
8:24 pm
Avatar
Admin
Forum Posts: 980
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

Ok, it looks like the asset loader that SmartBody is using can't handle that version of fbx. When I convert the file from fbx to COLLADA the animation works, although it is rotated 90 degrees. To solve the rotation problem, I might need to fix the COLLADA parser.

So my suggestion is to convert them to COLLADA format for now. The longer term solution is for SmartBody to include a better .fbx reader. I have been reluctant to do that because I am not allowed to distribute the fbx SDK; it has to be downloaded separately which complicates the build a bit.

Ari

November 28, 2015
6:46 am
Avatar
Member
Members
Forum Posts: 28
Member Since:
November 5, 2015
sp_UserOfflineSmall Offline

Hello Ari,

that fbx file I gave you was the one that is y-up and facing the +z direction.

The reason why the collada importer not working maybe because the mesh is for DirectX usage.

The Smartbody is generally used for OpenGL.

Sorry for making things complicated

BTW

How did you convert the file to dae format that Smartbody understands?

Could you please pass me the file you have converted if you don't mind?

Thanks

Jack

November 28, 2015
4:06 pm
Avatar
Admin
Forum Posts: 980
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

I use the OpenCollada pluign (http://opencollada.org/) with Maya.

I'll send you the converted .dae.

Ari

Forum Timezone: America/Los_Angeles

Most Users Ever Online: 733

Currently Online: mondayneedle1, huberdavidsen3, casey29english, andersen19eaton, kristensen00leblanc, worriedutopia9579, eric506784, t9rrzpi307
115 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

jwwalker: 80

jyambao: 51

rbaral: 47

adiaz: 30

WargnierP: 29

lucky7456969: 28

mbarros: 28

avida.matt: 26

JonathanW: 24

laguerre: 23

Member Stats:

Guest Posters: 65

Members: 52460

Moderators: 3

Admins: 4

Forum Stats:

Groups: 1

Forums: 5

Topics: 427

Posts: 2343