Further investigation of deleting an animated character rig

I posted a PG a short while back about trying to delete an animated rig, and @Blake provided an answer here:

PG Animated “Bobby” Rig .

And I wondered at the time whether everything that was part of the rig was being deleted including the bones and animation ranges. There was no answer, but I have set up a little experiment. Here it is - you can carry it out in the playground posted above.

Step 1. Load the playground and before you press the “Play” button, open the Inspector, and note the
items I have marked in image 1 below. Select the skeleton and turn on the Debug Enabled button - you will see a stick skeleton with 30 bones and 2 animation ranges.

Step 2. Now click the “Play” button. At the end of the two animations and sound, In the Inspector, all the meshes are gone(A) as well as the Skeleton (B), but the Inspector still indicates that there are 30 bones and two animation ranges. And you can still see the bones in the scene. (Image 2)

Step 3. Now click the “standAction” range. The stick bones you see will animate (Image 3).

Step 4. Deactivate the stick bones then reactivate them. No more stick bones but the Inspector still says there are 30 bones present and 2 animation ranges. (Image 4)

Anyone any idea what is going on, and is it possible to completely delete the character rig and animations? Or is what I am seeing just the Inspector not updating properly?

Stay Safe All, gryff :slight_smile:

Image 1: Set Up:

Image 2 : Deleting Meshes and Skeleton:

Image 3 : Playing stand Action animation:

Image 4 : Turn off, the On again , the Skeleton debug:

Ooh that’s interesting, I tried it without debug enabled on the skeleton at first and disposing it seemed to work, IDK about how that debug feature works thou…

1 Like

@Blake : I tried the example that you first posted (now disappeared) and even without the Debug feature, the bones are still set to 30, and the two animation ranges are still showing. So it conjures up two thoughts in my mind :

Thought 1 : I seem to be only deleting bits of the rigged character - is there a different way of doing it - deleting the character completely?

Thought 2 : Is it just reflecting the deletions don’t get deep enough into the Inspector data. The 30 bones and 2 animation ranges are just an error in the Inspector?

Stay Safe All, gryff :slight_smile:

1 Like

That was just from me not reading your first post carefully enough, LOL. Without debug enabled on the skeleton, disposing it seems to work - I think the information still on the General tab is just leftover from before the skeleton was disposed… But IDK, we need someone more familiar with it to take a look. :slight_smile:

@Blake : I thank you for all your efforts. And I think you are right :“we need someone more familiar with it to take a look.”. Even if I don’t activate the “Debug” tab, I still get those 30 bones and two animation ranges left over :frowning_with_open_mouth: One of the two thoughts I expressed above was “is it just leftover stuff”?

Hopefully, someone from the Babylon team will show up, but I thank you for all your efforts :slight_smile:

Stay Safe, gryff :slight_smile:

Pinging @bghgary you were working on skeletons recently right? Any idea of what could be going on?

1 Like

Looks like this doesn’t repro anymore. :slight_smile:

1 Like

Ahh, TY @carolhmj :slight_smile: I wondered if I might see you as you seem to do checks on unanswered questions after awhile. TY again!

@bghgary : Not sure what you mean by “doesn’t repo anymore”. Maybe you were running it with Chrome which will not work properly because of the audio issue. Anyway, I have updated the PG to remove the audio issue (I hope). Plays withe Firefox or Chrome now.

New Bobby

Before you click the Play button, activate the Inspector, select the Skeleton “aBobby”, then activate the “Debug” button so that you can see the bones (Note bone count is 30 with two animation ranges) Now click the Play button. The meshes are disposed of and the “skeleton” disappears from the top panel, but the lower panel still displays a bone count of 30 and the two animation ranges are still there ? Turn the enabled button off/on again - the skeleton “lines” will disappear, but you still see the bone count and animation ranges? Is there away to delete that, or is it just the inspector that is not being updated?

*Dydd Gŵyl Dewi Hapus :wales:

Stay Safe All, gryff :slight_smile:

*Happy St. David’s Day

1 Like

Hey there! Indeed I’m always checking the unanswered questions so that things don’t fall through the cracks :rofl:

I tried following your steps in Edge/Firefox/Chrome, but once the bones were disposed the active bones count does drop to 0. If I let the skeleton selected, then we still see the lower panel with 30 bones, but the skeleton itself has disappeared from the scene explorer, so that seems to be just a case of the inspector not updating

bobby

3 Likes

@carolhmj : Thank you for response Carol - it is interesting :slight_smile:

Now I am struggling to understand the terms “active bones” and “bone count”. I’ve been working on another rigged Character :

Krysten

Currently it has no animation, and it has an “active bones” value of zero, but a “bone count” of 31. I am assuming that is because it has no animation. Using my typical delete code the bone count stays at 31.

I’m not sure how this “bone count” is determined and when. Or if it is ever updated. And what makes it worse is that there have been changes to the Inspector Code as I can no longer “enable” the rig as “lines” anymore (see image below)

EDIT I assume again that as @Deltakosh and the crew change the babylon.js code, changes get made to the PG code.

Once again, thank you for your efforts :slight_smile:

Stay Safe, gryff :slight_smile:

Image of “debug” panel:

pg05

Hey there! Sorry for letting this slip by.

The Inspector only seems to update the skeleton properties when the skeleton itself changes, as per: Babylon.js/skeletonPropertyGridComponent.tsx at master · BabylonJS/Babylon.js (github.com)

And the bones count is just the length of the array of bones: Babylon.js/skeletonPropertyGridComponent.tsx at master · BabylonJS/Babylon.js (github.com)

While the active bones property is updated in a frame by frame basis: Babylon.js/scene.ts at master · BabylonJS/Babylon.js (github.com)

Hey @gryff just checking in again if there’s still anything on this matter we can help you with :smile:

1 Like

@carolhmj You do look after us ! :slight_smile: Will be back later as I have a little dog beside me who seems to want a walk :laughing:

Stay Safe, gryff :slight_smile:

1 Like

@carolhmj : Well dog is walked in winds gusting to 50+ kms / hour . Makes it hard work as she keeps sitting down in those gusts and only gets up for squirrels and birds!

Anyway, when I run into a problem I can’t solve. I usually give up for a while, and so it was with this little problem. But yesterday, while waiting for the big May 5th announcement, I turned back to that project - all the surrounding streets and houses trying to get rid of all the vertices that were defining “triangles with no area” that @JCPalmer 's exporter was telling me were present. Then I saw your “checking up” post in my email - quite a coincidence I thought

I did see a post here, recently, where someone was trying to delete all the bones from a skeleton to which @Deltakosh said it was not possible - you had to leave at least one bone. As I’m back working on the project, I am thinking of going back and trying something different. Not sure what yet, so I will be back with this thread.

I just don’t want bone data left lying around unattached but still in the scene even if the bones are not “active”. It somehow seems so incomplete and untidy.

So this thread will be back, and thanks for caring :slight_smile:

Stay Safe, gryff :slight_smile:

1 Like