how to localize effects parameters

GL
Posted By
guy_lateur
Dec 16, 2003
Views
314
Replies
4
Status
Closed
Hi all,

I was wondering if it would be possible to use an image (or mask, grayscale) to determine the parameters of an effect applied to another image (or another layer within the same image). I mean, suppose I had a bitmap with some white blobs in it, gradually fading out to black. Is it possible to use this image to control the amount of (for instance) blurring that happens on my other layer? So where the mask is white, the image should be heavily blurred, and where it’s black there should be no blurring at all.

I know that a similar effect can be achieved by feathering a selection, but that’s not good enough. I really need bitmaps for control, because I will be batch processing this effect on all frames of a video, and the regions to be blurred will vary from frame to frame.

Any ideas?
I use PS 7, btw.

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

HP
Helen_Polson
Dec 16, 2003
Hmm, this might not help, but this is how I’d do it…

I’d copy my layer, and blur it. Then I’d select the white bits from the bitmap layer to make a layer mask for that blurred layer. Then parts of the unblurred layer below would show through.

What I really think you’re after is a filter layer which you could apply a layer mask to, but Photoshop doesn’t have those- but it’s a feature I think has been asked for.
P
Phosphor
Dec 16, 2003
Guy…

Please understand that "bitmap" doesn’t mean the same thing in Photoshop as it does when referring to a "*.bmp" file under Windows.

In Photoshop, a Bitmap-formatted file has only 2 colors. Consider your example of:

"…suppose I had a bitmap with some white blobs in it, gradually fading out to black. Is it possible to use this image to control the amount of (for instance) blurring that happens on my other layer? So where the mask is white, the image should be heavily blurred, and where it’s black there should be no blurring at all."

This context is not applicable to Bitmap-formatted files in Photoshop, since—with only Black and White—there is no facility for blurring, which would indicate varying shades of gray.

I’m not meaning to sound like I’m being overly-picky. But when asking questions like this, that delve into some of the more esoteric aspects of image manipulation, it really helps if you know and understand these kinds of differences. That way, everyone participating in the discussion is on a level playing field.

Cheers!
GL
guy_lateur
Dec 16, 2003
Well, it’s not exactly what I was looking for, but it did get me thinking about that strategy. After all, your method would work perfectly well if you had a black and white only mask (no gray, so no intermediate levels of blurring).

However, I intend to do quite a heavy blur on the white regions, so maybe I could iterate this approach a few times. I mean, first I select the pure white pixels and blur slightly. Then I select the white pixels with a bit of variance on the color (eg, gray levels between 240 and 255) and blur again. Next select an even wider range of gray (200 to 255) and blur again, and so on. That might actually come pretty close to what I’m after. So thanks Helen, you’ve been very helpfull indeed!

Still interested in hearing about a more general solution, though – if one exists in PS, that is. Would scripting be of any use here? I mean, can you access individual pixel values using JS? It doesn’t matter it takes a few days to render, I’ve got enough cpu cycles to spend on this.

EDIT: Oops, sorry Phosphor, didn’t see your message there, the above was in reply to Helen’s suggestion. But you’re right, my original post could’ve been clearer; a bit indeed is either 0 or 1, so no gray.
DM
dave_milbut
Dec 17, 2003
it’s possible to add a layer mask then use gaus blur to "feather". so it should be entirely possible to do this with a static black and white layer.

to see this in action, make a selection. click add layer mask in the layers palette. in effect, that’s your black and white image. Now run gaus blur on the mask. See the feathering. Now run levels and you can tighten or loosen the effect.

do this a couple of times til you feel comfortable with it, then apply the same techniques to a black and white layer instead of a layer mask.

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

Related Discussion Topics

Nice and short text about related topics in discussion sections