Hello there,
I have a model of a rigged character (exported from Maya and imported with the GLTF loader).
I want to set the character into a pose without using animation and that means that I have to set the bone rotation manually. From Maya I have exported a .json file that includes all the local bone rotation of the pose.
So I search for the correct rotation info by iterate through the bones and set the rotation using:
allBones[i].rotateX(THREE.Math.degToRad(BoneArrayFromJson[j].X));
allBones[i].rotateY(THREE.Math.degToRad(BoneArrayFromJson[j].Y));
allBones[i].rotateZ(THREE.Math.degToRad(BoneArrayFromJson[j].Z));
I have to convert the from maya delivered degrees into radians.
However, my problem is that the pose looks wrong in the end.
This is how it looks like:
This is how it should look like:
What could be the problem? The json data is correct.
Maybe it is important to say that the local bones are not having a 0,0,0 rotation. For example, lets say the left upper leg has a rotation of -5,180,-160 (degree) in maya.
Here is a snippet of the .json data file:
...
"Bones": [
{
"name": "Root01",
"X": "3.178070001e-15",
"Y": "-1.256946762e-16",
"Z": "4.529807612"`
},
{
"name": "Root",
"X": "4.783768464e-16",
"Y": "1.00713629e-14",
"Z": "3.404273577"
}
]
...
Greets