Skinned Meshes delete/update causes significant FPS drops

Reproduction Steps
Spawn a bigger group of Skinned Meshes (> 100). Place them directly under workspace or under some model in workspace (same issue). Now at random pick one of them and either destroy them, change their transparency or change their color. Big FPS drops occur.

Try this with normal Parts instead of SkinnedMeshes. There is no drop in framerate.

For some reason, doing this on SkinnedMeshes causes some invalidatedFastClusters and since they need to be updated, the PreRender takes a lot of CPU time. I checked this using the Micro Profiler:
image

To reproduce:
I have prepared a rbxl file that showcases this exact problem:
SkinnedMeshProblem.rbxl (39.2 KB)

Just open up the Script found within the ServerScriptService, and change the first line to point to the two different models from within ReplicatedStorage. One model contains a Part, the other contains a SkinnedMesh.

When running the same script with the Part Model it works finely, while when running it on the SkinnedMesh Model, it causes big FPS drops.

Expected Behavior
I expect the skinned meshes to behave in the same way a regular part does when calling destroy on them, in terms of performance.

Actual Behavior
When deleting some of the skinned meshes from within the group, big frame drops occur making the game unplayable (visualized with the Micro profiler):

Video showcasing this:

System Information
CPU: Intel(R) Core™ i7-9750H CPU @ 2.60GHz
Memory: 32.0 GB
GPU: NVIDIA GeForce RTX 2070 with Max-Q Design

Issue Area: Engine
Issue Type: Performance
Impact: Very High
Frequency: Very Rarely
Date First Experienced: 2022-04-13 06:04:00 (+03:00)

6 Likes

Thanks for the reply .
Sorry if I didn’t specify this, I thought it’s pretty self explanatory because it’s the default of Roblox when importing custom avatars. The skinned meshes are in a model of their own, and these models are inside a bigger renderModel.

That’s why I have posted this report. You can also check the video I have linked, I show the exact Explorer Hierarchy.

I have also attached a studio file reproducing the exact problem.

1 Like

You’re right, let me take a closer look.

5 Likes

Hello there! Are there any updates on this?

1 Like

We’ve reproduced the issue and are continuing to investigate, we’ll follow up here when we have updates, thanks for your patience.

8 Likes

We’ve enabled part one of a two part fix for this, so you should see a modest improvement now. We will enable part two some time in the next couple of weeks, which will optimize this even further. Thanks for your patience.

11 Likes

We enabled the second fix for this last week. In order to fully optimize your skinned meshes to achieve the maximum improvement, you will have to re-import them. Re-importing is not required unless you are still experiencing frame drops.

6 Likes

Great news! Can we have some details on what was happening before vs what is happening now?

1 Like

I can’t give too many details, but we made a number of optimizations to low level engine code, so you shouldn’t notice any behavior changes.

1 Like

Indeed, after reuploading my skinned meshes, everything runs smoothly.
Thank you for taking care of this!

1 Like

This topic was automatically closed after 42 hours. New replies are no longer allowed.