Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression to maintain overall transparancy when blending two layers

  • Expression to maintain overall transparancy when blending two layers

    Posted by Kevin Dearing on May 28, 2008 at 5:55 pm

    Hi all,
    I’m hoping to find a mathmatical answer for what I’ve been trying to do manually..

    In a nutshell I have a 5 second fog clip that I need to loop to 25 seconds.. My first attempt was to use several copies and use Keyframe assistant -> Sequence layers to offset them, blending the layers by changing the opacity gently during the overlap. As you may have guessed, it’s not a linear thing – ie, the result was that the overall opacity would grow or shrink depending on how the two layers blended.. The visual result was that the fog was getting more dense then thinning out again at each overlap.

    Does anyone have an expression to maintain the overall transparancy?
    (Or, is there an easier way to extend this 5 second clip without changing the timing of it – I like the way the fog evolves and moves around and don’t really want to change that.)

    Thanks in advance!

    –KTFA

    Filip Vandueren replied 17 years, 11 months ago 4 Members · 6 Replies
  • 6 Replies
  • Mike Clasby

    May 29, 2008 at 2:56 am

    For the speed change you can Time Stretch or Time Remap the clip, but a five fold spread will leave it very star-stepy, so you need time Warp, AE7 or better, see this tut for details:

    https://www.videocopilot.net/tutorials.html?id=30

  • Mike Clasby

    May 29, 2008 at 3:05 am

    As to your first question, Hmmm… you probably can with CS3, see this page:

    https://www.motionscript.com/design-guide/obscuration.html

    If you subbed in one of your fog layers for the Lens Flare, having the expression adjust the opacity instead of Flare amount, it should work. I don’t have CS3 so can’t test it.

  • Kevin Dearing

    May 29, 2008 at 5:30 am

    Thanks Mike,
    I guess I wasn’t too clear.. I don’t want to change the time at all – just want to increase the duration leaving the speed constant…

    I’ll check out the link to motionscript.com that you pointed me to and report back on whether it works with CS3 or not..

    Thanks for your time..

    –KTFA

  • Darby Edelen

    May 29, 2008 at 9:03 pm

    When you have two solids that are 50% opaque above one another they will each half the amount of ‘light’ that is passing through them, resulting in a 50% reduction followed by another 50% reduction… allowing a total of 25% of the ‘light’ through (25% transparency or 75% opacity).

    Unfortunately, the way this works is that as soon as a layer is less than 100% opaque, no number of additional layers at below 100% opacity will total to 100% opacity. If the top layer is 99% opaque and the second layer is 99% opaque that is a total of 99.9999% opacity. 1% or .01 of the ‘light’ gets through the first layer, then only 1% or .01 of that light makes it through the 2nd layer, so .01 x .01 = .0001).

    However, if you add the transparency values of the layers together instead of AE’s standard mode of operation, that should work. Try using the ‘Alpha Add’ blending mode is my short answer =)

    Darby Edelen
    Lead Designer
    Left Coast Digital
    Santa Cruz, CA

  • Kevin Dearing

    May 30, 2008 at 11:40 am

    Thanks for the explaination Darby,
    I think at one point I used to know that stuff.. But then I became a computer programmer and don’t really have to use math anymore! lol. jk. But seriously, I’ll try the ‘Alpha Add’ blend mode – it makes sense anyway..

    I appreciate your time!

    –KTFA

  • Filip Vandueren

    June 5, 2008 at 11:12 pm

    yeah, what Darby said 😉

    Also the often-overlooked ‘Channel->Blend” filter is very handy when you want to crossfade two layers. It’s the only way (without precomposing) to achieve the ‘alpha add’ effect for layers that are not set to ‘normal’ transfer mode.

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