Sign in to follow this  
adam

SkeletonViewer Class

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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

I can take care of this if you want. the idea is to have debugLayer to use it but still be able to use it outside of the debug layer.

I suggest adding you class in the /debug folder and make it part of BABYLON.Debug module :)

I can do it if you want

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.