Animation is getting occluded when it should not

I just found a bug which made me need to think for awhile before the possible reason came into my mind…

The symptom is that between 0 and 5 seconds after I start the game, pawns stop playing their idle animation.

So the reason is: I use the “add additional body part” option a lot to make my pawns modular, so my pawns have one main mesh, which is just basically an empty mesh, but since it can’t be empty it has just one small polygon. Then I attach multiple other skeletal meshes to it which share the same . So what the player see’s are the meshes I attach, but not the main mesh they get attached to.

Now the problem is, if UE4 noticed that the main mesh is not visible because it’s either occluded by another mesh, the visibility is set to “false” or “hidden in game” is set to “true”, it does not play animations on all the additional attached body parts too, it does not even seem to check whether they are visible or not.

I actually found a workaround for this, using a “big” mesh as the main mesh which is clearly visible (so it does not get occluded) and then set “Render in Main Pass” to “false”. If I set the visibility to false, the animation stops playing, but if I only set it to not being rendered in the main pass, the animation play correctly on the attached “child” meshes, and it’s still invisible, so I don’t see it but only the “child” meshes.

I just guess the performance of this workaround is not really nice since it’s now basically animating twice the amount of bones, just with half of them being invisible… And I actually really care about performance since I try to be able to use hundreds of characters. So it would be nice if this would be fixed.

one whole week without any comment on a bug report? :slight_smile:

Hi John,

I’m not completely following your setup and I may need to get my eyes on this. Any chance of sending me your project so I can see exactly what’s happening?

-.

Hi !
Sending the project is not really possible, it’s a really big one. I think the steps should be reproducible in a new project. You just need 2 skeletal meshes which use the same , then use the feature “Add additional body part” on the “main” skeletal mesh, and the new mesh you add should be bigger than the original one, so the “master” skeletal mesh should be not visible, because it’s “inside” of the added one. You can read about the feature here:

If you have never used the feature it might be a bit confusing, I agree. But then just ask one animation guy who works at Epic, they surely know about what I talk :slight_smile:
Thanks!

Hi John,

I’m well aware of the functionality that you’re referring to. After re-reading the OP a few times, I extracted the relevant information and got a repro. This is entered as UE-20114. This addresses the Master Pose Component bug where it doesn’t properly play animation on Target Components when the Master Component is occluded or off screen.

I believe I ran into what you were reporting about the Additional Body Parts as well. I’ve entered this separately as UE-20121.

I also threw in a feature request for the ability to save Body Parts to a Mesh OR a way to save “sets” of body parts to easily re-apply as necessary (UE-20122).

Was there anything that I missed?

-.

Hi , thanks a lot for this! I actually only know about one bug, but you probably know the system a lot better than me. I think what you say is that the adding of additional body parts in the skeletal mesh editor is a different system than the setting of a master component in blueprint? I just talk about both, I thought its the same one, just one time manually and the other time in “code” (blueprints). I actually only use it in code and not in the skeletal mesh editor except for testing how well I separated the different mesh parts. So I don’t really need the feature request since I configure all of it in blueprint, but I’m sure there are a lot other people who will profit from such a feature!
So thanks very much, you have not missed anything, I’m super happy, you just know the system better than me so I don’t fully understand why it’s two different bugs :slight_smile:

Personally, I don’t know if the Additional Body Parts functionality is using the same code as Master Pose Component under the hood, but as the features are used separately (one typically for preview, the other for runtime), it was due diligence to report them separately.

That feature request was more on my end of “hey, this would be useful”, but I figured you might be interested in hearing about anything that may spawn from your report (also is good for tracking purposes).

Hi , is there any update about this bug?

No update on the bug, but there’s a workaround you can try.

Select the Master Skeletal Mesh Component and under the details panel, find “Mesh Component Update Flag” and change it to “Always Tick Pose and Refresh Bones”. This should allow the bones to continue animating when the component is hidden or occluded.