kogen
03-29-2012, 06:58 AM
Hello guys,
I'm currently working on a script which reduces keyframes in Biped-Tracks.
I'm running into a problem when it comes to understand what biped exactly does.
Imagine that:
In every frame I read the matrix of the appropriate biped node, let's say forearm. I store the matrix and go to the next frame for this node.
I delete the whole track an start reading the array stepwise (e.g. every 10th key), get the transformation for the bone on this key and apply it again to the node. By saying:
node.controller.value = matrix at keyframe
What I get in the end is a completely messed up biped where neither the position nor the rotation seems to be correct. I checked the array values which are the same values I can see in the transform-type-in window.
Even if I try to extract a matrix.rotationpart or matrix.translationpart using biped.setTransform node #pos etc. it doesn't work.
So I start asking myself if the matrices are stored in relation to their parent and not in WorldSpace coords as I thought they might?
Has anybody an interesting suggestion?
I'm currently working on a script which reduces keyframes in Biped-Tracks.
I'm running into a problem when it comes to understand what biped exactly does.
Imagine that:
In every frame I read the matrix of the appropriate biped node, let's say forearm. I store the matrix and go to the next frame for this node.
I delete the whole track an start reading the array stepwise (e.g. every 10th key), get the transformation for the bone on this key and apply it again to the node. By saying:
node.controller.value = matrix at keyframe
What I get in the end is a completely messed up biped where neither the position nor the rotation seems to be correct. I checked the array values which are the same values I can see in the transform-type-in window.
Even if I try to extract a matrix.rotationpart or matrix.translationpart using biped.setTransform node #pos etc. it doesn't work.
So I start asking myself if the matrices are stored in relation to their parent and not in WorldSpace coords as I thought they might?
Has anybody an interesting suggestion?
