Ulfheden

Members
  • Content count

    5
  • Joined

  • Last visited

  1. Parent bones are not adjusting to children

    Yeah, I was aiming to use IK to make it easier to control my character's jaw (I want to define the jaw's rotation by defining its endpoint position). I'll also need to program all animation within WebGL/BJS, so I'll need to set the IK relationship and all that within BJS. I've done that now, but the thing is that the entire skeleton is affected by the IK constraint, not just the jaw. In e.g. Blender, you can set the chain length, i.e. how many levels of bones above the bone to be affected by the IK relationship, but there's nothing in the Bone or BoneIKController classes that suggests there's such a thing in BJS. In the IK demo with the "Dude", only his arm bones are affected... why is that? It's not because of the animation anyway. How can I apply the IK relation to just one bone, and not its parents? I think I'll just use the BoneLookController in this case instead, since I only want to affect the jaw bone, but it'd still be very interesting to hear if there is a chain length property (I couldn't find one though) or equivalent, or how it could be "simulated".
  2. Parent bones are not adjusting to children

    Thanks for the response, everybody! Wingnut, there are no export options for Babylon, really. It just says "No Properties" where, for other formats, there'd be a bunch of settings specific to that format. Yeah, but that's what I'm wondering - in Dude's case, the neck is getting stretched, while in my case, the bones are just being detached and float away. What's the difference between the Dude's skeleton and mine there? In the Dude's case, isn't his head just a child of the neck, and this is supposed to mean that when you translate the head, the neck stretches as observed in the demo there? I don't think it is? In the Babylon file and the Blender file, every ith bone is a child of the i-1th bone, right (see the attached snippet from the Babylon file)? Or am I missing something? The reason that this is all an issue for me is that I want to be able to move a bone's end/tail in all directions. This is of course the same as rotating this bone, let's call it B, but I thought it would be easier to just move B's child and thus rotate it that way (the child not affecting the mesh at all). I could of course just figure out where B's end/tail is (which would be equal to where the child is) and then calculate how to rotate B accordingly... Or I guess Inverse Kinematics is really what I'm looking for. The reason that I tried to just translate the bone's children is because I'm used to how skeletons work in 3ds Max where you can rotate a bone by simply translating its children - it is restricted to keeping its scale/length and thus is forced to rotate without deforming itself. Maybe it's some built-in IK controller, really... In Blender and BabylonJS I guess I'll need to explicitly apply IK for this to work?
  3. Hi again, After having rigged in Blender I noticed that the parents of bones don't rotate accordingly. It works in this demo from the tutorial however, where translating the head makes the neck bone adjust accordingly (you can see it by enabling debugging mode and enabling the skeleton viewer): https://www.babylonjs-playground.com/#1BZJVJ#32 I just can't tell what's wrong with my skeleton. In my case, moving or rotating a parent makes its children move just like they should, but moving a child does not rotate/scale their parents like in that demo. I tried downloading that demo and using my custom Babylon.js file and so on with it, and it works like it should. However, using my skeleton/mesh instead of the Dude in the demo creates the same behavior as mentioned above (i.e. parents still don't rotate when their children move). So there must be something wrong with how I set up my skeleton in Blender, or maybe there's something wrong with the Blender exporter? Or is there, despite getting the same problem with the demo code, something in my code that I'm missing? Of course, I ahve verified that I don't get this behavior in Blender, so I suppose it has something to do with the interface between Blender and BabylonJS? I've attached a very light weight demo of it, with the code from the tutorial demo, as well as the Blender file. Thanks in advance! sample.rar skTest1.blend
  4. Displaying bones

    Just what I was looking for, thank you! Didn't come across this despite a fair share of googling.
  5. Displaying bones

    Hi, I'm learning Babylon.js at the moment and when importing skeletons and animations it would be very helpful to be able to see the bones in the browser as well. Is there any easy way to do this, or will I have to e.g. copy the bones into meshes, skin/attach the meshes to the bones and export these dummy bones with them? Cheers!