- Home /
The mesh has gaps when the adjacent two grids have different materials.
Look like this:
If I move the camera,some gaps will disappear and others will appear.
I'm trying to generate a random map, the random mechanism:
1, a random two-dimensional map data
2, according to the map data to judge different states and number them,
Just like :
3, record different number of triangles
4, depending on the number of triangular grid filled with different material Here is the tutorial site. [link text][3] And then the gaps appear when the adjacent two grids have different materials. How can i fix the bug?
Answer by Bunny83 · Apr 22, 2016 at 11:25 AM
Well your UV coordinates are clearly off by one pixel. This happens when you don't target the pixel center but the pixel border. Also if you don't use point filtering for your images you should always add some padding pixels around the image rect, otherwise the neighbor pixel colors will bleed into your image.
Thanks for your answer.
the way doesn't work,but i have found another way to solve it.(it takes a lot of time.)
1,turn off the Anti Aliasing.(Edit -> Project Settings -> Quality -> Anti Aliasing -> Disabled)
2,change the materials's shader.
Add image by using shader(Unlit/Transparent),and change the material shader to (Sprites/Default),and tick the Pixel Snap.
Your answer
Follow this Question
Related Questions
Calculating the triangles of an extruded polygon 2 Answers
Hiding parts of mesh but only on defined objects 0 Answers
Reusing Mesh 1 Answer
Generated mesh has material under submeshes' materials 1 Answer