• Jon Jon

    Hello! A quick tip on how to fade audio with Templater via an expression. Since Templater can dynamically swap a wide variety of media sources of varying lengths, you can’t count on keyframes to be able to accommodate the variation of durations for consistent fade-outs of audio tracks. Here’s a sample of how to do that. Apply this expression to the Audio Levels.

    fadeTime = 30; //frames for fade
    audio.audioLevelsMin = -48; 
    audio.audioLevelsMax = audio.audioLevels[0];
    layerDuration = outPoint - inPoint;
    singleFrame = thisComp.frameDuration;
    animateOut = linear(time, (outPoint - framesToTime(fadeTime+1)), (outPoint-singleFrame), audio.audioLevelsMax, audio.audioLevelsMin);
    [animateOut,animateOut];
    

    In this example, the expression takes the audio level you’ve set and fades to -48 db over 30 frames (assuming 30fps composition, that is 1 second).

    posted in Templates read more
  • Jon Jon

    [Updated to incorporate the comp switching feature of Templater 2.9, instead of using imported video footage – if you are using an earlier version of Templater, use a 2-frame double-framerate transparent video clip instead of a comp, included in v1 of the zip]

    Let’s say that you have an After Effects template that you want to dynamically expand and contract the timeline duration based not just on the duration of the video clips, but also having the number of video clips in the timeline change from video to video.

    Note: this technique will create a 1-frame overlap between your clips

    In this example, we’re going to set up a Main timeline, and we will set things up to have a maximum of 3 precomped video “slides” that we will be injecting video clips into. For this example, we are going to assume that you want to play each clip for its entire duration, but the same principles can be applied to clips with various shift, trim, and stretch Time Sculpting parameters.

    First, import a piece of video footage-- this is just a temporary placeholder (don’t use an AE placeholder layer, though). Create 3 (or how ever many you need) precomps, each with the placeholder footage added to the timeline, and apply the Templater Settings effect to each of the layers. Be sure to rename them to match your column names in your data source (in my example I named them “first,” second," and “third”). For each footage layer you’ll want to set your “Time” parameters to “Comp starts at in point” and “Comp ends at out point” and your “Trim” parameters to “Preserve start” and “Preserve end” so that the entirety of the clip plays and that the duration of the precomp is the exactly the same as the duration of the clip it contains.

    0_1501554149504_clip-settings.png

    For each precomped “slide” in the main timeline, you will also apply the Templater Settings effect, and each will have the various Time Sculpting controls set as follows (note the “shift” parameter with the 1 frame shift overlap on every clip after the first one):

    0_1528000225180_slide-settings-update.png

    The last piece of the puzzle is to use a 2-frame long empty comp that is exactly double the framerate of the slide precomps that you will call in your datasource when you want to turn a specific slide off for a particular render. The comp needs to be 2 frames because a video clip that is 1 frame long will be recognized as a still by AE/Templater, and it won’t properly adjust your precomp durations. The comp itself can be extremely small, dimensionally (say, 4px x4px). In my example, “blank-slide” is the 2-frame transparent comp. To call the blank-slide comp, you will want to wrap the name of the comp in double braces within your data, like {{blank-slide}}.

    dynamic-clip-datasource-v2.png

    If you have any questions, feel free to ask here, or shoot us an email.

    Download dynamic slides example project - v1

    Download dynamic slides example project - v2

    [this thread has been updated to incorporate the framerate advice from Maris, a few posts below]

    posted in Templates read more
  • Jon Jon

    @keithvlk

    If you are using a Sheet, Templater requires that each “row” is equal to one “job.” You will need to do some sort of conversion or correction on the data to get it into a format that Templater can understand. Your best bet would be to create formulas in a separate worksheet that reference the data in your source Sheet. I’ve created a sample Sheet based on yours that shows one way this could work. Feel free to copy and play with it.

    The slight complication is that your 7 layouts can’t be directly queued for rendering simultaneously with Templater Pro/Bot, but you can swap in all of the data to all of the layouts for one “set” of data, then manually queue them, or you can copy a row seven times, then add a target column in your data, which allows you to choose which comp to render– in this second case you would be able to batch render.

    posted in Templates read more
  • Jon Jon

    @dwalters You can select individual comps within a project to re-version with the target property, or you can switch between projects with the aep property (and you can combine the two). Templater will parse through the entire project, not just the target comp, so you can set up really complex, modular systems that all update at once. You can use data from your data source to drive you controller/checkbox layouts.

    posted in Google Sheets read more
  • Jon Jon

    In some instances Windows’ Internet Security options might be preventing the download of cloud-based assets. Sometimes this happens if those assets have been collected via a web form (such as JotForm or Typeform). To fix this, open up your Internet Options (an easy way to do this is to hit the Win key then type “Internet Options”), go to the Security tab and click on the “Custom level” button. Find the option “Miscellaneous > Access data sources across domains” and enable it.

    0_1510260650222_wio-s1.jpg

    0_1510260672899_wio-s2.jpg

    Stackoverflow thread

    posted in Data Sources read more
  • Jon Jon

    Currently, there is a bug in Templater where layers (footage or compositions) that are being targeted within your data source to be switched off with an {{off}} flag won’t disable the layer’s audio switch. We have plans to correct this in a future version of Templater, but in the meantime, you can correct this behavior by applying an expression to the Audio Levels of the layer/layers you wish to mute.

    mute = -192;
    aud = audio.audioLevels;
    if(thisLayer.enabled == false) [mute,mute] else [aud[0],aud[1]];
    

    EDIT:
    As of After Effects 2019, changes to AE’s Javascript/expression engine have made it so that the if/else statements need to be strict, standardized JS syntax. To reflect that, you would just need to tweak the above expression. This expression is also backwards compatible.

    mute = -192;
    aud = audio.audioLevels;
    if(thisLayer.enabled == false) {[mute,mute];} else {aud;};
    

    That’s it!

    posted in Templates read more
  • Jon Jon

    @darrencase on your tweet we mentioned using comp swapping for your precomps. You can follow the “variable slideshow” instructions on this post, but instead of swapping video clips, you can swap your city precomps in and out.

    We do have a Templater Bot NodeJS stitching script on our GitHub repo, but I don’t know that that would be exactly what you are looking for, and would likely overcomplicate the workflow.

    posted in Batch Output read more
  • Jon Jon

    2.7.0 (Build 7281)

    • New End User License Agreement
      Before installing Templater 2.7, please be sure to read and agree to the new terms outlined in Templater’s End User License Agreement.

    • Enhanced and robust event architecture
      This much requested and much awaited feature is now available! You can now register both shell and ExtendScript scripts to a new set of Templater events. The new Templater events are as follows:

      1. Data retrieval events : Pre-data and Post-data
      1. Batch processing events : Pre-batch and Post-batch
      1. Job processing events : Pre-job and Post-job
      1. Layer update events : Pre-update and Post-update
      1. Output events : Pre-output and Post-output
      1. Bot events : On-startup and On-shutdown
    • Events are now also broadcast when Previewing in Pro and Bot editions.

    WARNING - READ BEFORE YOU UPDATE TEMPLATER!

    If you already make use of event scripts in your application please note that we have deprecated a preference that might prevent your application running. As of Templater 2.7 the preference For all commands, use job details as arguments is deprecated. If using the command line interface, the job_detail_args property found in the prefs object within the bot object is also deprecated. It is now required to explicitly append arguments to your registered shell scripts. Apologies for any inconvenience.

    • New ExtendScript API
      ExtendScript files that are registered to listen for a Templater event you now have access to read and manipulate Templater’s internal memory. Developers can accomplish this by using the $D object. Full documentation for this API is available at http://support.dataclay.com

    • New argument macros for registered event scripts
      A few new argument macros can be passed to event scripts:

      1. $log : The full path to the templater.log file
      1. $log_dir : The full path to the directory containing the templater.log file
      1. $event : A string identifier that references the most recently broadcast event
    • Improved naming of downloaded footage assets
      When the Allow unique downloads for cloud-based assets preference is enabled the downloaded asset will have a more precise identifier prepended to the downloaded file. The prepend string includes the job’s row index value, column or property name, and ID value if available.

    • Easily troubleshoot Templater operation
      Prevent Templater from suppressing any After Effects notice, warning, or error dialogs with a new Templater preference. Note that dialog suppression is on by default.

    • Silence Templater logging
      You can now shut off all Teplater logging from the Templater Preference dialog. This is not recommended, but useful if you want to improve speed for batch processes.

    • Improved memory management
      A new preference allows you to choose if Templater should automatically purge After Effect’s internal memory caches after each job in a batch process. Enable this if you find that After Effects is eating up too much memory on batch runs. Note that enabling this preference will add a bit of time to complete each job in a batch.

    • Open log file directly from Templater Panel
      A new button labeled “Show Log” appears within the Templater panel. When clicked, Templater will spawn a new terminal window displaying a real-time log of Templater’s operations.

    • Help Tips display in user interface
      When you hover over specific user interface elements in Templater’s main panel and its Preferences dialog, help tips appear to assist your learning.

    posted in Accouncements read more
  • Jon Jon

    If you are interested in setting up your dynamic layers to accommodate both portrait and landscape footage (photos or videos) within a composition, here’s how to do that:

    We will assume that you are creating a “square” precomp, and that you want the footage to fill the composition in either direction and to letterbox or pillarbox that footage appropriately.

    First, the most important thing is that rather than having the composition be a perfect square, you need to make sure that your width is at least 1px longer than the height. So rather than 800 px x 800 px, it would need to be at a minimum 801 px x 800 px. This is going to be true even if you aren’t going for a square precomp. The letterbox/pillarbox will not work if the comp is taller than it is wide.

    Add the Templater Settings effect to your desired footage layer. In the Templater Settings effect, in the “Layout” section, you have the option to set a “Scale factor”- you’ll want to set that to 100%. In the “Alignment” section there is an option “initialize to center”- make sure to enable that.

    That should be all you need to accommodate footage sources of different dimensions.

    posted in Templates read more
  • Jon Jon

    @spelgrift

    Make sure that at least one of the layer is set to “Initialize to center”. In the Attachment properties, set the top layer’s Attach on to “Top Edge”, Group Position to “Cap”, and Center on edges selected. For the bottom layer, make sure that you have Attach on “Bottom Edge”, Group Position “Base”, and Center on edges selected. If you have more than two layers, use Group Position “Middle” for layers that aren’t a “cap” or “base”.

    posted in Templates read more