Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sharifi14

macrumors member
Original poster
Jun 10, 2006
33
0
Hi there,

I'm trying to create an effect similar to that of the window border of Windows Vista, i.e. when you move a window over a certain area, the content behind the window border will appear blurred out.

I have managed to create this effect with some simple masks and filter effects. However, this method is inefficient as I have to keep reapplying the blur effect whenever I want to move the foreground object.

This probably doesn't make much sense, so I have attached a set of images to illustrate what I am trying to achieve. I hope somebody understands my problem and has a solution! Many thanks,
 

Attachments

  • 1.jpg
    1.jpg
    113 KB · Views: 139
  • 2.jpg
    2.jpg
    106.2 KB · Views: 101
Duplicate the photo on another layer and blur it (or whatever series of effects you applied) then apply a Layer mask. As you move the mask (NOT the image) you will see the blurred image on top of the regular image.
 
Duplicate the photo on another layer and blur it (or whatever series of effects you applied) then apply a Layer mask. As you move the mask (NOT the image) you will see the blurred image on top of the regular image.

Exactly as Kgarner explained, but there is one more step not mentioned. Make sure to unlink the mask on layer with the effect that you want to move around. If you don't unlink the mask it will not move independently of your background as you want.
 
no need to duplicate the photo if you convert it for Smart Filters. Apply the blur and you can mask the filter only.
 
Thanks for all your help. I'll give that a try - I'll be back if I get stuck ;)
 
no need to duplicate the photo if you convert it for Smart Filters. Apply the blur and you can mask the filter only.

I've tried your method but I don't fully understand the Smart Filters concept. Do you know of any good online tutorial that can help me get started with Smart Filters? Thanks.

If this is for a website, you can do this easily at runtime in Flash.
All you need is the background image and the window frame graphics.
The rest is handled with actionscript.

Here's an example that works in reverse of what you're doing, but the process would be exactly the same.
http://www.byrographics.com/AS3/blurDragger/example12.html

Flash runtimes are a bit out of my depth unfortunately (I've never actually learned Flash for that matter). The example you showed was a brilliant example though. How difficult was it to achieve that effect?
 
The basic effect is fairly simple to construct on the timeline.
On a scale from 1-10, it's probably a 2.
This took me about 2 minutes to construct the layered objects and Mask, and about 15 minutes to write the code for the interactive "drag me" widget.
I can attach the Flash CS3 file if you'd like to look at it.

The basic "blurred window effect" requires no coding whatsoever.
It's only the interactivity that requires some intermediate coding:
Code:
import gs.*;

var masker:MovieClip = pix.pixMask;
var dragger:MovieClip = pix.pixFrame;
dragger.addEventListener(MouseEvent.MOUSE_DOWN, startMove);
dragger.buttonMode = true;

var yOffset:Number;
var xOffset:Number;

function startMove(evt:MouseEvent):void
{
	yOffset = pix.mouseY - dragger.y;
	xOffset = pix.mouseX - dragger.x;
	stage.addEventListener(MouseEvent.MOUSE_MOVE, pointMove);
}
function pointMove(e:MouseEvent):void
{
	TweenGroup.allTo([pix.sharp,pix.pixFrame.pixFrameFill], 1, {alpha:1});
	TweenLite.to(pix.blur, 1, {alpha:.5});
	
	dragger.y = mouseY - yOffset;
	dragger.x = mouseX - xOffset;
	masker.y = dragger.y;
	masker.x = dragger.x;
	e.updateAfterEvent();
}
stage.addEventListener(MouseEvent.MOUSE_UP, stopMove);

function stopMove(e:MouseEvent):void
{
	TweenGroup.allTo([pix.sharp,pix.pixFrame.pixFrameFill], 1, {alpha:0});
	TweenLite.to(pix.blur, 1, {alpha:1});
	stage.removeEventListener(MouseEvent.MOUSE_MOVE, pointMove);
}
 
I've tried your method but I don't fully understand the Smart Filters concept. Do you know of any good online tutorial that can help me get started with Smart Filters? Thanks.

Smart filters operate on Smart Objects. If you convert your mask to a Smart Object, when you choose Filter > Blur, it adds a "smart filter" rather than just applying a blur to the layer you have selected. You can movie this from layer to layer much like you can with layer styles.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.