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 BerggreenDK · Sep 04, 2011 at 11:26 AM · textureblendertileuv mapping

UV mapping problems with multiple textures in same file

We use Blender for modelling our objects and export them as .FBX files.

We have 16x 2D-tiles in a 1024x1024 texture as 4x4 tiles, but when we import the flat ground objects seperately and instance them, the border of the ground shows an imprecision near the edge of them, like if the pixel of the next tile has been used to make an edge or smooth the color.

The ground element is a simple square and the bitmaps are 100% precise in Photoshop. 256x256 pixels.

Somehow the pixel color of the next tile gets into the ground of the tile? Its like the UV maps are unprecise when mapping.

Has anyone else seen this problem and better, does anyone have a solution?

The reason for keeping the tiles in same texture should be the way that shaders work with textures as it has to switch them in and out when rendering all the small tiles. Combining them should give performance benefits + its easier to keep all the tiles in same colors because a filter can be added in a seperate layer in Photoshop.

Yes, we know we could auto-export them in small tiles, but this example is only part of our problem as we have many normal 3D objects that suffers same problem when trying to combine the textures and reusing parts among different objects.

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
2

Answer by Waz · Sep 04, 2011 at 11:42 AM

You're basic approach is correct - a single material and UV texture cutting is likely better than small textures and many materials.

But finding a way to get precise texel alignment across DirectX, OpenGL desktop and ES, and for diverse tools like Blender and Unity to conspire to help rather than hinder is not something I would hope for. Someone else may know better, but the usual approach is to have a border of at least one pixel (more if you enable mipmaps) around UV islands - in this case your tiles. Alternatively, pull your UVs in half a pixel.

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 BerggreenDK · Sep 04, 2011 at 03:19 PM 0
Share

pull UV's in half a pixel... intersting... might work, as we have a lot of seamless textures and these suffers visually from that extra pixel.

avatar image numberkruncher · Jun 13, 2012 at 12:43 PM 0
Share

@Warwick I understand that adding a border around each tile will offer better results, and thicker borders allow for higher mipmaps. I have implemented the 1/2 pixel solution that you mention and this works rather well. I notice that when zoomed in there is 1/2 a pixel missing.

Why does this work? I thought that texel/pixel alignment was consistent between OpenGL and the later DirectX versions. Do you know if this 1/2 pixel approach works with ES?

Cheers

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Squares from normal and height map 0 Answers

How do I use many different tile textures for one mesh? 2D Tile based game. 2 Answers

Problem with UV maps and textures 2 Answers

Blender to unity, importing UV mapped image textures 1 Answer

Wrong import of UV from blender 1 Answer


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