3 Replies Latest reply on Jun 3, 2014 11:14 PM by Rick Gerard

    Expression / Linked slider for controlling multiple layers

    Illusiumd11 Level 1

      I'm trying to create a slideshow with many many layers. Image sizes vary across the board.

       

      I'd like to line them all up and set some Ken Burns keyframes on the scale before I use keyframe assistant to sequence them.

       

      Is there anyway I can control these keyframes with relative values? So that I scale multiple layers in the same manner although they have different concrete values?

        • 1. Re: Expression / Linked slider for controlling multiple layers
          Szalam Adobe Community Professional & MVP

          You could batch-resize them in Photoshop so that they are all somewhat similar.

           

          I know that's not what you asked about, but I'm not really sure what you're asking for. What do you mean by "scaling in the same manner, but with different 'concrete' values"?

          • 2. Re: Expression / Linked slider for controlling multiple layers
            Illusiumd11 Level 1

            Yeah, that's probably the best way - just wondering - I took a class on expressions a long time ago and seem to remember a way.

            • 3. Re: Re: Expression / Linked slider for controlling multiple layers
              Rick Gerard Adobe Community Professional & MVP

              You can set up an expression that automatically starts a scale and a move on an image, tie variables to Effects Control Sliders and save the whole set as an Animation preset. That way you can drop all your photos in a time line, Scale and position the layer in it's final resting place, then set an out point for each layer, then elect them all and apply an animation preset and sequence the layers. EZ as pie, once you write the expression.

               

              To setup an auto scale expression you simply divide the height of the composition by the height of the current layer and multiply by 100. Adding an expression Control Checkbox to layer and naming it AutoScale will give you the ability to turn auto scaling of the layer on or off. Here's the expression:

              h=height;

              ch = thisComp.height;

              s = ch/h * 100;

              if (effect("AutoScale")("Checkbox") == 1) {

                  ns = s}

              else

              ns = value[0];

               

              [ns, ns, 100]

              Use caution because this will scale a layer up to fill the comp height as well as scale a layer down. Also take note that if your layer is scaled down more than 50% you are probably not getting the best results in terms of image clarity or render times. Ideally any 2d footage layer in your composition should be some where close to 100% scale at some point in the composition. If the layer is 3D then the distance between the camera and the 3D layer should be approximately equal to the zoom value at some point in the composition with the layer at 100% scale.


              Just for fun, try this Effects Preset that I have in my collection. Make the layers 3D, position them at their ending position, set an out point, then apply the animation preset. The layer will fade in and move to the ending position then fade out. You have a point control to control the starting point and a switch to make the layer fit the comp vertically. You can control the fade in - fade out time in frames, set easing, setup rotation, and there is a setup switch to kill opacity changes so you can see the starting and ending setup for your layers.

               

              3DSlideshow.ffx

               

              It's a good idea to start building your own animation presets library so you can have access to complex expressions with a click or two. I have more than 200 in mine. I pointed an alias to a dropbox account so I can have access to all my presets anywhere I am in the world.