[UNITY] [HELP] Thin Dark Lines/Artifacts showing up on Edge of Mesh?

Hey, what could be causing these thin dark lines? It only happens on particles systems that are using a mesh renderer and it seems to be happening near the edge of the mesh. Plus, it only shows up in Game View, Scene View is fine.

I was suspicious of UV stuff and went back to Blender to shrink a little bit the UVs of the mesh…which fixed all of them, BUT this one.


How does your texture looks like ? If it’s bleeding, you can fix that by changing your texture wrap mode to clamp or mirror. If you need to tile the texture on a specific axis, you can specify the wrap mode separately on each axes with “Per-Axis” mode.

Hi! Thanks for coming by. I’m not on my PC right now so I can’t get the texture and post it here, otherwise I would. Though I know it’s not bleeding and I’ve set it to Clamp already, because I want to have it scrolling over Lifetime, coming from “outside” the mesh by using Custom Vertex Streams.

This might be caused by the mip level, as they sometimes cause aliasing errors in sharp angles. You could try forcing the highest mip in the shader on the texture2D and see if the problem still persists.

There are multiple solutions to that then.

  1. Always keep the highest mip level.
  2. on the texture, draw the edge of that part a bit over the edge of the UV, to make sure the black won’t bleed in.
  3. Change the sizing of the UVs. (which you already did).
  4. make the mesh a bit rounder at that part (maybe another edge loop) so it doesn’t have too harsh of an angle there. (as it is view dependent)

Mip Maps are LODs for textures. These will be generated automatically in most engines. They are useful to make some GPU calculations faster, as it doesn’t need to sample a whole big texture if the object is further away from the camera, but just a smaller one (eg, instead of 512x512 it uses a mip level with 64x64). In most cases, it also mitigates aliasing, but in some edge cases create visual aliasing themselves.
As it is produced automatically, there of course can be some errors, as it reduces pixels. That is why, often for albedo/diffuse textures, you will see that on textures the last pixel on the edge of an UV is repeated until the edge of the texture.
But the tradeoff of having the mip is, that it fills out more texture memory (~30% more) as new information is generated.

I hope this solves the problem!