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
1
Question by Agent654 · May 20, 2013 at 01:44 PM · guialphaprogress-barcircularcutout

Circular Progress Bar/Meter - how to generate smooth alpha channel for cutout?

Hey all;

So at this point I've seen the thread by Eric (awesome, thanks Eric) regarding how to put together a circular meter, and I understand what and how this is working in Unity.

However, every attempt that I've tried to re-create the alpha channel for my own asset always results in the asset "filling" oddly - as I adjust the cutout value for the asset in Unity, it does fill in following the arc of the circle, but it also fills from the inside of the arc outward; the best way to describe it is like ink bleeding into a napkin. So I also saw this post - where it appeared the compression settings within Unity could've been causing this as well.

So I've been monkeying around with that setting as well, but I can't get the asset to fill as smoothly as Eric's original from his demonstration.

So my question is probably less about Unity, and more about techniques on how to use either Photoshop or Illustrator to create a smooth angle gradient that follows a curve, but is the same white/black balance from the inside of the arc to the outside of it. Or, if Eric would be so kind as to just post how he made that gradient for the alpha channel in his example, that would be excellent.

Any help is greatly appreciated! And if there's anything I should be including attached to this question, please let me know!

-Agent654

Comment
Add comment · Show 1
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 robertbu · May 21, 2013 at 05:55 PM 0
Share

Here is an alternate circular progress bar that works by rotating textures:

http://answers.unity3d.com/questions/394850/make-a-circular-progress-bar-that-changes-state-up.html

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by aldonaletto · May 21, 2013 at 04:52 AM

I just selected the gradient angular mode in my old Photoshop CS2:

alt text

...then dragged a line from the center of the image to the top...

NOTE: As @Agent654 said, this actually has the same "ink-blot" appearance - smells like a Photoshop gradient characteristic, not an Unity problem.

In order to solve this, I created a simple program in Delphi (oh God, Pascal sucks...) and generated a 16 bit RAW file, then saved it via Photoshop in the PNG format. The result can be seen (and downloaded) below, and worked as expected: the border appears jagged as it should be in a cutout shader, and definitely doesn't look like a Rorschach test as before.

alt text


angulargradient.png (67.2 kB)
psangulargradient.png (4.0 kB)
Comment
Add comment · Show 6 · 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 Agent654 · May 21, 2013 at 02:46 PM 0
Share

aldonaletto - Thanks for the suggestion, but that's exactly what I did within photoshop and I'm still getting the same "ink-blot" appearance within Unity as the color fills.

Any other techniques to make the gradient more even?!

avatar image Agent654 · May 21, 2013 at 05:45 PM 0
Share

Aldonaletto - thanks again for posting, after going back and double-checking the assets from Eric's example in-game, his alpha cutout suffers from the exact same problem.

avatar image AlucardJay · May 21, 2013 at 07:16 PM 0
Share

Could it possibly be an issue regarding your import settings on the texture?

avatar image aldonaletto · May 25, 2013 at 04:37 PM 0
Share

@alucardj: I did some testing, and concluded that the problem is the Photoshop gradient, not Unity. I generated a RAW mask with a small program, imported it to Photoshop and saved in PNG format, and it worked fine.

avatar image Chronos-L · May 26, 2013 at 09:13 AM 0
Share

Will turning off anti-aliasing help removing the ink-blot effect?

Here's what I got:

With AA

alt text

Without AA

alt text

The original image is a gradient circle I rendered in Blender. I then ran a quick test with them. If I turn off the anti-aliasing when I render/export it, the ink-blot effect is gone.

withaa.png (1.2 kB)
withoutaa.png (1.2 kB)
Show more comments

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

16 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

Related Questions

Creating a Circular Progressbar / Timer 6 Answers

Fill a Circular Progress Bar Based on Value 1 Answer

GUI Progress ? 2 Answers

How to make a progress bar(non uniform shape) 2 Answers

Alpha set by tag in GUI.Label / GUI text behaves strange way 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