When you move your camera in specific angles, you can see decals behind other decals. I’ve noticed this for quite some time on both macOS and Windows10.
Happens in studio and in games.
DecalRepo.rbxl (82.1 KB)
cc @zeuxcg
When you move your camera in specific angles, you can see decals behind other decals. I’ve noticed this for quite some time on both macOS and Windows10.
Happens in studio and in games.
DecalRepo.rbxl (82.1 KB)
cc @zeuxcg
This is due to how the engine orders the drawing of transparent parts. It is based on the distance of the center of the object to the plane on which the camera lies. See these for an explanation:
So when you turn the camera around your ship, the center of the sail is sometimes closer to the camera plane, but the center of the rope net is closer from some camera angles. This is why the ordering flickers even though it shouldn’t if this was rendered with a 100% correct ordering.
This is a known issue, there’s not really a good method in computer graphics that renders transparent part in a 100% correct order that is also computationally efficient and portable across different kinds of hardware.
Here is some more discussion in this thread:
https://devforum.roblox.com/t/decal-fog-rendering-bug/20034
You can also search for “user:zeuxcg transparency” or “user:zeuxcg transparent” to get more discussion about transparency issues posted by zeuxcg.
This is a good explanation but still; I never seemed to notice this before and that ship has been around for almost three years. So I would’ve noticed it.
This problem is as old as video cards. A solution would be Roblox adding alpha-test support to decals. With alpha test, the texture’s pixels are either fully opaque or fully transparent, no in between, which allows the geometry to be treated the same as opaque geometry with z-buffer based depth testing.
I use a LOT of textures in my games, sadly it’s a major issue that must be worked around. Try spacing the decal/texture a bit away from the other one. You don’t normally notice the decal appearing through unless you’re fairly far back (depending how close the two are together)
Well I would like this to be addressed instead of “hacks” to avoid it. I can’t move those things back any further because that’s how ships are designed.
Also doesn’t address the fact that this didn’t seem to happen 6 months ago.
I can tell you this has been happening for years and years. They didn’t change the behaviour, it’s always been based on the distances between object centers and the camera plane. I’m not sure why you didn’t notice it before, perhaps in a previous version of the model you didn’t have both of the ship parts transparent.
It is undesired behaviour but I wouldn’t expect a fix anywhere soon:
Check the thread I linked for a more in-depth explanation by staff.
Looking again at the video, you could use actual polygons for the sail instead of a flat decal. If your goal was optimization, it was misguided: a low end GPU will have a much easier time rendering an opaque mesh with a hundred triangles compared to a two-triangle single alpha blended decal. Alpha blended geometry/decals cause the same pixel to be written to multiple times, using more memory bandwidth which is exactly the most lacking resource on low end GPUs, both PC and mobile.
Ok, so decals are now useless and Roblox should never had made them?
What he is referring to is that your decal has very little detail and it might be cheaper just to have an opaque mesh for that reason, without losing visual quality. If your texture was more complicated, then of course you can’t make it out of polygons without it being more expensive than drawing a texture.