Skinned Meshes Flickering

There is a major issue with flickering on skinned meshes that significantly affects their functionality. The issue is very easy to reproduce.

Essentially, whenever changing anything that causes the skinned mesh’s render properties to change, every skinned mesh in the game can stutter/flicker as shown in the clip below. For instance, adding a decal to a skinned mesh, changing transparency, changing size, changing color, and more all cause this flickering/stuttering to occur.


Gyazo Link of Clip: https://gyazo.com/b05796292829aeedb15ae7bf8bf502a3

Reproduction

The flickering is reproducible when the skinned meshes are moving. It’s more reproducible when there is a large number of skinned meshes. The attached file reproduces the flickering bug. It’s the same file as in the clip. In the file many skinned meshes are created and then moved. While the skinned meshes are moving, only the first row of skinned meshes has their size change every 1 second. This causes massive flickering not only to just the front row, but to every other skinned mesh.

File:
flickering-2.rbxl (42.5 KB)

In the attached file I have puts comments on the local script. I put a comment beside the single line of code that if removed stops the flickering entirely. That line of code changes the size of the skinned meshes.

I’m really looking forward for a response. This is an issue that happens both in studio and in game. I’ve been dealing with it for months. It has really limited my use of skinned meshes since I can’t add any decals, I can’t change transparency of attached parts, etc. If you need any more information from me please let me know.

Thank you so much for reading this.

36 Likes

Thanks for the report! I filed a ticket in our internal database and we’ll follow up when we have an update for you.

5 Likes

Hey, have you tried putting each skinned mesh in its own model? When we have skinned meshes in the workspace, they sadly end up all being part of the same giant skeleton, so any updates to the size of one part forces the skeleton to get rebuilt.

Each model however, has its own skeleton, so if I change the line where clone is parented to clone.Parent = Instance.new("Model", workspace). I think the issue is mitigated.

Changing the size of a part tho does force the skeleton to be rebuilt and it’s kind of an expensive operation so u still might see stuttering with updating a lot of meshes,

4 Likes

I have. I experience this flickering in my own game which has skinned meshes in a model.

I’ve updated the reproduction file to put the part in a model and I’ve made it change the transparency of a decal (only for the first row of skinned meshes) instead of the size every heartbeat.
flickering-2.rbxl (42.9 KB)

This causes flickering in not just the front row, but also the second row. It however, leaves the other rows mostly normal.

https://gyazo.com/ee565956fad26f703a14327b2c230ae3

Instead of changing transparency of a decal, you could try changing the color or transparency of the mesh itself. All of these cause flickering. Also in this reproduction file the skinned mesh is very simple with only 3 bones. For complex skinned meshes, it might take a lot less to cause flickering.

2 Likes

Do you happen to have an update on this?

This is significantly limiting what I can do with skinned meshes in my game.

1 Like

i’m still looking into this, but I can’t really repro the second row flickering that you have shown in the video. My suspicion is that updating 200 meshes (even with few bones) every heartbeat is still quite expensive.

2 Likes

Here’s a gif of the flickering happening in my game. It looks like an r6 rig but it is a skinned mesh rig. It is as if the parts welded to the skinned mesh are lagging behind. In the clip there are far fewer skinned meshes and updating to the render properties of the skinned meshes (like changing the transparency of a decal) is significantly less frequent compared to the replication file.

https://gyazo.com/57d40125030f7c14a1b390be4d877f60

I’m almost completely sure that the flickering is being caused by me changing the transparency on the decals because when I use tween service instead of simply toggling the transparency, the flickering becomes extreme. The flickering could also be exacerbated by the rag doll. The rag doll, however, only updates the “Transform” and “WorldCFrame” attributes of the bone. These aren’t major operations and shouldn’t cause flickering.

In the clip you can also see flickering on troops that are not rag dolling and not having the transparency of their blood decal change. So this is kinda similar to the replication file in that the issue spreads to nearby skinned meshes, even ones that aren’t having any properties changed (besides position).

The issue is definitely performance related and is probably why you’re not seeing the second row flickering. If you try increasing the amount of skinned meshes or reducing your system’s performance by opening background tasks and whatnot, I think you’ll start to see the flickering. My laptop is not really built for gaming which is probably why I see the second row flickering.

Why this flickering is happening instead of an fps reduction? Could this behavior be changed? If I had to guess this flickering is being caused by the updating of certain attributes unnecessarily causing the skinned mesh’s skeleton to be rebuilt.

Is updating the decal/color on a skinned mesh causing its skeleton to get rebuilt? If so is that really necessary, it seems like those operations shouldn’t need the whole skeleton to be rebuilt.

2 Likes