As someone who is new to three.js and animation, I find myself struggling with concepts like rotation angles, VRM interactions, and humanoid animations. Despite my confusion, I will do my best to articulate my question below.
I have a series of frames that contain coordinates (xyz) for human joints such as left foot, right foot, and left shoulder. My goal is to animate a 3D model based on these coordinates.
Based on what I've observed from others, it seems they modify the z-axis rotation of the human bone node to map human actions onto the animated model. This leads me to the following questions:
In cases where I have 3D coordinates instead of a 2D video input, how do I calculate the rotation value? The documentation suggests Euler angles, but how does one derive Euler angles from something like the coordinate of the left shoulder?
i. Which body parts should I calculate these angles for? Does it make sense to define rotation for specific body parts like the Left Shoulder or nose?
ii. Is it feasible to directly set the xyz coordinate values as the position attribute of the humanoid bone node? For example:
. Would this accurately represent the movement seen in the provided coordinates?currentVrm.humanoid.getBoneNode(THREE.VRMSchema.HumanoidBoneName.Neck).position = (10, -2.5, 1)
How are humanoid bone nodes represented? The documentation mentions them as Object3D objects, but can they simply be vectors? Considering that vectors cannot rotate like cylinders, how should angle calculations be approached for each humanoid bone node, such as leftShoulder = (3, 11.2, -8.72)? Do I need to compute angles for each axis and apply them to the rotation attributes of the bone node?