Jump to content

Retargeting skeletal animations at runtime


JCPalmer
 Share

Recommended Posts

As 2.3 has entered beta, thought I now would be the time to pitch a minor change I think would help others using a Kinect scanner as well as myself. I would like to add a  public length : number  to BABYLON.Bone before there is a final print of 2.3.

 

I have already found the blender property and am writing it, in a non typescript way in TOB. 

var B = BABYLON;var M = B.Matrix.FromValues; .  .  .skeleton = new B.Skeleton("Jim", "0", scene);bone = new B.Bone("Hips", skeleton, null, M(1,0,0,0,0,0.8996,0.4368,0,0,0.4368,-0.8996,0,0,34.597,1.3635,1));bone["length"] = 3.4913;

I am not sure this is what I need, but blender does have it and the values look believable.  Making it an official property, and making it a part of Parse() would mean it could also be in a .babylon file.

 

There is another topic on kinect / mocap, but it is now running into pages.  I thought since I was talking about an actual change to BJS, it should be part of the opening post.  Would have to be optional, since I only do blender, but anyone wanting this for another exporter could always fork / PR it.

Link to comment
Share on other sites

It is used to get a ratio between the length of the implied bone coming from the animation side, so that the animation can be targeted to this skeleton.  Even if the implied skeleton of the mocap has exactly the same number of bones, the skeleton might not be the same proportions, or ones units may be in inches & the other centimeters.  That would cause the translation to be wrong.

 

This happens already, but in other tools, like MakeWalk.  I am just moving the procedure right into Javascript.  I assume a Kinect skeleton's bone must have the same concept.

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...