Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions How to Control Gradient Ramp Effect Through the Expressions..? (Check Box Control..?)

  • How to Control Gradient Ramp Effect Through the Expressions..? (Check Box Control..?)

    Posted by Suniel Surya on June 15, 2015 at 11:19 am

    Okay… I’m Working in Local Tv Channel as a Video Editor… I’m Creating a Template for my Work.. It’s Very Simple Template..

    i Created a Solid and Applied 2 Gradient Ramp Effects (BG1 , BG2) ( Both are Different Colors)…

    and i Created adjustment layer and added 2 check box controls (Set name as BG1 , BG2)

    So here i Want if i select checkbox 1 (BG 1) First Ramp Effect (BG1)Will On.. If i on Check box 2 Then Second Ramp Effect will On

    Please See Below Images for More Details :-

    001.png
    002.png


    Kevin Camp replied 11 years, 2 months ago 3 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    June 15, 2015 at 5:02 pm

    You could try linking each Ramp effect’s Blend With Original parameter to its Checkbox, with an expression like this:

    if(thisComp.layer(“Controls”).effect(“Bg 01”)(“Checkbox”).value) 0 else 100

    Dan

  • Kevin Camp

    June 15, 2015 at 5:25 pm

    you can do this, but you don’t really want to get into conditional checkbox controls… it rarely ends up well.

    you might consider setting the different ramp effects on different layers, then using a layer control to select the layer. if your comp structure will remain this simple (with a control layer and only BG layers) this might be the best way to go.

    once you’ve added the layer control to the control layer, you’d use an expression like this to control the bg layers’ opacity:

    target = thisComp.layer(“Control”);
    bg = target.effect(“Layer Control”)(“Layer”).name;

    if (bg == name) 100 else 0

    if you only had the 2 bg options, you could use a checkbox, but i’d only use one… label it “BG Red” and have that control the opacity of the red bg layer.

    or if you only wanted a single bg layer, but control the color, don’t add another ramp effect, just add keyframes to the ramp colors and control which keyframes to use if the red checkbox is selected.

    ex: set the first keyframe of each ramp color chip to be the red options, then set the second keyframe to be the blue options. then the expressions for each color chip would be something like this:

    target = thisComp.layer(“sparkles Comp 2”);
    bg = thisComp.layer(“sparkles Comp 2”).effect(“Red BG”)(“Checkbox”);

    if (bg == true) key(1).value else key(2).value

    Kevin Camp
    Art Director
    KCPQ, KZJO & KRCW

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