University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

saveToBVH() produces unusable results | 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
saveToBVH() produces unusable results
September 16, 2016
7:14 am
Avatar
Member
Members
Forum Posts: 5
Member Since:
September 16, 2016
sp_UserOfflineSmall Offline

Hi There.

I compiled the head of trunk of the SmartBody source tree yesterday.

In order for motions retargetted by smartbody to be really useful, I need to be able to output them in a common format, readable by other applications.

I see that SBMotion has a saveToBVH() method, which looked promising.

However, the BVH data which it outputs looks incoherent and unusable (when opening in both Blender and Motion Builder).

eg. running the following script, while a set of 'skm' motions are loaded, does output bvh files, but the data in them looks scrambled.

motionNames = assetManager.getMotionNames()

for i in range(0,len(motionNames)):
    print 'motion ' + str(i) + ' = ' + motionNames[i]
        currentMotion = assetManager.getMotion(motionNames[i] )
        currentMotion.saveToBVH(outDir + motionNames[i] + '.bvh', 'xxx.dae')

 

Is this a known issue?

Have BVH exports worked previously?

Thanks,

Repronauts.

September 16, 2016
9:39 am
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

It used to work when the skeleton hierarchy was simpler and didn't have pre- and post- rotations. I suspect that is what is needed to fix the saveToBVH() function. Alternatively, it would be nice to have a .dae exporter as well.

The .skm file format is fairly straightforward; there is a direct conversion from .skm to amc format (another animation standard), but you would still need to export a skeleton as asf format.

Ari

September 17, 2016
12:56 am
Avatar
Member
Members
Forum Posts: 5
Member Since:
September 16, 2016
sp_UserOfflineSmall Offline

Thanks Ari.

So do you have a dae exporter on your roadmap?

Do you think you'll get around to fixing saveToBVH() anytime soon?

(I appreciate you probably have tons of more pressing things to do 🙂

Is there anything which will currently convert skm to amc/asf?

Is there any other way of outputting a skelton or animated character from SmartBody in a standard format?

Cheers,

Repronauts

September 19, 2016
5:00 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

The code needs to be fixed. Seems easiest to fix the bvh exporter. 

I'll try to fix it when I have some time.

Ari

September 21, 2016
4:24 am
Avatar
Member
Members
Forum Posts: 5
Member Since:
September 16, 2016
sp_UserOfflineSmall Offline

OK, thanks. I'll keep an eye on commits to trunk....

September 27, 2016
1:13 am
Avatar
Member
Members
Forum Posts: 5
Member Since:
September 16, 2016
sp_UserOfflineSmall Offline

Hi Ari.

Would you expect that the changes you made to introduce pre- and post- rotations would also break the SKM export?

I'm trying to import skm to Blender, but, on import the data looks incorrect:

repronauts.com/sbdebug/skewed-skm-blender.png

This is less incorrect than the bvh data I tried previously, but still something is amiss.

- it looks great in SB!

repronauts.com/sbdebug/SmartBody-OK.png

If you think they are relevant, pls could you point me to the changes in SVN to help my understanding?

Do you have any other ideas as to what might be causing this?

Any help would be greatly appreciated, if I can understand the cause of the problem, it may be that I can work-around it in the Blender import script, or generate a patch for the SB code.

Thanks,

Repronauts.

September 27, 2016
2:54 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

The skm file has channels and data, but doesn't tell you anything about the skeleton hierarchy, pre-  and post- rotations and so forth. Are you able to import the skeleton (.dae) file into blender properly in an a- or t-pose?

September 28, 2016
1:26 pm
Avatar
Member
Members
Forum Posts: 5
Member Since:
September 16, 2016
sp_UserOfflineSmall Offline

Yes, the .dae import to Blender works OK.

The problem occurs in Blender when you attempt to apply the re-targeted .skm data on to the already imported .dae skeleton / rig.

The .skm data applies OK to a .sk version of the skeleton in Blender, so I think I'm seeing an issue where, for some reason, Blender treats the dae skeleton differently to the sk version. 

It seems as if the dae version somehow has incorrect initial joint rotations.

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

Members: 122101

Moderators: 3

Admins: 4

Forum Stats:

Groups: 1

Forums: 5

Topics: 531

Posts: 2495