Jump to content

SkeletonViewer Class


adam
 Share

Recommended Posts

I created a SkeletonViewer class that can be used for debugging skeletal animations.  I tried to demo it on the PG here:

http://www.babylonjs-playground.com/#1BZJVJ#0

but the Dude model doesn't have bone lengths so the skeleton isn't being drawn.  

Was the Dude model created in Blender?

If so, is there someone who can export it with the latest Blender exporter?  If I knew where the blend file was, I would export it myself.

I find it very useful when creating procedural animations.  I'm hoping others will too.

http://www.babylonjs-playground.com/#1BZJVJ#7

Link to comment
Share on other sites

You could import the .FBX into Blender.  There are 2 versions of FBX.  Blender may only work with 1, but there is a PC or Mac program to switch to the other.  The url is on a post somewhere, but I annot find it.  Once that works, exporting it from Blender will write values for Bone lengths.  I am not volunteering to do this leg work, just pointing out a plausible work path.

Capturing bone lengths in some of the other .babylon file creators might also be a good idea too.

Link to comment
Share on other sites

Hey adam,

You gave a lot to the whole community since you joined us :)
About your class, it's definitely something I will use to debug my futures games... And if you have some times, you could even create an official extension ! (https://github.com/BabylonJS/Extensions)

Playground bookmarked.

Link to comment
Share on other sites

4 minutes ago, Dad72 said:

This is normal when off in debugLayer skeleton, it is no longer in the mesh but still visible and continues animation?

I'm assuming you are referring to the red skeleton.  You can comment out that SkeletonViewer which is created when the model loads and just use the debug layer.

http://www.babylonjs-playground.com/#1BZJVJ#9

Link to comment
Share on other sites

Ah, yes, okay. I thought that when we ticked skeleton in debugLayer we could see the skeleton and hide by unchecking.

arf,I can more 'like this', I use all my cota (I do not know if 'cota' ll be understood. rather 'limit') :)

thank you Adam

Link to comment
Share on other sites

  • 1 year later...

@adam I splelunked the code and got confused on the last bone is invisible because of missing length piece. Thank you for mentioning that.

QUESTION: to get the last bone to show - Would it be possible to add default-length equals same as last rendered bone-line.length?

Only for the line, not the actual last-bone. 

UPDATE: nevermind. This wouldn't work for single bone situation. 

I wonder why...

Link to comment
Share on other sites

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...