Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions expression for light intensity

  • expression for light intensity

    Posted by Michael Johnson on May 3, 2005 at 2:29 pm

    so i hve ten layers in 3d space. they are stacked upon each other and then pinwheel/gatefold open, then rotate, so that i end up with a circular “wall” of these pics. i then have a light mapped to each of these pics. end result is exactly what i want. problem is at the beginning. all the pics start at the same position, so therefore i have ten lights all shining on the same spot. a bit bright. what i was thinking i could do was map the intensity of the light to the rotation value of its target layer. i tried that with just a pickwhip expression, but my rotation values start negative end at various values. how would the expression look to make the light intensity go from 0% to 100%, but the rate would be relative to the rotation?

    is this making sense?

    thanks,
    mike

    Skacey replied 18 years, 11 months ago 3 Members · 5 Replies
  • 5 Replies
  • Mylenium

    May 3, 2005 at 6:20 pm

    Assuming your rotationY is from 0-360 degrees and driving your lights, your expression could look like that:

    [linear(thisComp.layer(“image”).rotationY,0,360,0,100]

    The last two numbers are the intensity. Adjust everything as needed.

    Mylenium

    [Pour Myl

  • Michael Johnson

    May 3, 2005 at 6:45 pm

    excellent! i’ve been spending all day learning how expressions actually work (versus just using the pickwhip). man is there alot!!!!

    thanks

  • Michael Johnson

    May 3, 2005 at 7:16 pm

    hmmm… having a bit of trouble with it. i was getting errors with yours, expecting this or that. also, my rotation actually goes from -36 to 0.

    here’s what i have rigt now:
    thisComp.layer(“Null 2”.rotationY

    I don’t get error, but the intensity of my light goes from -36 to 0 percent.

    where am i going wrong?

  • Mylenium

    May 4, 2005 at 5:00 am

    Just forgot the closing bracket on my original expression. Here’s one that should work for you

    [linear(thisComp.layer(“Null 2”).rotationY,-36,0,0,100)]

    Mylenium

    [Pour Myl

  • Skacey

    May 4, 2005 at 5:01 am

    multiply your result by -3 and subtract it from 100 – so you have

    x = 100 – (y * -3)

    where x is your intensity and y is your rotation

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