New ZIndex Property on Decals and Textures

Hey developers,

Sharing a very short and sweet update today. We’ve just added an option to set the render priorities for decals and textures!

The new property, ZIndex, is now part of the Decal and Texture classes. It works the same way as the namesake ZIndex property in GuiObject - If two Decals are overlapping, the one with the lower ZIndex value will appear under the one with the higher ZIndex value. Use this property to make sure any stacks of different decals or textures are displayed in the intended order.

437 Likes

Awesome update! I’ve come across many problems recently that this update would solve. Does this work in the worldmodel instance under a viewportframe? Will beams get this property eventually aswell? Beams seem to have an overlapping problem.

Is there any plan to add surfacegui rendering to viewportframes? The reason I ask the question above is because of the inability to use surfaceguis inside viewportframes. (which have the zindex property)

36 Likes

How will this work with sister SurfaceGui objects? Will Decals/Textures always have priority over SurfaceGuis or vice versa?

@VexotDev blinking eyes moment

18 Likes

Could be really handy for I guess bullet decals, maybe having some form of grunge effect overlaying other textures.

Finding uses for this is hard - probably because i’m not that creative.
Is there any performance decrease for having a really high ZIndex, or having textures overlap?

10 Likes

Does this work in all instances or only on base parts? (Part, Wedge, CornerWedge)

If it doesn’t work for Unions/Meshes (MeshPart / SpecialMesh Block) is there any intentions to add that in the future?

8 Likes

I guess it would be somewhat useful if someone wants to put a custom texture on and then put on a decal over it but i’m struggling to find uses for this.

4 Likes

Nice update. I don’t have any uses for it at the moment, but I’m sure it’ll come in handy.

5 Likes

One of the use cases is when you want to put dirt texture over a car texture.

31 Likes

Yeah I guess i never thought of that that would be a good use for this

4 Likes

Very useful update!
Hopefully, a property like this will be added soon to SurfaceAppearances so they too become stackable!

10 Likes

zindex has been in decals for a while now, it was just disabled for unknown reasons, still cool how its finally been added

4 Likes

I’ve been wanting this for SO LONG. It’s going to make it so much easier to create facial expressions for characters and make cool textures on parts without textures and decals being randomly placed. Love it!!!

9 Likes

Very needed update. The next step would be giving ParticleEmitters a ZIndex of their own that interacts with the ZIndex of Decals. This would solve the very common problem of Decals randomly rendering over particles and looking unnatural.

6 Likes

Not bad Roblox, this is actually a step foward to making Roblox realistic!

3 Likes

This feature was so needed and now its out, great job!


And since when we are able to see decals through transparent parts? Is this part of this update or another one?

Unfortunately we still cannot see particles through transparent parts.

12 Likes

A godsend of an update that opens many possibilities, thank you! Dare I ask, can we ever expect ZIndex on clothing? ZIndex clothing could make a big difference for games with their own avatar customization.

6 Likes

This was an issue that has persisted for years, engineers! This may be long overdue, but hallelujah! :smiley:

5 Likes

Is there any performance decrease for having a really high ZIndex, or having textures overlap?

It’s just a number to used to sort the decals. Peformance of rendering two decals with ZIndex of 1 and 2 is same as if indices are 1 and 1000000.

15 Likes

I am not really big on textures or decals but I am sure this update people are gonna enjoy.

5 Likes