Quickly Batch Mocap Conversion
Maya — redesigndavid @ 6:35 pm

f1ea mocap b 03 thumb Quickly Batch Mocap Conversion

from blog.ubi.com

In my thrill in the discovery of the mother load of free motioncapture data, I downloaded all the animations, which were made up of ASF files (skeleton setups) and matching AMC files (motion captured animation). The total download was more than 2 gigabytes.

The promised 4 gigabytes might have been due to the multiple versions of the same data. I only downloaded one type. The type I could import into Maya, the ASF’s and their matching AMC’s filetypes. Converting these files meant using programs already made available by CMU from their website. There are two DOS executable files available for download. The first is asf2mel.exe which converts ASF files into a MEL script that builds a joint hierarchy for you. The second is amc2mov.exe which creates another MEL script that sets up the joint hierarchy just created to accept the animation contained in the second file, an MOV.

The commands to use the two files are easy to learn. To learn, just peruse the documentation page from MCU mocap lib. You won’t have a hard time. The only difficulty I had was the 2,500+ files I wanted to convert. I knew there was no way in hell I’d be typing commands 2.5 thousands times.

Instead I developed a batch sequence that would, in a sense, scan the its own folder for ASF files (files containing skeletons) and then scan the same folder for matching AMC files (files containing motion) and convert them, plus segregate them into folders. Took me about 30 minutes figuring the nine-line script out. But it was well worth it. The computer worked for me for the next three hours converting file after file.

If you downloaded a bunch of ASF files and AMC files from CMU Mo-Cap Library and you want to be able to convert them as fast as I did, you can download the script I made here. All you need to do is make sure the all the files from the zip are contained within the same folder where your ASF and AMC files are. Run conversionbatch.cmd. And viola. Sit and watch your subfolders populate and fillup with free mocap goodness. (BTW, neglect the other CMD file. movconversionbatch.cmd is being executed by conversionbatch.cmd as a nested command.)

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
(c) 2010 redesigndavid.me | powered by WordPress with Barecity
אורן יומטוב