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 jellybit · Jun 07, 2013 at 11:57 PM · texturetransparencygradientopacityunlit

Gradient transparency results in full opacity for half of the gradient

So, when I set a perfect opacity gradient from 255 to 0, Unity renders the gradient as half complete opacity, then picks up proper opacity at 128 down to zero. Looks extremely smooth from that point in fact. Here's what it looks like, and my settings for the texture are on the right:

alt text

I'm using the "Transparent/Cut Out/ Soft Edge Unlit" as my shader on the plane. I need unlit because my scene doesn't have lights. I can avoid the complete opacity by starting my gradient at 128 and going down to 0, but then I don't get any full opacity range. It starts out as half transparent and goes to full transparency. Here's the PNG I'm using (I tried PSD and TGA as well):

alt text

Can anyone help me out? Am I doing something dumb? Is there any way to get a full range of transparency from completely opaque to invisible? Thanks!

unitygradient.png (39.2 kB)
gradient.png (7.9 kB)
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
1

Answer by Eric5h5 · Jun 08, 2013 at 12:32 AM

Transparent/cutout means either transparent or not. If you want a range of transparency, don't use cutout shaders. That particular shader has some extra stuff for soft edges in addition to cutout, hence the behavior you see, but the important thing is not to use any sort of cutout shader for this. By the way, you only need 2 pixels for that texture--100% solid green for one pixel and 100% transparent for the other--since bilinear filtering will take care of the gradient.

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 jellybit · Jun 08, 2013 at 02:13 AM 0
Share

That did the trick! Thank you. I chose cutout because someone told me I had to when I was seeing that the green had a gradient to white as well as transparent with the other shaders, but I fixed that issue by taking off the transparency mask on the green layer in photoshop.

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

15 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

Related Questions

How to change a texture's (or a material's ?) opacity ? 1 Answer

in game - how to partly invisible an object ? 2 Answers

GUI: make texture visible/invisible? 1 Answer

How to get transparency exported from substance to unity 3 Answers

Assigning UV Map to model at runtime 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