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
0
Question by maynull · Dec 13, 2011 at 10:07 PM · textureimporttexturespngphotoshop

Textures weird transparency problem -- black lines on edges --

Hey, So, I'm having trouble with using transparent textures. When I import textures, non continous black lines appears on edges like in the image below :

This is problematic image: weirdimageYou can see black lines shown with red circles

And this is correct image correctimageAs you can see there is no problem in correct image. So it looks like image is not "Premultiplied" ( like the option in After Effects ). I did few searches and tried to use SuperPng in photoshop and didn't worked!! ( but actually I'm not making images on Photoshop I'm doing it with Illustrator. ). How can I solve this problem ?? (Also the resolution seems like not similar in unity as it is in png. I don't know why)

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

2 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by myjean17 · Dec 13, 2011 at 10:44 PM

I've had this problem before, and I don't know if this will help but...

1: Does your image have an alpha channel, or just pure transparency? Creating an alpha channel and exporting it as something like a TIFF file can help make it look a little better.

2: Does this texture tile? If not, you could set it to "Clamp" instead of "Repeat" in the inspector.

Hope I could help.

-myjean17

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 Tocaro · Jan 13, 2012 at 08:17 AM 0
Share

Thanks for solving that for me (It was number 2, setting it to clamp), It's been happening on and off for the longest times but only at odd intervals, and always with transparent planes.

avatar image
0

Answer by WhendricSo · Aug 03, 2020 at 10:39 AM

This is caused by the transparent pixels being black. When imported into a game engine, the camera must transform the pixels from the texture into screen pixels, it does this by averaging the color of neighboring pixels and displaying them based on distance (mip mapping and filtering).

When the transparent pixels on the border are a different color than the edge, their color gets blended with the edge color before the pixels are rasterized to the screen. So, this causes an outline. You can fix it by checking "save color from transparent pixels" during export, and making sure that your background color for those pixels matches the edge color of the sprite. Then, it will work on all exported resolutions with no edge artifacts.

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

6 People are following this question.

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

Related Questions

Texture Import - PNG 8bits ? 1 Answer

Textures Import Differently Between PSD and PNG 1 Answer

Create .png file from script, then import as asset 1 Answer

How to import textures from photoshop to unity perfectly? 1 Answer

Texture Discoloration Issue When Importing Into Unity 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