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!


Redfisher67

New Member
Messages
3
Likes
1
There was a time when I could remember how to do this but I've been away from PS for a while and need a refresher.

I have baked out ( from 3D software) some ambient occlusion/shadow maps that I want to use as shadows. I want to mask out the ALL of the white and replace it with transparency. I recall having to use a 50% grey fill to accomplish this but my brain has locked up.

Any help would be appreciated.

HF
 

Tom Mann

Guru
Messages
7,223
Likes
4,343
I suspect I know what you want, but, as EvilNemesis said, showing us the file you are working on would help immensely.

Since we don't have the file you are working on, I decided to show you how to take any image that has pure white pixels and easily turn them transparent. I happened to have the following image up in Photoshop because I had just answered a question about it by another person, so I used it to illustrate what you need to do.

Here is a screen shot of the image in PS before I did anything to it:

original.jpg

Next is an annotated screen shot after I moved one of the "BlendIF" sliders. This takes all of about 1 second to do and immediately turns the white pixels transparent (as shown by the checkerboard pattern where it used to be white).

screen-shot-of-adjustments-needed.jpg

If you have any questions about this process (ie, the text annotations in the two square boxes), don't hesitate to ask.

Cheers,

Tom M
 

Tom Mann

Guru
Messages
7,223
Likes
4,343
OK. Nothing is fundamentally different between the example I used in my previous post, last night, and the file you supplied, so one can use exactly the same procedure that I described.

The only slight complication with your file is that it contains a smooth gradation from dark tones near the center to true white as one goes further away from the center. This should be contrasted to last night's example which contained only hard-edged areas of white. The significance of this is that one can use the "Blend IF" slider I discussed in my previous post to define the radius above which you consider the image to be true white.

Anyway, here is the analogous screen capture to what I posted last night:

screen_shot-as_described_last_night.jpg

To verify that this procedure worked, I then saved the result as another PNG file and opened it in PS. As you can see from the checkerboard background, the radius shown in the previous screen shot is indeed preserved after saving. Note that in this screen shot, the BlendIF settings are at their default settings, so you are seeing exactly where there is transparency in the PNG I produced.
result_saved_as_PNG_with_transparency_and_re-opened.jpg

If you have any questions, don't hesitate to ask.

Cheers,

Tom M
 

Redfisher67

New Member
Messages
3
Likes
1
Thanks Tom.

I messed around with this for quite a while. Here's what I tried prior to your last post.

- duplicated the layer
- inverted the second layer
- created a layer mask on the original.
- inserted the inverted copy into the mask.

I was left with what I was looking for, I think. To test it, I placed the masked image on top of a black fill layer. I had to use a level adjustment to totally eliminate the lighter pixels.

I don't think this was the exact way I did it before but I reckon there's more than one way to skin a cat.

Test_1.png

Capture.PNG
 
Last edited:

IamSam

Administrator
Staff member
Administrator
Messages
22,721
Likes
13,258
Curious...

Both techniques on a black background.

Screen Shot 2016-11-12 at 7.46.15 AM.png

Screen Shot 2016-11-12 at 7.46.27 AM.png

Blend if seems to be much easier.
 

Top