Dataclay — Automating Digital Production
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Register
    • Login

    Duration of a comp linked to a spreadsheet

    Scheduled Pinned Locked Moved
    Templates
    2
    7
    779
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rdbsundefined
      rdbs
      last edited by

      Re: Duration of image layer

      Hi,

      I’ve wondering if Templater could help do the following :

      I have a template to create dozens of videos but each composition 's length depends on the length of the voiceover. I’m then adapting the keyframes of my animation depending on the time needed for the voiceover. The voiceover is currently not integrated in the AE project, I add it afterwards when doing my final composition on Premiere Pro.


      For example
      For the video 1, the intro lasts 10 seconds but for the video 2 the intro lasts 15 seconds


      Would it be possible to connect the length of the composition based on a timecode which would be on a Google Sheet ?
      It would work like this :

      • I enter the timecode for the “out” in the Google Sheet to indicate how long should this particular composition lasts
      • Templater is in charged of adapting both the duration of the composition but also extending / reducing the keyframes.

      For example
      In my composition, I have several shape layers which all have a opacity keyframes like this :

      • 00:00:00 Opacity 0% -> 00:00:02 Opacity 100% (that’s my in effect)
      • 00:01:20 Opacity 100% -> 00:01:23 Opacity 0% (that’s my out effect)
        My goal would be to have Templater modify the out effect like this :
      • I set in my Google sheet the timecode to be 00:01:09 (corresponding to Opacity 100%) and 00:01:12 (corresponding to Opacity 0%)
      • Templater uses the information on the Google Sheet to both modify the keyframes and then trim the comp to match the final keyframe.

      What would you think about it ?

      Thanks,
      Romain

      1 Reply Last reply Reply Quote 0
      • Jeffundefined
        Jeff
        last edited by

        @rdbs

        I believe it should be possible to do the sorts of actions you’re describing using Templater, but not quite in the way you’ve laid out here. First, it should be noted that Templater can’t manipulate keyframes. At the moment, that’s just a limitation of the software, so you won’t be able to set values for specific keyframes in your data source.

        That being said, Templater works VERY well with After Effects Expressions since they’re so data-driven. So normally, when faced with a scenario like the one you’ve laid out, we’ll seek out an Expressions-based solution rather than one using keyframes.

        For the first question about comp length, there are a few ways you could approach this. The first would be to use a function of Templater called Event Scripts. This is an extremely powerful feature of Templater Bot that allows you to run custom scripts to customize Templater’s functionality. We even have a script here on our Github Page that should be an excellent starting point for what you’re describing.

        Alternatively, I’d also recommend looking into the Time Sculpting features of Templater. There’s an option in Time Sculpting that allows you to automatically adjust a composition’s end point to the properties of a specific layer. So if, for example, your comp were always going to end at the end of your voiceover clip, you could check the “Comp Ends at Out-Point” box on that layer, and Templater would trim the target comp to exactly match the timing without you having to enter a manual time value.

        Finally, when it comes to opacity question like I mentioned before, we can’t move the keyframes, but we can achieve something similar using an After Effects Expression. This expression would probably make for an excellent starting point. It automatically fades a layer’s opacity in and out without any keyframes. You could even modify it if you just wanted to use it to fade a layer out so that it reads:

        fade = 1; // fade duration in seconds
        fadeOut = (outPoint - time) / fade;
        if (time > outPoint - fade) {
            ease(fadeOut, 0, 1) * value;
        } else {
            value;
        }
        

        Using an expression like this will allow you to have a layer fade out regardless of the clip’s length or where it’s located in the timeline. There’s even a technique for passing Templater data to Expressions, so you could use Templater to customize the duration of the fade in and fade out. More info on that can be found here

        Hopefully, this gives you a good starting point, but please feel free to let us know if you have any other questions.

        rdbsundefined 1 Reply Last reply Reply Quote 0
        • rdbsundefined
          rdbs @Jeff
          last edited by

          @Jeff Thanks a lot for your very detailed answer. I’m going to have a look at all your ressources and see how I can integrate them in my comp.

          Regarding the Event Scripts, you’ve mentioned that they work well with Templater Bot. Does it also work with the standard Templater (that’s the only license I have) ?

          Thanks !

          rdbsundefined 1 Reply Last reply Reply Quote 0
          • rdbsundefined
            rdbs @rdbs
            last edited by

            @rdbs said in Duration of a comp linked to a spreadsheet:

            @Jeff Thanks a lot for your very detailed answer. I’m going to have a look at all your ressources and see how I can integrate them in my comp.

            Regarding the Event Scripts, you’ve mentioned that they work well with Templater Bot. Does it also work with the standard Templater (that’s the only license I have) ?

            Thanks !

            I’ve just seen on the Event Scripts page that a feature for Templater Bot. Would you have a workaround for Templater ?

            1 Reply Last reply Reply Quote 0
            • Jeffundefined
              Jeff
              last edited by

              @rdbs

              If you’re working with Templater Pro or Templater Bot, I’d recommend taking a closer look at Templater’s Time Sculpting features. We’ve seen some very unique solutions to layout challenges that use Time Sculpting as a way to control the total comp size automatically. Unfortunately, the only way to directly alter a comp with a variable from the data source is using the Event Scripts functions of Templater Bot. This is due to the fact that Event Scripts can be set up to run before the document is fully loaded. If you have any more questions about Time Sculpting, please just let us know, and we’ll see what we can do. Thanks!

              rdbsundefined 1 Reply Last reply Reply Quote 0
              • rdbsundefined
                rdbs @Jeff
                last edited by

                @Jeff

                Thanks for the info. The thing is, I only have a license for Templater Rig. Not much ressources to upgrade to Templater Pro or Bot for the moment.

                1 Reply Last reply Reply Quote 0
                • Jeffundefined
                  Jeff
                  last edited by

                  @rdbs

                  I apologize; my last response was a bit garbled. Templater Rig should be able to use the same Time Sculpting features as Pro and Bot. Those options would probably be your best bet when it comes to customizing the comp duration. Let us know if you have any further questions. Thanks!

                  1 Reply Last reply Reply Quote 0
                  • Jeffundefined Jeff referenced this topic on
                  • First post
                    Last post