animation update when offscreen or animate only if visible - do these work?

If I have the game view stats displayed - it states “Visible Skinned Meshes: 2” (or in other cases, 25, etc.)

In the profiler, you can see tasks such as “Animation.Sample” and “MeshSkinning.Prepare”.

If I manually toggle the Skinned Mesh Renderer off for a character, you can see the count change in the Stats display and also the Profiler.

However, I thought " update when offscreen" (which is off by default) would mean the skinned mesh renderer is not calculated if off screen. But if I rotate the camera so that the characters are not in view, the count in the Stats display, and the Profiler activity does not seem to change any.

So if skinned characters or animations are not in the view frustum do they continue to be process even though the options in the inspector suggest they are not?

thanks for any info in how to determine this -

As far as I can tell from studying the Profiler and the Stats displays, skinned meshes and animations continue to be processed even if the skinned meshes not within the view frustum

Does anyone else agree with this?

I am preparing to create scripts that will disable skinned mesh renderers when out of the view frustum, but this seems redundant with what the Inspector settings in Unity suggests it already does.

bump!
Animations play whether in the camera view or not, contrary to the inspector settings.
Skinned Mesh Renderers update whether visible or not, contrary to the inspector settings.

No one else has noticed this or has the need for it? Am I missing something?

Things are considered “on screen” in the editor if you can still see them in the non-game camera, like say your perspective view. Maybe that’s why you’re seeing unusual results?

Those settings definitely work in my experience.

Well - thanks for the reply. At least getting one “it works for me” helped me to think of variations.

Shadow casting.

If I turn the shadows off for my directional light in the scene, then the animation counts go up and down in the stats window when you swing the camera around.

So I guess I am happy I made a LOD system that toggles skin mesh renderers and animations, because I like having the shadows.

1 Like