Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Blur expression to eliminate flicker during moves on hi-res stills

  • Blur expression to eliminate flicker during moves on hi-res stills

    Posted by Dbmiller on June 4, 2006 at 5:03 am

    Someone told me he had written an expression to eliminate flicker during moves on hi-res stills, by increasing the amount of blur as a function of the move (i.e., more change=more blur)–but that when the still came to rest, the blur would be back to zero.

    Anybody know how to do that?

    Thanks,
    David

    Bausdtown replied 19 years, 11 months ago 7 Members · 14 Replies
  • 14 Replies
  • Jonathan Miller

    June 4, 2006 at 6:02 am

    Two things here.

    First, if you’re getting a lot of flickering on your still, then maybe it’s got more resolution than you need. If it’s scaled way down to make the move, then you will definately get flickering. Reduce the dpi in Photoshop and then it shoudn’t have to be scaled as far down in AE, and you’ll reduce the amount of flicker.

    Next, if you want more blur on the moves, then make sure your layer has motion blur checked and then increase the shutter angle in your Render Settings. It defults to 180 degrees. The higher the number, the greater the amount of motion blur.

    I hope that helps!

    Good luck!

    Jon
    TreeLine Productions
    Fort Collins, CO USA

    Currently producing these popular podcasts:

  • Colin Braley

    June 4, 2006 at 6:25 am

    When I animate still I use motion blur to redice flicker. However, if you were to add an expression to the Bluriness parameter of Gaussian Blur or Fast Blur it might look somehting like this:

    //begin expression—
    maxBlur = 5;
    //———————
    function findMax(){
    max = position.speedAtTime(0);
    for(t = timeToFrames(inPoint); t < timeToFrames(outPoint); t++){ curr = position.speedAtTime( framesToTime( t ) ); if( curr > max)
    max = curr;
    }//End for loop
    return max;
    }//End method
    s = position.speed;
    sMax = findMax();
    //–
    linear(s, 0, sMax, 0, maxBlur)
    //end expression—

    Just change the value of maxBlur to whatever you want. However, be warned that if you have a very long move on one of the stills this expression can take a while to evaluate, and in that case you would probably set up the expression a bit different.
    ~Colin

  • Colin Braley

    June 4, 2006 at 6:29 am

    Even though i did post an expresison for you, for reducing flicker expressions probably aren’t the way to go. I suggest using motion blur and cranking up the shutter angle or just adding a very small gaussian blur.

  • Steve Roberts

    June 4, 2006 at 2:51 pm

    Ah, but prosaic expressions often lead to poetic ones. How can we mess with this one to get a nifty effect, I wonder?

    Hmmm … maybe with a bit of randomness …

  • Lars Bunch

    June 4, 2006 at 3:13 pm

    Hi,

    One of the things you can do that helps reduce flicker on a high res shot is to add a median filter to the image and set it to something really low. It’s not a perfect solution, but it goes a long way to reducing the flicker.

    I suppose you could fine tune it with the above expression to adjust it’s value based on the rate of change.

    Anyway, the median filter gives you less of a performance hit during rendering.

    Lars

  • Colin Braley

    June 4, 2006 at 7:13 pm

    Well Steve said we can mess with this expression to make something “poetic” so here goes….

    //begin expression—
    maxBlur = 5;
    amp = 30;
    freqAdjust = 1.2;
    //———————
    function findMax(){
    max = position.speedAtTime(0);
    for(t = timeToFrames(inPoint); t < timeToFrames(outPoint); t++){ curr = position.speedAtTime( framesToTime( t ) ); if( curr > max)
    max = curr;
    }//End for loop
    return max;
    }//End method
    s = position.speed;
    sMax = findMax();
    //–
    freq = linear(s, 0, sMax, 0, amp);
    amp * Math.sin(time + freq/freqAdjust) + amp

    //end expression—

    //end expression—

    In this one the bluriness paramater oscillates up and down and the speed of the layer’s movements control how fast it oscillates.

  • Steve Roberts

    June 4, 2006 at 8:19 pm

    Hah! Colin, you’re a poet!

    🙂

  • Colin Braley

    June 4, 2006 at 11:42 pm

    I’m glad you appreciate my attempts at poetry Steve

  • Sam Moulton

    June 5, 2006 at 6:55 am

    tried your expression, seemed to not work. The first one did, but the second one was fouled up because i got 30 as the max blur and changing the max blur didn’t change anything.

    I tried this expression which adjusts blur based on speed.

    L = position;
    bf = .01 // blur factor;
    L.speed * bf

    a more elegant solution, which I may work on would also correct by the ammount that the object was off from a whole pixel value. want I mean is if the position was 23.2 pixels it would blur less than when it was at 23.0 pixels because aliasing would add to the apparent blur when the layer isn’t at a whole pixel value.

    interesting idea…

  • Colin Braley

    June 5, 2006 at 1:41 pm

    Sam,
    The first expression does work, and while it is not as elegant as your solution, I find it is easier to use. Instead of having the user adjust, “blurFactor” over and over again until their image has the right amount of blur, they can explicitly specify the maximum amount of blur they want using “maxBlur.” The second expression was not meant to simply adjust blur as a funtion of speed. Steve Roberts posted and said it would be possible to use the first expression to make something interesting, so I used the speed of the layer to drive the frequency of a sine wave which controlled the blur.
    ~Colin

Page 1 of 2

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy