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:
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".
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.
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.
---------------------------------
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
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!
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.
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.
Copy link to clipboard
Copied
Hey Dan,
You're a hero! Thank you, this is exactly what I was looking for.
Max