What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Solidifying partially transparent pixels?


Nanako

Member
Messages
16
Likes
2
Hi everyone. I'm making graphics for a 2D game. One important part of performance optimisation is getting rid of unnecessary alpha sorting. I don't want partial alpha unless i have a specific need for it. I'm wanting all my images to be 1-bit alpha only. That is, a pixel is either completely opaque, or completely transparent - never inbetween.

I'm not sure how to do this easily in photoshop. So far i've come up with a workflow that fills my needs pretty well, except that it seems unnecessarily long and complicated:

1. Place the graphic on a transparent background
2. Use the magic wand to select transparent space, using the tolerance value to define the cutoff point
3. Select Refine Edge, and shift the contrast up to 100. For some reason if I don't do this, photoshop will often "partially select" a pixel, giving undesired results.
4. Hit delete. This removes all pixels that were selected (transparent enough to fall within the tolerance)
5. Select > Inverse. Shifts my selection to everything except what i just delete, ie the actual graphic.
6. Using the color picker, i pick an appropriate neutral color from the main body of the graphic. or i use black.
7. Using the pencil tool, with the draw mode set to Behind, and with a colossal radius, i draw on the graphic. This fills in all the remaining partially transparent pixels with the solid colour that i chose

This workflow does the job perfectly for me, and exactly achieves my intended results. but i can only do it on one layer at a time (i usually need to do this on about 18 layers, for a character graphic).

So what i'm looking for here, is some way to automate this process. The overall point of it really is forcing all pixels to "take a side", becoming either fully transparent, or fully opaque. Is there any better built in way to accomplish this? or a plugin? I'm open to commercial tools and plugins, even.

Probably relevant, I'm using photoshop CS5

Thank you in advance for any replies! ^_^
 
Hi, Nanako. First try reading this: http://www.photoshopgurus.com/forum...4326-layer-pixel-transparency.html#post126494

Then you could handle your problem. One way is to use Filter Factory plugin. Just set alpha channel to 0 or 255, depending on it's current value and your cutoff value. I believe it should be something like (a < ctrl(1))? 0 : 255.

Without Filter Factory it is much more trickier: load layer transparency as selection, go to Quick Mask mode, apply Threshold with your cutoff value, Invert the Selection, press Delete. Then start an action I described in my post.

As you can see, Filter Factory plugin is much more straightforward and easy to use. It is totally free and comes with different versions of PS on their discs.
 
i'm still confused, i'm afraid. i'm not entirely sure what filter factory is. i dont have the original disk anymore.
is it a filter? or some kind of framework for filters? how would i use it? can i download it, or whatever i need?
 
Ok, here is the Filter Factory plugin. Put the Filter Factory folder to your PS Plug-ins directory. Also drop the msvcrt10.dll file to the PS install directory(right where the Photoshop.exe file is).

In the Filter Factory folder you can find a couple of tutorials and I already included the filter you want: Opacity Threshold.8bf with it's source: Opacity Threshold.afs.

Good luck:cheesygrin:
 

Attachments

yaaaaay ^___^
thank you so much, this opacity threshold works perfectly.

Now just one more question...

is there any way to apply it on multiple layers simultaneously? (or even all of them) it seems i can only do it with a single layer selected.
 
Sorry, Filter Factory is not script-savvy as far as I know. I don't know why, in my POV it's pretty easy to implement:)

Of course, there are nasty workarounds to it and you can make it work in the end. But, having read your posts I think you've just chosen totally wrong workflow.

In your post "Organising a many-layered image" you could use Layer comps to turn off/on the layers visibility, but I think that you will get much more problems eventually than you've solved.

Reconsider your approach or else you'll find yourself "fighting" the Photoshop instead of using it. And chances are, you'll loose this game before short:)

You just CAN'T get what you want with PS, so you'd better start looking for other ways and stop wasting your time on the things that still won't work in the long run...
 
Last edited:

Back
Top