Tree leaves SpecialMesh flickering when near the edge of the frustum

Hello,

I am not sure I am in the correct category, but it seemed relevant. Please correct me if I am in the wrong section.

As of late I have been having this issue in a game I work on.

  • What are you attempting to achieve?
    In our game, we have these trees. Each one is split into two meshes, the branch and the leaves. The leaves are using a SpecialMesh and a decal (the latter to achieve coloring of the leaves).

  • What is the issue?
    As of late, it seems that the mesh disappears when it is partially out of view. Unfortunately, this causes the trees to look dead and breaks some of the immersion. This also causes shadows to glitch out. A video of this can be found below.
    https://youtu.be/xUBCbiPjtV8

  • What solutions have you tried so far?
    I have searched for solutions with no solution to be found. Additionally, I viewed it on Studio and saw that the behavior did not happen.

Could this be an engine bug? I posted it here as I am not too familiar with building and thought it might be resolvable.

Much thanks,
Kip

2 Likes

Are you able to see the backside of the leaves? If not are you able to make it double sided?

2 Likes

The tree is visible regardless of the direction. This is also using a SpecialMesh so there is no option to make it double sided. Unfortunately this issue is very recent, but it has been fine for the most part in the past.

2 Likes

On a model, there a certain sides or normals that cant be seen in certain game engines. By pressing Shift+N if you are using Blender, the normals should recalculate. The red sides aren’t able to be seen.

Basically the red part is supposed to be the inside and not visible, the blue part is supposed to be the outside. Shift+N flips it.

Maybe that’s your issue.

Hi! I appreciate the responses! One thing to mention is that we did not have this particular issue months ago. Additionally, viewing it on Roblox Studio does not have the same behavior. I believe the mesh itself is perfectly fine.

1 Like

Are you using a .png texture or are the leaves SpecialMesh slightly transparent?
I’ve had issues with them because they have transparency properties. Even if the image is set to Transparency 0 you can still see through them.
Semi transparent parts/images/water have always had an issue due to the way the Roblox engine renders them. It can’t register levels of transparency well.

1 Like

The image is a PNG and no transparency is applied. It has worked fine until lately and has been completely unchanged :slight_smile:

1 Like

If you added a whole bunch of items recently it might be slowing down the rendering engine causing the flickering.
Those SpecialMeshes look like they’ve got a ridiculous amount of tris so if you added a few hundred of them I’d expect some issues.
Maybe export one of them to Blender to see how many tris there are.

1 Like

Hello! This game has not been updated with much of anything as of late. The issue might also appear to be hardware-dependant. I have a high-end PC and unfortunately it is happening to it, but it is not happening on my phone or on Studio. It feels like some form of occlusion but I cannot figure it out.

I am not experience with changing graphics engines, but I’ve seen others on the forums recommending trying different engines to combat this type of issue.
The problem is that for the problem to completely go away you’d have to get every single user to convert their computers graphics setup to one that doesn’t cause the issue…

1 Like

That would be an odd request I’d say. It seems to happen randomly to people, but for me it has happened consistently as of last week. I’ll be sure to look into it more.

1 Like

I have confirmed that the problem is now universal across all devices. I have even moved a tree to my own baseplate and the issue still happens when running in game. The mesh seems to be perfectly fine in Studio. This issue hasn’t happened before this month.

I have confirmed that it is likely tied to the Decal that it uses, though I don’t know any alternative approach that would help.

The hierarchy looks like this. The Part Transparency is set to 1.
image

This is all necessary in order to achieve the leaves we wanted at the time.

It was observed that the Decal (Also tried with Texture) only has this behavior when the part above it is transparent. This is not behavior that was present before this month, so could it be a possible Roblox bug? We had used these trees for about three years now.

The closest I’ve gone to a fix is setting the transparency of the Part to 0.999, which is unfavorable. Appearance-wise, anything between 0 and 1 results in transparency so visually it is fine, but I imagine this is not the solution I’d need.

1 Like

Have you tried saving the image as a .jpeg instead of a .png?
.png images with transparency 0 still have some kind of transparency to them.

1 Like

Hello, the image would not work as a JPEG as transparency would be removed. Adjusting transparency to a really low decimal (0.0001) appears to have fixed it. I believe this might actually be an engine bug…

1 Like

Like this:

1 Like

We do not use Future lighting on our game and the issue isnt that it was translucent but rather that it was invisible. Quite the odd bug you had with future lighting though! We will be making the switch to Future pretty soon.

Bumping this because I have more details.

This is definitely the work of Frustum Culling which assumes that the SpecialMesh is out of bounds now. I do not know how to handle this but it also appears to be somewhat of a problem on Occlusion Culling.