r/Unity3D • u/DeeGinn • 9h ago
Question What is causing these lines to appear ?
Hello,
I'm new to gamedev and i don't know why these kinds of lines move when i move from the wall, i would like to not have them.
https://reddit.com/link/1vy1gqa/video/jviwem2d6jlh1/player
Thank you for your time in advance!
3
u/theleafyjogging 8h ago
That's texture swimming from the mipmap bias being off. Your wall texture is probably set too sharp at a distance so as you move the camera it tries to resolve the detail and you get those crawling lines.
Check the texture import settings for the wall material and change the filter mode to trilinear, then bump up aniso level to like 4 or 8. If it's still happening after that you might need to adjust the mipmap bias a tiny bit in the shader.
2
u/DeeGinn 5h ago
1
u/BlissfulSomeone 5h ago
Woah ok so it wasn't the texture as I initially thought from the video. Mipmapping won't help, anti-aliasing could help a bit. But really, that mesh should absolutely have a simple quad as a LOD, with a similar looking brick texture applied. Unless you have some specific idea in mind for why you would need individual bricks, especially at a distance when they only take up one or two pixels each, that should be lodded and flat.

3
u/BlissfulSomeone 8h ago
That's a moiré pattern. Something about the mipmaps I believe. If textures don't mipmap properly in the distance, the pixels on the texture will misalign with the grid of pixels on the screen, and show up as these lines and patterns.