Getting back to the issue of tearing, which I imagine it's these weird lines in your 1440_810.mov video:
Have you tried a very slow zooming out effect instead of randomly walking around? I think this would let you find an exact zoom level that makes the problem appear, so you can write it down and keep using it until you debug this problem.
About the green grass tiles, are they part of a larger "tileset" (a larger image with many tiles)? If so, this would make it a texture sampling issue, where the rounded texture coordinates end up sampling the regions at the border of the tile and the rest of the image (like empty background).
You can test this by changing the image background to red, magenta, yellow or anything easily identifiable, and seeing if the lines change to that color.
The solution to this is to pad your tiles with a 1 or 2 pixel border. I know you said you wanted to avoid this, but it's the cost of using texture atlasing.
Others have had the same problem: https://forum.unity.com/threads/tilemap ... ap.499154/
[Help] Techniques for scaling
Re: [Help] Techniques for scaling
* To clarify on what this safety padding should be.
There's no easier way than importing your PNG texture into Photopea, have a transparent background, then go to Filter > 3D > Texture Dilation and drag the slider until you're satisfied.
Then File > Export As > PNG to download the result.
No account needed, they have ads.
There's no easier way than importing your PNG texture into Photopea, have a transparent background, then go to Filter > 3D > Texture Dilation and drag the slider until you're satisfied.
Then File > Export As > PNG to download the result.
No account needed, they have ads.
Re: [Help] Techniques for scaling
Interesting, so I should also deal with the rounding and animation problems. Conceptually, do you know what could be the underlying cause of the rounding and animation issues?
Re: [Help] Techniques for scaling
Awesome, this is very helpful. The tiles are part of a larger tileset. I'll take your advice and troubleshoot in the way you described. I'm happy to pad the tiles if after troubleshooting I find that padding is the issue.RNavega wrote: ↑Sat May 11, 2024 6:58 am Getting back to the issue of tearing, which I imagine it's these weird lines in your 1440_810.mov video:
_.png
Have you tried a very slow zooming out effect instead of randomly walking around? I think this would let you find an exact zoom level that makes the problem appear, so you can write it down and keep using it until you debug this problem.
About the green grass tiles, are they part of a larger "tileset" (a larger image with many tiles)? If so, this would make it a texture sampling issue, where the rounded texture coordinates end up sampling the regions at the border of the tile and the rest of the image (like empty background).
You can test this by changing the image background to red, magenta, yellow or anything easily identifiable, and seeing if the lines change to that color.
The solution to this is to pad your tiles with a 1 or 2 pixel border. I know you said you wanted to avoid this, but it's the cost of using texture atlasing.
Others have had the same problem: https://forum.unity.com/threads/tilemap ... ap.499154/
Re: [Help] Techniques for scaling
I don't know the cause of the animation issues because I haven't looked into how you animate; I just saw the animation to change in a somewhat unpredictable way.
As for the rounding problems, they are inherent to having a non-integer scale. With nearest neighbour filtering, some pixel rows/columns are going to be narrower than others, there's just no way around that. Since the image's coordinates change, the narrower rows/columns change position, producing visual jitter.
Who is online
Users browsing this forum: No registered users and 2 guests