Decal ZIndex property is ignored in some cases (Resurgence of an old visual bug)

Reproduction Steps
This bug seems to be happening again for me:

Please read the old thread for a more detailed discussion/repro on the issue. In essence, whenever you have a dense array of decals (especially inside a character, like on a place) layered on each other using ZIndex, they ZIndex property will be ignored, and the decals in the lower and upper layers will start to Z-fight.

I also have had a private message thread with @tnavarts on this issue: https://devforum.roblox.com/t/re-latest-update-reverts-zindex-property-of-decalstextures-causing-z-fighting/1365990

I am getting user reports of this happening again in my game (see the eyes of every player in this image):

This is very upsetting because it happens most often when lots of players are grouped together, and I have just recently launched my game and am just trying to grow my audience. This negatively impacts player experience and makes it hard for me to grow my audience due to the way my faces have a layered, ZIndex-dependent decal structure.

Expected Behavior
Decals should layer correctly. This has a semi-transparent black decal showing the contour of the lips, with a solid red decal underneath showing the color of the lips.

image

Actual Behavior
Decals will now z-fight, with one layer appearing over the other inconsistently. In this image, the solid red decal renders over the contour image, showing a completely red image.
image

This happens more often in dense areas with decals placed on transparent or semi-transparent parts, in which the order in which they are shown is based on Z-Order. My guess is that this Z-Order sorting is overriding the ZIndex property on decals.

Workaround
When reparenting these face parts to workspace, this bug can be mitigated. However, there are a host of issues that happen in my game when I do this, and I don’t like making an entire complex compatibility patch that affects many systems in the game just for a bug that can be reverted anyways.

Issue Area: Engine
Issue Type: Display
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2022-02-03 00:02:00 (-07:00)
Date Last Experienced: 2022-02-03 00:02:00 (-07:00)

8 Likes

Same thing happening here. Truly game-breaking as in my game every avatar has these custom faces that literally depend on the decal zindex feature. Hope Roblox fixes this ASAP
1
2

3 Likes

@DataBrain Using the same test placefile from when that bug was originally reported - I cannot reproduce this issue.

Can you please provide a redacted placefile we can use to debug the problem? Thanks!

This also began happening in my game yesterday: Gacha 3D 🌈 - Roblox

I have four decals layered with ZIndex from 1 to 4 to build up the face of the character. Once I have over 5 characters in the same location ZIndex clashing starts.

You can see this replicated here in this place EyeTest - Roblox

If more than five pairs of eyes are on screen they will clash, below that they act as normal (try looking at the two eyes off to the right on their own).

This issue doesn’t occur in studio only in live games.

I’ve tried numerous fixes including using very high ZIndex values with large gaps, reducing the number of decals elsewhere in the game, parenting the decals to DIFFERENT parts. None of it solves the issue.

Looking for a solution or alternate method as this is core to how I build my custom characters (same as OP) so this is game breaking for me. Thank you!

1 Like

@hyperhumanist Any update on this would be really appreciated! I can’t figure out any workaround so far.

Hi @XOX_STUDIOS . Thanks for the test place, this is really helpful!
Sorry for the delay, I’m busy on several fronts. It will take some time to track this, but I’ll try to look into this ASAP.

2 Likes

Just checking on this… I believe this was fixed some time ago. Please let me know if you still see this.

1 Like