Mesh texture Edge bleed

I’ve been trying to use meshes with textures applied to them to use in my VFX. For that, I apply transparent textures to the meshes.

However, There has been a recurring problem, where a thin line appears around the edges of the mesh as showed in the images below

RobloxStudioBeta_LE8e115GbI

Here’s what I’ve tried to fix it so far:
At first I thought it was just UV edge bleeding, so I tried squashing the UV from the edges, which didn’t fix it
I then thought that it had something to do with my texture so I erased the transparent edges with the eraser tool in photoshop, which didn’t fix it
I thought maybe it had to do with the instance type, so I went from using a specialmesh to a MeshPart, which still hasn’t fixed it.

What’s weirder is that depending on the distance of the camera, the edge blurs or grows as seen in this old footage from 2023: Watch 2023-04-03_23-38-15 | Streamable

Additional information: I use blender to make the meshes, then use after effects and substance designer for the textures.

Could you provide the mesh and texture?

1 Like

Here you go

CylinderCurved.obj (46.2 KB)

1 Like

Thanks, it looks like it’s happening because the top edge of your cylinder are unwrapped to be exactly at the top edge of the texture.

I’m guessing what’s happening is that Roblox is wrapping the texture back around to the bottom of the image due to floating point issues, and it’s probable that Roblox using mipmapping also influences it.

The issue would become more exaggerated if you made the UV exceed the bounds of the image like so:

The solution would be to slightly move the top edge of the cylinder’s UVs to be slightly below the top edge of the image so this wrapping back around doesn’t happen (your unwrap can “safely” be considered to be between the lower and upper bound of the image, so no this “wrapping” back around doesn’t happen, even at far distances)

Left is the one with this fix, right doesn’t have the fix

Here’s the fixed one:
CylinderCurved.obj (41.0 KB)

If you open it up in blender you can see the top edge of the cylinder is slightly below the top bound of the texture:

Now, for the disc in your original post, I’d assume the top edge of each tri that makes up the disc is right up against the edge of the texture is well, if you want to provide that I could take a look

2 Likes

Thank you very much!, I thought that would fix it too but when I did it the problem remained, the file you provided did fix it, but any ideas as to why it didn’t work when I did it?

How far away did you move the top bound of your cylinder from the edge of the texture? I noticed that if you move it only very slightly, this ring will still appear and I’m guessing that’s mipmapping coming into play. Moving the edge a smaller distance from the edge of the texture would lead to it appearing but not having to move very far.

For example moving it a little below 0.005m still gives me the ring but I have to move a little ways away from the mesh for it to appear:

image

2 Likes

Ahh I see, 0.005 was actrually the exact amount I had tested it at, thank you so much for your help!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.