Animation through scaling joints

Dear memebers,

Due to unsupported blendshape (morph targets) animations in Unity, to succeed the breathing animation of lungs , was necessary some of the joints of a custom made skeleton to take translation,rotation but also scaling keys. Following an image of how the exhalation stage and inhalation stage of lungs look in Maya and under an image of how the exhalation stage and inhalation stage of lungs look in Unity. model and animations has been exported in FBX format 2011.3 version

The values of scaling in Unity are incorect creating a great deformation of lungs during inhalation. From a simple test I run with a simple tube and a simple skeleton on it, looks as scaling values on the joints of a skeleton system in Unity have been calculated differently than in Maya.Unity understands scaling of joints dependently on the skeleton hierarcy.If one joint been scaled with the value of 2, then i guess all following at the hierarcy joints(children) will be scaled with the value 2.(In Maya only the joint been scaled will take the value 2).Now if we scale the next joint at value 2, then in Maya visualy we will see the represention of the real value of 2,but in Unity will add this scaling value of 2 to the value of 2 from the parent joint,so the value we will see will be equal to 4.

alt text

Problem solved with scripting allowing blendshape animations

Wow, that sounds amazing! Could you share any details?

I believe most of game engines behave in same way (because it's results in better peformance and that what poepl want in most of the times). IIRC there is an option in Maya to get the same behaviour. And you could change your bone structure to be flat, which would solve this problem too.

Maya's joints have an attribute called "Segment Scale Compensate". It lets you scale a parent without scaling the children. This is extremely handy in animation, but Maya is literally the only app to make use of this. Unity/fbx is seeing 2*2 scale, not 2/2*2 that the compensation shows. Compensate is on by default on all joints.

This script will give you a much closer result from maya to unity

$jnts=`ls -type "joint"`;
for ($j in $jnts)
setAttr ($j+".segmentScaleCompensate") 0;