August 3, 2008
I was thinking over the weekend about a simplified animation format – something that takes out the two main issues I’ve been dealing with (and it appears a lot of other people have) in general: hierarchy and axis of joints.
I’ve worked on two motion capture shoots so far, and am currently helping pipeline issues on another project. The biggest problems i see with solving the data are first the hierarchy of the joints – if the aren’t exactly in the right order your BVH ends up truncated on the finally rig, or if the joint axis order is wrong (BVH is ZXY generally) rotations break.
Compounding this is that you can have different channels, different axis orders and custom hierarchies in BVH make it a nightmare solving to custom rigs. A skeleton also cant be broken – something that can be a pain to deal with in BVH.
I was thinking of an intermediate file format possibly in XML, that would be only contain the position of a joint, its direction and twist – all store as world vectors. The format could also hold ties to a virtual hierarchy in the form of ids similar to Valves proprietary format. Something roughly like this:
I wrote an importer for BVH, that used a simple sorting order to work out the hierarchy ‘0’ would always be the root, followed by 1,2,3,4 etc.. if the numbering was sequential i.e 2,3,4 or 3,4,5,6 then id know they were children of the preceding numbered joint eg.
0 to 4 would be one chain but the next number 2, would become a child of the 2nd joint in the first chain and then be sequential until it broke sequence. Nifty! The format idea would only use this virtual ID if it needed to make a hierachy for BVH etc..
Outputting to this format though would still need end joints/nub bones to determine length as this is worked out using the <direction></direction> vector. Really its just a simple quaternion animation exporter using vectors for key properties.