Jump to content

Alpha Masking - Progress Bar (HELP!)


You are about to reply to a thread that has been inactive for 324 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

What is the best way to get an even gradient for the cutoff mask so I can make a pretty accurate progress bar? I had used animated textures before and they always seem extremely buggy and was suggested to use this instead...


Photoshop is not giving an even gradient to use the alpha cutoff, as you can see in the photo the 127 cutoff value is not 50% of the alpha mask, or at 50% in the green.

photo_2023-06-16_13-43-04 (2).jpg

photo_2023-06-16_13-43-04.jpg

  • Like 1
Link to comment
Share on other sites

The midway point of your alpha mask reads as about 176 for me, so very much not 127. If use my image editor's levels tool to apply a gamma of 1.8 to your gradient, it becomes roughly linear with 127 around the middle.

I'd imagine the issue is color profiles: Photoshop is applying some kind of gamma correction to your alpha mask gradient instead of treating it linearly. As for how to make it not do that, no idea, it's been decades since I used Photoshop, sorry. Color profiles can be damaging to image data that's not meant to be interpreted as colors, though, such as alpha channels and normal maps, so there has to be some kind of a feature to work in a linear space.

Edited by Frionil Fang
  • Like 2
Link to comment
Share on other sites

1 hour ago, Frionil Fang said:

Photoshop is applying some kind of gamma correction to your alpha mask gradient instead of treating it linearly.

That may be part of it. But it may also be that SL uses lossy texture compression and anti-aliasing that both blur the texture. And of course, there is no exact 50% calue in a 0-255 scale.

2 hours ago, Darx Snowpaw said:

What is the best way to get an even gradient for the cutoff mask so I can make a pretty accurate progress bar? I had used animated textures before and they always seem extremely buggy and was suggested to use this instead...

What I would have done, was make a texture that is 50% opaque white and 50% transparent and use texture offset to move the bar.

  • Thanks 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 324 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...