Skip to content

Automatic motion generator from existing amc and asf files or bvh file

License

Notifications You must be signed in to change notification settings

EagleW/Automatic-motion-generator

Repository files navigation

Automatic motion generator

Introduction

This repository contains required scripts to convert existing amc and asf files or bvh file along with the character model into a synthetic video. All character models in the sample folder are generated by Autodesk character generator.

Run

Entry and Settings

Prerequisite:

Software: amc2bvh.exe, motionbuilder 2017
Library: pyfbsdk (included in motionbuilder)Pillow
Files:
Motion files: amc, asf or bvh formats.
Character models: fbx format.
Run pip install Pillow to install pillow.
Character models you plan to apply retargeting scripts. Suggest using Autodesk character generator to generate character because the export fbx file will be characterized already when downloaded from website. You can delete the light in the character model if you don't like it.

Setting rendering options in motionbuilder before run the scripts.

Skeleton mapping:

You can change the mobuMap(line25) in the retargeter.py to corresponding skeleton mapping if you don't use amc2bvh and try to directly convert bvh file.

Functionality:

Amc2bvh can batch convert asf and amc files into bvh files
Retargeter.py can retarget bvh files into existing character model to render video

Light and Camera Setting:

You can change camera(line 135) and light(line 140) to change positions of cameras and lights. Also, you can change light type in (line 350)

Run steps:

Conversion from asf and amc to bvh:

Create list_asf.txt, list_amc.txt,list_bvh.txt, List the source files in amc, asf list and destination into bvh list
Run AMC2BVH file

Retargeting bvh files to multiple fbx character models:

Open motionbuilder
Run the retargeter.py
Choose the folder which characters prototype exists and then choose the source of bvh file

For generating one pictures from the motion capture file

Open motionbuilder
Run the retargeter.py under generate picture
Choose the folder which characters prototype exists and then choose the source of bvh file
Run generate_picture.py to generate one picture from all frames

Sample Scripts

Run AMC2BVH file in sample amc asf folder, choose list_asf.txt, list_amc.txt, list_bvh.txt as default setting.
Open motionbuilder, run the retargeter.py, choose SampleCharacter folder for the first popoup folder then choose sample amc asf folder for the second popup folder and finally choose backgrounds for the third .
Wait until the script finished.
Sample video exists under sample video folder.

Caution:

Multiple motion file with large frames could cause motionbuilder UI stuck before it finishing its rendering process.

Releases

No releases published

Packages

No packages published

Languages