So after taking few months break from messing around with Blender Armatures and the sort…
<img src="/uploads/highfidelity/4163/6cb6c403e77b8f69.gif" width=“500” height=“284” alt="The Madness is back!’>
Lets actually try to find a true solution for cross-compatibility and end this madness.
So earlier we discovered with @davedub walkTool.js script that there are have some odd angles for extremities which are go off the main hips-spine-neck chain with blender avatar. @davedub eventually created a temporary solution for the walk script with a set of “rotation offsets” which came around from my results of the mad experiments. It workable for now, but its not enough in the long term.
This normally would seriously indicate that there still is an exporting issue of what axis to use, as the fbx (re)viewer seems to interpret the fbx just fine. My earliest guess pointed to a disparity between rotation types of the Blender and Maya FBX exporting, mostly PrePostRotation, as simulating the lack of such resulted the same result with mixamo avatars in Blender as with avatars which are brought in from Blender to High Fidelity. But we need to make sure this is actually true. I tried to validate it earlier by creating a hack work around, but it was spotty at best.
This was further reinforced after I went in and digged at the Rotations in the mixamo avatar template versus the re-exported version from Blender. All the rotations were sound, except for the bones that were pointing towards the X Axis. But that was with my own Rotation settings, and those we also, reverse engineered earlier.
The Rotations difference in the raw files for the first Left and Right bones were radically off by
180 degrees in all axises (in different directions) aside from the “LCL Rotation” vs “PreRotation” use definition: Otherwise all the other rotations were close to each other in rotation without much difference…
Another discovery through the walk script was that avatar skeletons actually are base on absolute frame to the relative rotation of the avatar so regardless of the way how the rest position is in blender, the rotation of armatures will always be forced to a specific rotation. This is most noticeable with my Fen Avatar’s legs being straight as if it was plantigrade using the walkscript, even thought they are made to be Digitgrade.
With also the avatar being half way to the ground, there must be another explanation to this, including simply being axing being off: since incorrect axis for the avatars has had some weird results as @Judas discovered.
Now that we have some new debugging tools, its time to actually take them and test them.
To make sure of that my earlier guess is still accurate, I’m going run through new Brutal experiments:
As a rule of thumb, in this test, We are using my Box Avatar Model set, throwing away all my earlier work arounds and starting with absolute 0,0,0 positions and rotations and default settings.
What actually might be putting us all off is the fact the Hips are hard controlled system to always point forward, and rotated specifically.
Lets Brute Force
Lets try to do this documentation together, so
What we are going to do is ** go through All
16 24 variations of different world axies** for the models, without leaf orientation. and post the results here.
Control - http://www.norteclabs.com/HF/labs/tests/skinning_test_mixamo_autorig.fst?V11 - Test avatar running on Mixamo Autorig mesh. Control “normal Avatar”
Here is a base model you can import and export from blender as fbx
- Get the Latest version of blender
- Get the latest version of hifi
- Apply These debug settings
- Open Blend
- Select the entire scene
- Export as FBX, Make sure no leaf bones. Or just make a script to export them all http://www.norteclabs.com/HF/experiment/ExportFBX.py
- Pick a non-tested Axis
- Import into Hifi via Model Packager > Avatar With Head
- Reset all bones to 0 rotation ( @davedub’s script to zero the avatars bones )
- Answer the following questions
- Repeat if you are insane enough.
- What Axises were used?
- Does it look correct when all bones are set to 0? This includes position of the avatar as well as rotation
- Does it look correct when animated using Animate Rig. Even if position or rotation of avatar is incorrect, if the animations are correct (no folding) then we are on to something.
- Link to Model and fst
I will list the results in this gdoc
The main purpose of this test is to find closure of what is close and what is not close. Then use the “close” aproximates to create a potential fix for High Fidelity, or Blender export.