I am trying to move my IK based, armature posing from Blender directly into BJS. When using Blender, I interactively positioned the IK bones to get the figure as desired. I then stored the pose in a Blender Pose Library. I wrote a Blender procedure to generate a small JS file with the world matrices of all bones, excluding bones at rest & IK bones, for each pose in the library.
I can animate different limbs (sets of bones) independently in my system, including the body. Well almost . Since the matrices are hard coded, they depend on the bone immediately preceding to be in rest position. Makes for at best a very stiff performance. At worst, total cluster fuck.
Think about clapping, then think what would happen if the armature was sitting down when the 2 animations (left hand & right) were run. Hopefully you see the problem, & I am not boring you.
Just storing the rotations instead of the matrix is not a solution. That means you will loose the ability to have independent limb animation, which is an absolute requirement of mine. Think about the animation of turning a light switch on, but now the torso is now turned. You are going to miss unless you store the rotations of every bone. Bye-bye independence.
If the animation were based on the IK target mesh position (& rotation for the wrist) and the position of the pole mesh, then piece of cake, or close except for extremes.
Continuing to use Blender, & exporting the IK data is not going to work. The systems are too different, so I starting an effort in a tool scene.
The red squares are the pole targets for the left & right arms, respectively. The wrist donuts are both the IK target mesh, and function to record the rotation of the wrist, see below.
It is operational, not actually recording anything yet.
Now the problem, trying to control 3 vectors with controls is almost impossible.
Blender allows drag. If you press either the X, Y, or Z keys you can control the direction. Is it going to be possible to add a BABYLON.PointerDragBehavior
from inside a scene.onPointerDown
? If not, I guess I will have to have controls to indicate which pane or direction, and not a key.
Sorry, for the long question, but seems like others are do stuff in this area right now, so I gave a little more detail.