Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Not possible to put an expression on Curves or Levels?

  • Darby Edelen

    January 14, 2008 at 6:00 pm

    If you need to apply an expression to Levels then you should use the Color Correction > Levels (Individual Controls) effect. This gives you a separate stop watch for each of the Levels properties. I don’t believe you can apply an expression to Curves.

    Darby Edelen
    Designer
    Left Coast Digital
    Santa Cruz, CA

  • Antony Buonomo

    January 15, 2008 at 10:53 am

    Many thanks, but I’m slightly surprised by this.

  • Darby Edelen

    January 15, 2008 at 4:48 pm

    [Antony Buonomo] “Many thanks, but I’m slightly surprised by this.”

    Really? Most properties are either a scalar or vector value (up to 4 components in the case of RGBA values) but if you think about it Curves or Levels would require multiple values returned separately (or in the case of Curves, maybe a very long matrix) to have something that could be used.

    Curves is usually a series of input/output pairs with curves interpolated automatically between them, but it can also be an arbitrary series of input/output pairs, do you really want to write an expression that will return a matrix of an arbitrary length with input/output pairs? Here’s an artist’s conception, but AE wouldn’t understand this:

    [[.05, .09], [.1, .1], [.5, .5], [.9, .9], [.95, 1.0]]

    And that’s a simple constant set of points, if you wanted to dynamically arrive at a set of points then you’d really be in for some fun.

    Levels, on the other hand, only has one keyframable property (I believe they call it ‘Histogram’) but many many properties (input/output white, input/output black, gamma) that affect it, in order to assign individual values to those you have to use Levels (Individual Controls) because AE has no way to know whether to apply the output of your expression to inputs, outputs or gamma otherwise.

    There are other examples of keyframeable properties that you can’t really control with expressions (Hue/Saturation I believe is another example).

    Darby Edelen
    Designer
    Left Coast Digital
    Santa Cruz, CA

  • Antony Buonomo

    January 15, 2008 at 5:11 pm

    I had a sneaking suspicion that I didn’t really understand the concepts behind my puzzlement. Thanks for confirming that!

    If I wanted to make a preset that automatically linked the values of the Levels (Individual Controls) applied to one layer to the same on another layer, how would I start? I’m thinking that the preset would somehow include a drop-down from which I could choose the layer I wanted to take values from. I know this may seem overkill for something seldom used, but there are 20+ possible values to be linked.

    Example: 2 layers, Cow and Pig. I apply Levels (IC) to Cow, then to Pig. In Pig I apply my preset and choose Cow as source. As I adjust Levels (IC) in Cow, Pig follows.

    Anyway, just an idea.

    Cheers
    A

  • Darby Edelen

    January 16, 2008 at 12:40 am

    This would be possible, you just need an expression on each of the Levels (Individual Controls) properties that reads something like this:

    l = effect("Layer Control")("Layer");
    l.effect("Levels (Individual Controls)")("Input Black");

    The above example would access the Input Black value of the layer selected in the “Layer Control” expression effect, so you would apply this to the Input Black of the layer you want to follow along. You’d have to make versions of this for the Input/Output Black, Input/Output White and Gamma for each of the 3 color channels as well as the RGB composite and Alpha to cover all of your bases…

    Darby Edelen
    Designer
    Left Coast Digital
    Santa Cruz, CA

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