Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by LaureeGrd · Jul 07, 2018 at 08:46 PM · tilemapgridantialiasing

Tilemap having borders between tiles

I'm having that problem with Tilemap where the tiles have lines between them. They dissapear if I disable antialiasing, as mentioned by many people. The problem is, this is a 2.5D game so antialiasing is needed for the rest of the objects.

How can I fix this? Any advice is appreciated. Thanks. alt text

captura.png (53.8 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by seandolan · Jul 08, 2018 at 03:12 AM

There are a few things that can cause this. If you are using a texture to colour in the tiles, sometimes the texture is getting a little bit of the texture next to it in a tilemap. The quickest way to test this is to make all the textures the same so that even if they are "bleeding" then it will show just the same colour anyway. The other thing (which was the problem in my case) was that I was using separate tiles, where they meet each other, unity struggled to work out what to show. I just reduced my ground tile size from 1.0 by 1.0 to 0.999 by 0.999.

Try the texture thing first. Then try the size of your tiles. At 0.999 you won't see any gaps between the tiles, but unity will know that they don't overlap.

Comment
Add comment · Show 7 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image LaureeGrd · Jul 08, 2018 at 08:08 PM 0
Share

Going to test these now. Thanks. I'm pretty sure the first one is not the case since lines are transparent, and also disappear when disabling antialiasing. Even more sure considering that my texture atlas is just 4 tiles. But still, gonna try that first. The other option was something I actually wanted to do but didn't know how. So it's probably going to solve it.

avatar image LaureeGrd · Jul 09, 2018 at 12:56 AM 0
Share

I changed filter to Bilinear just so I could see more of the lines, and I noticed that they're actually the color from the adjacent tiles. So, I guess they're "bleeding", even tho the texture is alright, and it also looks alright in Sprite Editor. Of course, I switched the filter back to Point.

The thing that I don't get is: Why, assu$$anonymous$$g the textures are indeed bleeding, it stops happening when I disable Antialiasing.

I guess it is a problem related to AA ins$$anonymous$$d. Right? Thanks

alt text

alt text

captura1.png (33.5 kB)
captura2.png (364 B)
avatar image seandolan LaureeGrd · Jul 09, 2018 at 01:21 AM 0
Share

It's probably more that the AA is hiding the impact. I had a similar issue when adding UVs to a mesh. This was my original code:

         newUV.Add(new Vector2(tUnit * texture.x,tUnit * texture.y + tUnit));
         newUV.Add(new Vector2(tUnit * texture.x + tUnit,tUnit * texture.y + tUnit));
         newUV.Add(new Vector2(tUnit * texture.x + tUnit,tUnit * texture.y));
         newUV.Add(new Vector2(tUnit * texture.x,tUnit * texture.y));

Then I changed it to get the texture but with an inner border of 0.01f. Like this:

         newUV.Add(new Vector2(tUnit * texture.x + 0.01f,tUnit * texture.y + tUnit - 0.01f));
         newUV.Add(new Vector2(tUnit * texture.x + tUnit - 0.01f,tUnit * texture.y + tUnit - 0.01f));
         newUV.Add(new Vector2(tUnit * texture.x + tUnit - 0.01f,tUnit * texture.y + 0.01f));
         newUV.Add(new Vector2(tUnit * texture.x + 0.01f,tUnit * texture.y + 0.01f));
avatar image LaureeGrd seandolan · Jul 09, 2018 at 01:30 AM 0
Share

but shouldn't unity pick the UVs correctly since I'm not coding it myself? I'm just using the Sprite Editor and it looks like this

Also, AA is not hiding the problem. Disabling it makes the game looks alright. With AA enabled, I get lines.

alt text

captura3.png (4.5 kB)
Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

89 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to check if a grid unit position has a tile from the Tile Palette placed on it? 1 Answer

Low frame rates when using custom 2d tilemap 0 Answers

3D Terrain or Mesh Grid 1 Answer

Limiting size of a tilemap grid and populating it through a file 0 Answers

Grid and or Tile System 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges