• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How Do I Execute A Set of Commands For A Template I Made

Explorer ,
Mar 03, 2023 Mar 03, 2023

Copy link to clipboard

Copied

Hello,

 

Thanks for reading! Sorry if the title is a little confusing, wasn't sure how to describe the current situation. This is a bit of a long post, but I wanted to make sure everything was clear.

 

For the project I'm working on, I need to render 59 different sets of "quotes" in multiple different languages, so it would be an immense time saver to have the operations more automated. I'm not sure if an expression or script is necessary nor how to make one to fit my needs. I tried using chat GPT's OpenAI but couldn't get it to make a script that worked. 

 

I'm a novice with After Effects, but managed to make a template that uses a projection map to create 3D looking text. It then uses Trapcode Particular to create a transition where the text disapears as if it's being thanos snapped.

 

My question is related to the following three compositions:

 

  1. Text With Transition and Sound.

The primary composition of my project is made up an audio layer that I need the other layers in this composition to sync to. The keyframes of the composition titled "Mask Movement" has keyframes for a mask path that covers the text at the same time the "Target Layer" has a mask that reveals the particles.

 

For this to look decent, the keyframes for the mask titled "Particular Path" have to be 15 frames forward from the end point of the audio layer. Additionally, the opacity key frames of the Target Layer have to start  when the keyframes of "Particular Path" end. The opacity keyframes take 3 seconds to complete.

 

Next,  the keyframes for the mask titled "Mask 1" in Mask Movement have to be 4 frames infront of the key frames for "Particular Path" (in other words the first frame of Mask 1 is 4 frames forward from the first keyframe of Particular Path). I currently have an expression attached to this mask that I believe is working for this

"target = thisComp.layer("Target Layer");
targetMask = target.mask("Particular Path").maskPath;
targetMask"

 

Lastly, there's a Wind Sound audio layer that must start at the beginning of the keyframes for "Mask 1".

Max8132_0-1677866668025.png

2. Text with Mask for Particular

This composition has only 1 layer that controls a mask that covers up the emitter for Trapcode Particular to make it so the particles slowly dissapear. To look decent, the keyframes for this emitter have to begin 18 frames before the keyframes for "Particular Path" begin.

Max8132_1-1677866701479.png

3.Text Comp For Cam / Woosh Sound

This composition has 3 layers, but the only one of note is "Camera 1" which slowly makes the camera move away from the text. The last keyframe for position of this layer has to occur at the same time as the last keyframe for opacity.

Max8132_2-1677866741235.png

---------------------------------

Question:

With all that in mind, how can I automate the requirements I described? Whether by scripting or expressions, I'm not sure where to go from here. 

 

To summarise

  1. Use the end point of the first audio layer in "Text With Transition and Sound" as a reference point for all changes.
  2. Move the keyframes for "Particular Path" 15 frames forward from the endpoint of the audio layer
  3. Move the keyframes for the opacity of "Target Layer" so that the start of the keyframes for opacity are at the end of the keyframes for "Particular Path".
  4. Move the last keyframe for the Camera 1 layer in "Text Comp For Cam / Woosh Sound" so that it occurs at the same time as the last keyframe for the opacity on "Target Layer".
  5. Move the keyframes for the one layer in "Text with Mask for Particular" 18 frames behind the first keyframe of "Particular Path"

 

One note! The only reason I want to move the keyframes and not the layers themselves is because the compositions "Text with Mask for Particular" and "Text Comp For Cam / Woosh Sound" are within the composition of "Target Layer", so adjusting the layer position changes other attributes that I'd like to stay the same.

 

Thank you for reading and any help you can provide!

TOPICS
Expressions , How to , Scripting

Views

304

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 03, 2023 Mar 03, 2023

Here's an example to get you started. This would be for your bullet point #2 (I'm assuming when you say "15 frames forward" you mean 15 frames before):

 

 

t = thisComp.layer("Audio 1").outPoint - 15*thisComp.frameDuration;
valueAtTime(time - (t - key(1).time))

 

In general, you would apply something like this to any keyframed property you need to time shift.

 

Votes

Translate

Translate
Community Expert ,
Mar 03, 2023 Mar 03, 2023

Copy link to clipboard

Copied

Here's an example to get you started. This would be for your bullet point #2 (I'm assuming when you say "15 frames forward" you mean 15 frames before):

 

 

t = thisComp.layer("Audio 1").outPoint - 15*thisComp.frameDuration;
valueAtTime(time - (t - key(1).time))

 

In general, you would apply something like this to any keyframed property you need to time shift.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 03, 2023 Mar 03, 2023

Copy link to clipboard

Copied

LATEST

Hey Dan,

 

You're a hero! Thank you, this is exactly what I was looking for.

 

Max

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines