Blur filter + mask

I think a couple people asked about this problem but none of them seemed to get an answer so I am re-posting.
This is how blur filter and mask work in code
var blur:BlurFilter = new BlurFilter();
blur.blurX = 10;
blur.blurY = 10;
var mask:Bitmap = new Bitmap(...)
var shape:Shape = new Shape();
shape.graphics.beginFill(color, alpha);
shape.graphics.moveTo(100, 100);
shape.graphics.lineTo(...);
shape.graphics.endFill();
shape.filters = [blur]
shape.mask = mask;
bitmap.bitmapData.draw(shape);
But result is not what I want. Please see the below image:
Making another bitmap and copy pixels using the mask works but it makes whole applcation very slow.
How can I mask blur filter using a single draw?

The difference between the code I posted and what you have there is that you are applying the mask and the blur to the shape, whereas I applied the blur to the shape and the mask to a container the shape is inside. This is because for a given object the filters apply AFTER any masking, but you want the reverse. The only way to control the order that I know if is to create more layers.
In other words, change the last code you posted like this:
1. Create a container for the shape:
var container:Sprite = new Sprite();
2. Add the shape to the container:
container.addChild(shape);
3. Apply the blur to the shape, and the mask to the container:
shape.filters = [blur];
container.mask = block;
3. Draw the container to the bitmap:
bitmap.bitmapData.draw(container);
That should produce the image you want.
-Aaron

Similar Messages

  • Using Camera Lens Blur Filter / Mask

    I have a question concerning the lens blur and I hoping someone can point me to a good tutorial.
    I have several interview segments and I would like to do a small digital zoom at the end of each clip. The background is slightly out of focus already and it doesn't look natural to zoom when the bokeh is not changing.
    I have a good handle on the filter but I am not that experienced with advanced mattes. I need to learn how to get the matte on the person and stay during the zoom so I can manipulate the background. The subjects are seated on a stool so their is very little movement.
    Did some searches but I am probably not searching the right keywords. Can anyone point me in the right direction.
    Thanks.

    Masking? Rotsoscoping? I can think of a million ways to create separated layers or mattes and then duplicate the layer and invert the masks/ matte, but if you never have used that stuff before, you will hard-crash on concrete and not get very far, I'm afraid. It takes at least a bit of practice to produce a clean matte. As a palce to start you may get by suing the Rotobrush and see, if it produces clean enough edges, but if not, it's proably better to scrap the idea before eitehr ending up with a bad result or not meeting your deadline...
    Mylenium

  • Filter masks and blur gallery

    I create a blur filter on a smart object layer.   I then mask the filter.    I then add another filter to the same layer but it seems to ignore the existing filter mask.  When I press M in the filter window for the new filter I do not see any mask.
    I thought the mask would apply to all filters for the same layer.  Am I missing something?
    Thanks
    Paul

    I seem to be missing something I do not understand what your describing with " When I press M in the filter window for the new filter I do not see any mask." What or where is the filter window.   For me the Filter mask seems to be common to all smart filters added to the smart object layer. 
    I your mean Filter Gallery window. All effects will also go through the common filter mask.  However Filter Gallery will only show as a single smart filter.
    Here I selected the left half if the image so there would be an active selection when the Filter mask is added and not be a white  show all  mask. In the filter gallery I could see each effect added was only to the left half.  I commit three effects. so the filter would show with the filter mask in the layers palette.   I the reopened the smart filter Filter Gallery. When I reopened it the active selection not being active any more showed the whole image as being effected however the filter mask protected the right side of the smart object layer as you can clearly see in the image window.
    Again when I originally applied the smart Filter Gallery the was an active selection so there would be something in the filter mask and the select would be visible in the filter gallery.  Here is what I saw.
    If this is not the first smart filter added to the layer and there was already A filter mask  to see its effect in any new added smart filter I would think you would first have to load the filter mask as an active selection.
    Not only did I have to load the filter mask as a selection I had to turn off the other smart filters visibility.

  • How can i view the ellipse and the points on the ellipse in order to modify the settings when i'm using the iris blur filter on Photoshop CC 2014

    I can't use this blur filter (diaphragm) because i see nothing that could allow me to increase, decrease or move the ellipse that normally appear(?) on the screen. What's amazing is that this filter does his job on photoshop CS6, but not on Photoshop CC 2014 ?! Thanks in advance for your help.  Serge.

    Start from the beginning
    - Select the Rectangle Tool - go to Options Bar, ensure 'Shape' options is on from the the Pick a Tool Mode drop down list.
    - Draw Rect. This should create a vector Shape Layer.
    - Select it in the Layers Panel: The Properties Panel then should highlight the Density and Feather options.
    What happens here when you drag the Feather slider? On my end it feathers the vector shape as a whole.
    If you need further masking capabilities, then apply a Layer Mask to the Shape and proceed with the Properties Panel Density/Feather options.
    h

  • Link Smart-Object Filter mask to transformation of Smart object

    Often it would be very nice, if you could link the filtermask of a smart object to the smart object itself. So that when you transform the SM (rotate, scale etc) the filtermask of the smartfilter is transformed, too.

    It would seem if a linked layer mask can be transformed with the smart object the filter mask could be linked as well.
    I didn't mean the workaround to be vote against the request. But it does have an added benefit. When you transform a smart object with almost any smart filter the appearance of the filter changes. Blurs become more or less blurred depending on the transform. Same with sharpen. If you want the effect of the filter to appear the same after the transform you need to embed it into a new smart object.

  • Field blur, tilt blur, iris blur in mask or channel ??!!!

    it will be really great to have the abillity to use the new 3 blur filters on a mask or channel.
    it would be agreat time saver!!!
    thanks!

    thanks mathias,
    the thing is that i want to use the field blur on the mask, not using the mask.
    anyway, thanks for the reply.
    example: when i draw a shadow i use adjustment layer (curves) i draw the shadow in the mask, than i need to blur the mask progresivley going out from the origin/object.
    i use the blur filter multiple times going out from the origin/object. with field blur that would be only one step.
    thanks!

  • Blurred Edge Mask

    Is there a way to create a blurred edge mask? I have tried
    creating my mask layer, changing it into a movie clip and adding a
    blur filter to it. When I create a mask out of this, the edge is
    hard and not blurred. I have also tried creating a mask layer that
    has a linear gradient from 100% to 0% opacity. The same thing
    happens when I create a mask out of it.
    Does anyone have a suggestion? Can this be achieved using
    actionscript?
    Thanks.

    cheesewagon,
    > Thanks for the response. I do not see where I can sign
    up
    > for a free preview in order to view the tutorial?
    The freebie is for 10 days, and you can get to it by
    clicking the Join
    CMX link in the upper right of the site. In the new page,
    click "Monthly
    with 10 day Trial." Even if this particular tutorial doesn't
    give you what
    you need, you may be pleasantly surprised to find bunches of
    other stuff,
    including tutorials on other Adobe products and even
    non-Adobe technologies.
    > I am trying to have this mask wipe across the screen
    > revealing anothr image. Will this explain how to do
    this?
    The technique in that article will certainly give you the
    footing to
    accomplish what you're after, but it isn't an article on mask
    tweening.
    I've used this technique to apply soft-masking to a video
    clip that moved
    around the stage, so I know that it a) gives masks a soft
    border and b) can
    be animated. :)
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Can you make a "filter mask" in FCP ?

    Like in photoshop you can add an "adjustment layer" , for example Hue/Saturation and then add a mask so the Hue/Saturation will only apply to a certain part of the image... Can you do the same thing in FCP, ie: apply a filter mask ?

    Thats a good tip thanks. I've used the 3-way's visual interface before so didn't notice the -limit on luma- option.
    The bottom half of my picture was underexposed,-- but it seems like this limit on luma would allow me to lighten the bottom half without increasing further the over-exposure in the top half.

  • How do I apply the blur filter to all my layers at the same time?

    Hi I'm working on a background for a web page and I want to try how different filters are going to affect all the layers. Is it possible to apply a filter to all the layers without flattening the file first? Thanks very much,
    Cathy

    Thanks very much , that's really helpful,Cathy
    Date: Thu, 23 Dec 2010 11:18:21 -0700
    From: [email protected]
    To: [email protected]
    Subject: How do I apply the blur filter to all my layers at the same time?
    Hello!
    There is no need to flatten the file, but you can create a layer that merges all the content of the image, and apply the filter on that layer.
    Target the topmost layer, by holding the Option and . (period) keys, then create a merged copy by holding down Command Shift Option E.
    >

  • Can the tilt shift blur filter be used in a smart object?

    can the tilt shift blur filter be used in a smart object?

    I could be wrong, because I don't have PS in front of my, but I'm pretty sure the capability to use those blurs in smart objects was added in CC.

  • Blur filter question

    Hi there,
    I'm in the planning phase for a project and was wondering if it is possible to dynamically blur video using the blur filter? Specifically, I want to:
    1) Stream an flv file, and apply the blur to the left and right edges of the video, so that they become clear on mouseover.
    2) Blur the whole video, and have only the region closest to the mouse pointer clear, which will follow mouse movements.
    3) Feather the blur, from blurred to clear
    What sort of additional system resources does the blur filter require? Will it increase the swf file size much?
    Thanks for your help!
    Dave

    Thanks for the quick reply kglad. So is there no way to have a gradual blur? Does the area to be blurred have to have crisp edges like http://imm.sheridanc.on.ca/imm2006/alducent/tutorial/blur.html ? I really need to have the region that follows the cursor to be in focus (showing the flv behind), and then have it gradually blur more and more the further away from the cursor.
    Thanks,
    Dave

  • CS 5.5 plug-ins - sans Lens Blur Filter

    hello the BASIC Lens Blur filter from AE 5 is NOT showing up in AE 5.5 - and yes its in the correct folder in AE 5.5 but its not a choice in the effects menu
    any solution suggestion?

    Lens blur is not included in 5.5 as a selectable option.
    However, you can add lens blur to a layer in CS5, then open or import the project in CS5.5. The filter will show up and you can copy and paste it to another layer. It's kind of a wonky workaround, but it will work.
    I'd love to see a project where the new filter won't do what the old one did. Blur map is the new Depth Map. If you have an example, even WO footage I'd love to take a look at it.

  • Zoom blur filter jerks

    zoom blur filter
    I am using zoom blur: amount- goes from 100 to 0 with no keyframes except at beginning and end and steps- goes from 10 to 0 with no keyframes except at beginning and end ---
    WHY DOES IT jerk instead of playing smoothly?
    Mac G5   Mac OS X (10.4.5)  

    Uh-oh...my usual forum disclaimer is typically worded "seasoned pros." C'est la vie. On the otherhand, being 50+ myself, "old" has taken on an elevated status... so it shows honor, respect....deference. Truly.
    Dual G5/2.5GHz/4.5 GB, internal ATA, G-SATA 500   Mac OS X (10.4.7)   Final Cut Studio 5.0.4

  • LR/PS - Applying the Lens Blur Filter for Selective Focus | Adobe Evangelists - Julieanne Kost | Adobe TV

    In this episode of The Complete Picture, Julieanne Kost shows us how to get great results with the Lens Blur Filter in Adobe Photoshop CS4.
    http://adobe.ly/x3bXus

    After you make the blur over the full picture, you quickly switch to the gradient panel, but you say it so fast that I don't know what you pressed to get there. It sounds like you say tap the "g" key for gradient. But when I do that, the paint bucket tool appears. Help?

  • Scrubby sliders in the Lens Blur Filter in PS CC 2014 behaving erratically.

    The scrubby sliders in the Lens Blur Filter in PS CC 2014 are behaving erratically. In PS CC no problems. I may be mistaken, but I think I read somewhere that this filter only works on 8bit images.
    In PS CC it works on 16bit, and in PS CC 2014 (no third-party plugins) nothing works. Could this have something to do with the Graphic Card, or Cache Levels? All advice appreciated.

    Sorry, no solution to the problem, but a confirmation. I do have the same problem (Intuos Pro and Pen & Touch) showing the problem with ACR 8.5 and Photoshop (2014, CC and 6, these were updated with ACR 8.5) . No such problem before ACR 8.5 and no problem with LR 5.5 (also containing ACR 8.5).
    I hope there will be a solution from Adobe soon, since sems to be caused by the ACR update.
    Windows 8.1 in my case and latest Wacom Intuos driver installed.
    Thomas

Maybe you are looking for

  • Why can't I load Candy Crush Saga on facebook? Help me please?

    I have just downloaded and installed firefox, but I cannot load Candy Crush Saga although it works well with other games on facebook. I do not know why. At the first time, firefox informed me that it lacked the updated flash player, so i installed th

  • Building Field Symbols Dynamically

    Hi All, Has anyone tried to build field symbols dynamically? something like this...   DATA: field_symbol(13) TYPE c,         v_lines          TYPE sy-tabix,         v_count(2)       TYPE n.   FIELD-SYMBOLS: <f2> TYPE ANY.   DESCRIBE TABLE itab LINES

  • [help] Dreamweaver font size.

    Hello, I have Dreamweaver CS5 on my mac, and i tired to program but the font size too small ! there a picture : how can i resize the font?

  • [SOLVED] error when tried to run Anki "requires a UTF-8 locale"

    Traceback (most recent call last):   File "/usr/bin/anki", line 5, in <module>     import aqt   File "/usr/share/anki/aqt/__init__.py", line 12, in <module>     from aqt.qt import *   File "/usr/share/anki/aqt/qt.py", line 10, in <module>     from an

  • [internalization] cannot get the correct local lang

    Hi there, I'm trying to develop an application based on the Internalization tutorial. I'm not getting any errors by the server, but the application doesn't change the local language. In the HTTP monitor I've got the following header parameter sent by