Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 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
0
Question by Hotshot10101 · Apr 02, 2019 at 01:08 AM · transparencyui imagepng

Transparent PNG Image shows up black

I have a PNG image that is completely transparent. There is no color in it at all.

I have this image being used on a UI Image gameobject.

This used to show up completely blank as intended. It is a place holder for other images that I swap in.

In the latest 2018.2 version 2018.2.21 the image is showing up as all black instead of transparent.

If I simply add a single pixel of any color anywhere in the image then it is transparent again except for that pixel.

I don't want some stray pixel, so I would like to know how to fix this.

Can someone tell me how?

Comment
Add comment · Show 2
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 Kermadec · Apr 05, 2019 at 01:10 PM 0
Share

@Hotshot10101 Have you tried reimporting the image into Unity?

avatar image Hotshot10101 Kermadec · Apr 05, 2019 at 01:16 PM 0
Share

Yes. I even created a brand new image from scratch and it did the same thing.

3 Replies

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

Answer by xxmariofer · Apr 05, 2019 at 02:08 PM

hello, pretty sure nothing changed atleast since version 2017, since you said you changed your project version most likely your image properties got reimported in a different way. click your png image go to the compression part in the import settings and change compresion to None. Unity just shows the image you are passing so 100% your transparent image is being painted when compressing.

Comment
Add comment · Show 4 · 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 Hotshot10101 · Apr 05, 2019 at 02:16 PM 0
Share

Looks like it was the compression type. I changed my output target to iOS and the compress type changes to RGBA PVRTC 4 bits. At that point the images are fine and show transparent. When I change the target to Android the compression changes to RGBA ETC2 8 bits. At that point the images all turn black. If I then set the compression to none they become transparent. So is there something wrong with ETC2 8 bits or is that expected behavior?

avatar image xxmariofer Hotshot10101 · Apr 05, 2019 at 02:34 PM 0
Share

i am not really familiar with compression algorithms, but they can lose information when trying to compress the images, i imagine that the way the algorithm works doesnt let you empty pngs, just leaving one uncompressed empty png will not affect your build size but for sure other compression algorithms may work for you :)

avatar image Hotshot10101 xxmariofer · Apr 05, 2019 at 02:53 PM 0
Share

True. Thank you for helping solve this.

avatar image Vollmondum Hotshot10101 · Apr 05, 2019 at 02:53 PM 0
Share

Try rgb8+1bit alpha

avatar image
0

Answer by Vollmondum · Apr 05, 2019 at 01:22 PM

If that's a material, simply edit Alpha cutoff, or change mode to Fade

Comment
Add comment · Show 4 · 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 Hotshot10101 · Apr 05, 2019 at 01:29 PM 0
Share

It is not a material. It is a simple PNG that I am using on a UI Image object.

avatar image xxmariofer Hotshot10101 · Apr 05, 2019 at 01:45 PM 0
Share

i think i am missing something, because all the UI images are "recolored" but it should not appear black, just white, cant you just set the alpha property of the image to 0? if is just for a placeholder it should work

avatar image Hotshot10101 xxmariofer · Apr 05, 2019 at 01:50 PM 0
Share

I need to swap out the image with a real image. If I set the alpha channel on the UI Image object to 0 then when I swap out the image for one I want to show up then that image won't show unless I change the alpha back to not 0. I know I could do that, but that is not the point. The point is that a transparent image should show up transparent with alpha set to 255. There is a bug of some kind and I am trying to get an answer on getting it fixed or if something changed on purpose. This used to work. I have been working on this app for a year and it was fine until a few weeks ago when I upgraded to 2018.2.21.

Show more comments
avatar image
0

Answer by hyupri · Jun 30, 2021 at 12:52 PM

Make sure to export PNG image from Editor as RGBA and in Unity Inspector check the "Alpha is Transparency"

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

107 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 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 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 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 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 avatar image avatar image

Related Questions

what happened to transperancy? 0 Answers

UI Image PNG - Transparent Background Black 1 Answer

On Pointer Enter for semi-transparent UI? 2 Answers

Export PNG with alpha containing a semi transparent texture 1 Answer

Transparency Issue with Large Object 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