Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
1
Question by BarakatBarakat · May 07, 2015 at 07:35 AM · tilemap

Why are there lines on the edges of some of the tiles on my 2D tilemap?

I am generating a flat mesh and setting the UVs to correspond to a tile in a tileset png file that I have set as an Advanced Texture.

Screenshot showing issue (left is unity game, right is map editor): http://i.imgur.com/CIbINof.png

Texture settings: http://i.imgur.com/CFft9Te.png

Most issues I've found that have a similar problem just say to set the Filter Mode to Point. As you can see, I have it set to that. Anyone have any idea why those lines are appearing between tiles? I wonder if it is because the tiles are very small (32x32 pixels) and the floating point texture coordinates aren't accurate enough to pick out 32x32 pixels from the tileset image?

Comment
Add comment · Show 3
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 flashframe · May 07, 2015 at 08:33 AM 0
Share

Have you tried changing the Wrap $$anonymous$$ode settings on your texture in the inspector? I think it's on "repeat" by default. Try "Clamp" ins$$anonymous$$d.

avatar image 0potable flashframe · May 07, 2015 at 09:49 AM 0
Share

Unfortunately I think Clamp will work only on the atlas' limits, not inside.

avatar image BarakatBarakat flashframe · May 07, 2015 at 03:48 PM 0
Share

I've already got it set to clamp. You can see my full texture configuration in the second screenshot. Thanks!

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by steakpinball · May 07, 2015 at 04:58 PM

Normally when working with tile maps in Unity there needs to be a small gap between each tile in the atlas. This is because Unity uses a 3D renderer, which isn't 2D pixel perfect. A particular tile bleeds into the neighbors when rendered. Many atlas generators have options for spacing, padding, or margins. For example, TexturePacker calls this option "Shape Padding."

Comment
Add comment · 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

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Having trouble getting Tidy Tile Mapper API to generate overhead levels 1 Answer

[Mobile] Creating 2d TileMap : Mesh vs SetPixels 0 Answers

2D Array Tilemap Help [C#] 1 Answer

WebGL distorts tilemap 0 Answers

Getting points (or vertices) of a TilemapCollider2D 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