Notifications
Clear all

[Closed] CS Biped export to BVH

I’m working on a script that takes the curent pose of a CS biped and outputs the rotations of the bones to a BVH format.

The problem is BHV rotations are local and parent dependent, where CS is not. I’m looking for any help converting quats to eulerAngles and adjusting them to get them relative to the parent bone instead of world coord.

Any help would be appreciated!

Thanks.

6 Replies

To answer my own question, the solution I found was as follows…

Make an array of the main transform matrix3 values for the biped in the starting position. Start at the main node and work out from there setting each node to its starting postion and rotation after you take the current transform matrix3 value and multiply it by the inverse of the starting position you have stored in the array.

If anyone would like, I can post the completed script. My main use is to export the current cs pose into endorphin. Let endorphin import the bvh file and save it as an endorphin pose. Start a new scene in endorphin with behaviors and load the pose file it created from the bvh import.

Simple as that!
B–

This sounds interesting. I’m curious, if you’re creating some kind of behavioral animation with Endorphin, wouldn’t you want to import a range of frames, so the Endorphin motion starts taking over gradually from the keyframe animation, instead of suddenly occurring? Or maybe you’re going to combine them dynamically with a later step?

Reply to:This sounds interesting. I’m curious, if you’re creating some kind of behavioral animation with Endorphin, wouldn’t you want to import a range of frames, so the Endorphin motion starts taking over gradually from the keyframe animation, instead of suddenly occurring? Or maybe you’re going to combine them dynamically with a later step?

I’m animating up to the point where the behavioral event needs to take place. Then capturing the pose in character studio and exporting it to bvh. After that endorphin can pick up the workload and export back to CS using .csm file.

I had considered exporting multiple frames, but you lose the endorphine behaviors.

B–

Hi,

I would be happy to see your BVH exporter.
It would help me as I am working on a BVH importer for Character Studio.
Do you know if a BVH importer written in MAxscript already exist (C.Studio or Max bones whatever) ?
Thanx
Regards,

In the Biped rollout you have the Motion Capture group and there you can
import a BVH file. In CD2 of Max 7 you have \Samples\Biped\Motions
and CSM, Bip, and BVH files to practice.

Thank you, but I know this importer exists in Character Studio.

My goal is to modify it to be able to import some other type of BVH bones… and not only hardcoded names that CStudio has choosen…

Thanx anyway.
Regards,