3 Replies Latest reply: Nov 3, 2013 10:15 PM by Cris is Bliss RSS

    expression request

    Cris is Bliss Community Member

      I've been askjing around to find out how a particular effect that I seen on numerous music video was created.  No one could give me definitive answer,  I even suggested maybe it was done by editing in Premiere, which others agreed is a strong possibility.  However to hold this effect for a long period of time or to try different layer stacking  would be very tedious in an editing program.

       

      The effect here  http://youtu.be/T6j4f8cHBIM   at 0:50       or        http://www.vevo.com/watch/nicki-minaj/stupid-hoe-explicit/USCMV1100087

       

      I was given a wiggle expression        wiggle(1,50) < 50 ? 0 : 100         that makes a layer's opacity either 0 or 100 if the wiggle value is above or below a defined number,  but the result of this is random. 

       

      I've never written my own expression and I've discovered even trying to verbalize the desired action and result takes very presice language, so here's my attempt.

       

      I would like to control a layer's ocacity by having it alternate, in sequential order, through a complete cycle of assigned values x times per second.

       

      ie.

      Layer A opacity values = 0, 25,50,100  played in sequecial order at x frequency

       

      I would like to use this expression to have layers that are stacked visable as follows:

      (The start time of each layer is the same and the frequency rate in the expression the same).

       

      Layer A opacity values = 100, 0, 0

      Layer B opacity values = 0, 100, 0

      Layer C opacity values = 0, 0, 100

       

      With the expression applied to each layer, the visual result in the Comp window would be seeing Layer A,B,C in that order x times per second.   By having the expression reference a sequence of numbers I can choose to have 3 or 20 layers be totally, partially or invisible in a predictable/rhythmic way.

       

      Thanks in Advance

        • 1. Re: expression request
          Christian Lett Community Member

          You can do this using a few keyframes and a very simple expression.

           

          On layer one, set an opacity keyframe at frame 0 to 100%. Make a hold keyframe, and then on the next frame set the opacity to zero, which should default to hold also. Finally on the third frame* set the opacity back to 100%. Alt-click on the stopwatch and add the expression loopOut(type='cycle');

          Copy your keyframes and the expression to your other layers, and offset all the keyframes by one frame each layer, so on the second layer the first keyframe is on frame one, the third layer frame two, etc.

           

          * Obviously this frame depends on how many layers you want to cycle through. Here we have three layers so the final keyframe setting the opacity back to 100 is on frame three (assuming your comp starts at frame zero). If you have 10 layers, this will be frame 10.

           

          Hope that helps.

           

          Christian

          • 2. Re: expression request
            Cris is Bliss Community Member

            Thank you, it works.   However it does not allow for the easy adding and subtracting of layers as I think it would with the expression i wanted.  But it does allow from other interesting combinations. 

             

            Thank You again.

            • 3. Re: expression request
              Cris is Bliss Community Member

              I've been playing with it for a couple of minutes and I LOVE IT.   

               

              THANK YOU, I think I like this better than the expression I wanted to write.