This options are for for developers only and might help debug animation related issues.
* Enable Inverse Kinematics: this can be toggled to disable IK for the avatar.
* Enable Anim Pre and Post Rotations: this option can be used to use FBX pre-rotations from source avatar animations, instead of the current default, which is to use them from the source model.
This only effects FBX files loaded by the animation system, it does not affect changing model orientations via JavaScript.
This Y_180 flip is defined in skeletonModel not in the rig.
This is important if we wish to use the Rig for both Avatars (180 flip) and Entity models (no 180 flip).
We can hide this 180 flip from script, if we wish, by including it in all the accessors to and from
MyAvatar -> skeletalModel -> Rig.
Added Quaternions::Y_180 to GLMHelpers.
This will allow us in the future to pull preRotations from
animations instead of the model skeleton. It is disabled
by default because our current animations preRotations are
not correct for the left hand.
* No longer normalizing scale in AnimSkeleton and AnimClip
This means graph is animating in 'geometry' coordinates
before unit scale is even applied. This is necessary to
properly work with both Avatar based models and ModelEntity
based models
Many things are broken.
* debug rendering (translations are x100)
* IK hand targets
* follow cam
* I did not even dare to try HMD mode
Do the following things to the translations
1. scale by the model offset, this should move the translations into the correct units (meters).
2. compute the ratio between the bone length in the animation and the skeleton.
3. subtract the anim translation from the first translation frame in the animation
effectively turning it into a bind pose delta translation.
4. apply bone length ratio to the resulting delta.
5. set the final translation to be the skeleton rel bind pose + this scaled delta translation
This will recurse the tree and call setCurrentFrameInternal on each node.
This method can be overriden, currently the only meaningful implementation is AnimClip.
When TRUST_BIND_TRANSFORM is defined in AnimSkeleton, the bind pose is taken
from the FBXJoint::bindTransform field, which is correct for all joints
bound to actual geometry. Basically it's not trust worthy for bones NOT bound to anything.
When TRUST_BIND_TRANSFORM is not defined, the bind pose is taken from the other
FBXJoint fields. Unfortunatly these poses are NOT the bind pose, but instead
are taken from the FBX files 'resting' pose. i.e. frame 0.
std::vector.reserve() and raw access do not mix.
raw access will only work if you push_back elements onto the vector
first. However this worked fine on MacOSX, probably due to differences
in STL implementations.
Some code clean up and some commented out debugging lines.
Debug rendering of animaions of fight club model is not working.
Not sure what frame these transformations are in.
* added AnimPose::copyFromNetworkAnim() which
should, re-map bone ids to match the current
skeleton, and fill in missing bones with bind
pose frames.
* added ability to set a skeleton on a node.
I might need to add a recursive version of this.
* it compiles!
* tests run!