Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 BlueSin · Mar 14, 2014 at 06:23 PM · meshspriteatlas

Atlas on Mesh rendering issue

We use sprite atlas' for each terrain material type our meshes will need, as the meshes are procedurally generated. As such, we may have one or more submeshes for our mesh. Occasionally when the player moves, a part of the tile next to the tile being displayed in the atlas will bleed through. You can stop and catch this on screen, and if you move just a smidge it will disappear.

We know it is not a problem with our mesh generation, so it either has to be some sort of feature that needs to be disabled in Unity settings, or it could be the settings on the material or sprite itself from import.

Anyway, here are some pictures of it:

Bleeding: http://imgur.com/G64I0ee

Moved a smidge to the left, no Bleeding: http://imgur.com/bK5Sakm

You can see the bleeding on the right edge of the right hole that was dug. And actually, we noticed that the boldness of the edge lines changes when we move as well. This is because tiles next to them in the atlas also have an edge and it is probably showing the edge from that tile in addition to the edge of the tile that is supposed to be drawn. So this is happening all the time, just coming and going as you move. Anybody have a solution for this?

Comment
Add comment · Show 8
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 robertbu · Mar 14, 2014 at 06:28 PM 0
Share

While I've never done anything like this procedurally, third-party tools that use texture atlases have a setting for padding or some sort of pixel bleed setting. I believe the problem is that you are mapping fixed pixels into floating point uv coordinates. You may be able to mitigate in your code through some sort of rounding as you do your uv calculations.

avatar image BlueSin · Mar 14, 2014 at 07:44 PM 0
Share

I noticed that some people put magenta boxes around the tiles inside their atlas. Is this to prevent this very issue? I was just thinking...it only seems to bleed like 1 pixel or so...so if I had a transparent border around my tiles then it wouldn't bleed anything. But then again, when its supposed to look fine I might wind up with transparent lines around my tiles!

avatar image whydoidoit · Mar 14, 2014 at 07:52 PM 0
Share

I've found padding to well defined values seems to work better for me - effectively ensuring things have to be on a 4 pixel defined boundary seems to work. The filtering mode of the texture also makes a difference - you want point normally in these cases I find.

avatar image BlueSin · Mar 14, 2014 at 08:02 PM 0
Share

So just to make sure I understand correctly...basically re-create the image and add in a few pixels of padding in between the tiles?

avatar image whydoidoit · Mar 14, 2014 at 08:41 PM 0
Share

Yes, and play with the filter mode on the imported texture.

Show more comments

1 Reply

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

Answer by BlueSin · Mar 15, 2014 at 03:36 AM

Resolved. Answering my own question so I can close it out.

There were two separate problems. The first was that I needed to added transparent padding between the tiles in my atlas. The second was with my character controller's skin width.

I changed the skin width on Unity's clunky character controller and it stopped. Annoying, I hate Unity's character controller. I need to do a new one, its so clunky. Thanks all for your help!

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

21 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

Related Questions

How to scroll a region of texture (which is an atlas) on a mesh (which is a sprite) 2 Answers

How do you bend a 2d texture in 3d?,How do you bend a 2D object in 3D? 0 Answers

Can I use a Mesh as a Sprite Mask? 0 Answers

How do I access a texture slice's rect via scripting? 1 Answer

Tool to make ONE flat sized mesh from a png/texture? 5 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