Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Maya BVH exporter now available!

Alexia Mechanique
Registered User
Join date: 15 Mar 2005
Posts: 12
03-27-2005 12:27
Hey guys!

Well. It took me the better part of the night but here it is!

http://circle.twu.net/progs/bvhimport.mel
http://circle.twu.net/progs/bvhexport.mel

A lot of kudos to Sergiy Migalskiy who had written the import routine.

I should stress that the export tool is very much beta-test software. The interface is clunky and you must have your root bone (the hip bone in the Second Life files) selected when you run this script. I can say though that I tested it with both IK and FK and it was working pretty good.

I did comment it pretty heavily though. If someone else wants to take it and clean it up a bit, feel free. If not, I'll get around to it some day. :)

Please let me know if you have any problems, feedback, or whatever.

Alexia Mechanique on SL or [email]circle@deeptht.armory.com[/email] in RL.

Happy Easter! ^_^
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
03-27-2005 15:35
Way to go, Alexia!

You may want to post this also on the Alias forums, Highend3D, and Turbosquid if you haven't done so already. I'm sure there are people who could benefit from it outside of SL. Great work.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Csven Concord
*
Join date: 19 Mar 2005
Posts: 1,015
04-01-2005 09:27
well this solves my problem (if it works for Maya 5). tre cool.

and depending on how much traffic you want, might also submit to CGTalk.
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
04-01-2005 09:50
Rock on! I'll see if I can forward that to a few interested Maya users out there.

A warning, though. If Maya makes use of non-static joint offsets (for example, limbs that "extend" a certain distance), export may not work properly. I learned much about this when I wrote my own BVH-to-Prim Importer in LSL.

I'd also be interested to have another set of eyes look over said importer. It was a touch buggy with rotations outside of the normal scope of motion (like digitigrade using the default Poser figure). I could always use good beta testers, since it benefits all of us. :D
_____________________
---
Alexia Mechanique
Registered User
Join date: 15 Mar 2005
Posts: 12
04-02-2005 22:25
Eep. I found a slight problem in my algorithm if you rotate the base joint (The hips) I need to do some kind of transformation on the rotation matrix. I'm working on a fix now (along with some better UI features)

I'll try to get it posted in a day or two.
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
04-02-2005 22:31
Hmm... I know you probably want to get away from quaternions, but they could be extremely useful for your problem there.

My favorite resource for them, because MEL is a lot like C++: http://www.cprogramming.com/tutorial/3d/quaternions.html

Coding (or utilizing) library functions for recursively running quats on the whole system would help, if they're not already there. I don't know enough MEL or Maya to say. :p
_____________________
---
Alexia Mechanique
Registered User
Join date: 15 Mar 2005
Posts: 12
Fixed, uploaded!
04-03-2005 06:45
I fixed it using a big nasty Euler angles thing.

I replaced the defective code in my directory with the corrected code.

So the http://circle.twu.net/progs/bvhexport.mel has the corrected code.

I went to http://www.bvhfiles.com/doBVHLibraryLogin.php and downloaded a
bunch of free BVHs and ran them through import and export and they looked
good so I'm calling it fixed.

I still need to improve the UI but I'll get to that now that the internal code
is fixed.
Xenon Linden
Linden Lab Employee
Join date: 23 Dec 2002
Posts: 55
04-07-2005 15:04
Awesome work, Alexia!

I tested your BVH export MEL script in Maya 5 and the resulting animations imported correctly into SL. We'll probably be able to use this internally at Linden Lab.

For any Maya users out there, thanks to Alexia's script it now should be possible to take the SL avatar mannequins, create a Maya specific animatable character, and then generate animations that work in SL. Certainly not a cheap alternative to Poser if you don't currently own Maya, but an alternative none the less.

Again, thanks for contributing this to the community, Alexia.

-Xenon
Csven Concord
*
Join date: 19 Mar 2005
Posts: 1,015
04-07-2005 15:27
i was going to test it this weekend, but sounds like i don't need to now.

thank you, Alexia.