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 UnresolvedExternal · Aug 02, 2016 at 11:55 AM · textureuv mappingmipmapsseamsedges

Seams between tiled textured cubes

Hi! The world in my game is built up by textured cubes that are tiled together. I have a big problem though. If it put two cubes together seams get visible from certain angles. I think this is due to mipmapping. So far I have tried these things:

  • Start uv-coordinates at 256.5 instead of 256, and so on... (my faces are 256x256)

  • Turned of mipmapping.

  • Set wrap mode to clamp.

  • Set filter mode to point filter.

  • Edge padded the texture atlas with first 4px, then 8px, then 16px, then 32px. But still bleeding occurs at certain angles. Also updated the uv-coordinates accordingly.

  • Changed my atlas to be of Power of 2 instead, i.e. 1024x1024 instead of 1024x768.

  • Set "Non Power of 2" in Unity to None so Unity doesn't rescale my texture to nearest Power of 2.

  • Set texture format to Automatic Truecolor instead of Compressed.

With 32px edge padding it actually gets a lot better, but it still isn't perfect, I guess I could go on and try even more padding, but my textures will get bigger and bigger.

At far distances I don't think the seams is a problem, but I can see this occuring just about 5-7 units away from the player, if the player is looking down.

This is how I have edge padded my texture (the cyan lines not visible on real texture), the problem does not only occur when the faces has such extremes distinct difference in colors as this one. It also occurs when the faces have patterns.

alt text

This is how it looks in-game if I look down on the cubes. Between the two visible seams in this image there are 2*3 cubes tiled. As you can see, seams does not occur at every intersection of cubes. alt text

I've been having this problem for a very long time now. Forever grateful if you can help me to solve this!

==== UPDATE ====

If I remove the textures the problem still persist, so the problem isn't with the texture.

I also tried to change the prefab for my cube to use Unity's default Cube-model instead of my own exported fbx-model, same problem.

Tried changing the Quality in quality settings, no setting make the seams disappear completely, although they appear differently depending on which Anti Aliasing setting I choose (2x, 4x...).

If I undock the Game tab and resize it, the seams appear differently depending on the size of the game window.

mytexture.png (19.5 kB)
2016-08-02-12h23-48.png (7.8 kB)
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 UnresolvedExternal · Aug 06, 2016 at 01:36 PM 0
Share

Anyone? (see update above)

avatar image Cherno · Aug 06, 2016 at 02:49 PM 0
Share

Does it look like that in the game view, too?

avatar image UnresolvedExternal Cherno · Aug 07, 2016 at 09:10 AM 0
Share

Yes, it also looks like this if I build the game and run it in full screen.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by StupidlySimple · Aug 07, 2016 at 12:11 AM

This is basically another question about: How do I stop texture bleeding?

You can't, at least you cannot in editor view no matter what. There will always bleeding in editor or game view regardless from my experience. I spent a lot of time fixing the bleeding on the editor view, but when I compile the game and run it, there's no bleeding.

I have these following setting on texture:

Mip Mapping: off Filter Mode: Point

It might be the way Unity render graphic inside editor for speed, which made sense. You wouldn't want Unity to render 4k scene at High Quality during editing. Everything would be moving at glacier speed.

Also, when I load texture "manually", there's no bleeding regardless of whatever setting I set in the Asset Folders since it doesn't use those settings. It doesn't bleed even if the texture file dimension is not in power of 2. I only test this on 2D tile maps, but 3D concept should apply. Texture Atlas is the same for 2D and 3D.

Basically:

             Texture2D item = new Texture2D(0, 0, TextureFormat.RGBA32, false);
             item.LoadImage(resource.bytes);
             item.filterMode = FilterMode.Point;
Comment
Add comment · Show 2 · 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 UnresolvedExternal · Aug 07, 2016 at 10:06 AM 0
Share

Thanks for the comment! It doesn't seem to be a problem with the texture or my model. If I remove the texture and/or change to Unity's default Cube the seams are still visible.

I tried to build and run the game with no textures and Unity's cube, and the seams are visible there as well:

alt text

2016-08-07-12h02-44.png (3.1 kB)
avatar image Vollmondum · Aug 07, 2016 at 10:09 AM 0
Share

You can try changing "Clamp" to "Repeat" in texture settings in inspector. Same seams are visible in Skyboxes, for example, if set to Clamp.

avatar image
0

Answer by mezzostatic · Jan 01, 2017 at 09:20 AM

@unresolvedexternal Not 100 percent sure of this because i solved it a while back, i'm pretty sure however:

If you send mesh objects with different positions to the graphics card, unity's precision is not high enough and the actual vertex positions in the graphics cards, the seams, will not be the same. hence you will see seams inside the graphics card.

If you put all your cubes on 0,0,0 and instead change their vertex positions to the positions you want, and send them all to the graphics card, they will not contain seams.

AFAIK i solved the issue after some time and puzzling, perhaps waster 50 hours to solve it, becaues i was told that my problem was inside the game engine not the graphics card.

So... keep all cubes on zero zero zero, edit their vertex positions, rewrite all the vertices to the new positions you want the cubes to be in, there should be no vertex differences sent to the graphics, because correct vertices, same object position, please confirm, ive done it with terrain and the seams completely vanished. if you send different object positions, same vertices, unity makes seam errors. the seam positions in the graphics card differ microscopically.

Its a weird error inside Unity that no one else than me knows about because i am a lame coder who never managed to code a game but i know so much about everything.

Comment
Add comment · Show 1 · 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 Hamburgert · Mar 01, 2020 at 10:21 PM 0
Share

Sorry, didn't work for me. Good idea though. Tested this workaround on Unity 2019.3.2f1.

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

8 People are following this question.

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

Related Questions

mipmapCount for Cubemap and Texture3D 1 Answer

Does "texture quality" setting uses mipmaps ? 0 Answers

good program for uv texturing 2 Answers

Jagged texture edges 1 Answer

Will a low-resolution texture atlas cause these mip-mapping artifacts? 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