Skip to main content

Questions tagged [after-effects-expressions]

A script used to set a property value for a layer in an After Effects composition.

Filter by
Sorted by
Tagged with
6 votes
3 answers
22k views

How to loop an animated mask?

I'm trying to make a loop from an animated mask, but each time I introduce my loop expression: loopOut (type="cycle", numKeyframes = 0), After Effects is telling me that: "Expression is deactivated,...
Patricia Atxurra's user avatar
5 votes
3 answers
9k views

Any way to change properties of subcomp based on parent comp?

I have a dozen 'main' comps which have a bunch of nested comps. I need to create about 30 versions of each main comp, with different colors. The subcomps are animated shapes, which take their color ...
d0g's user avatar
  • 304
5 votes
2 answers
6k views

After Effects: Increment a Variable over time

I have following problem: I am trying to tweak the speed of a Math.sin function. Therefore I need a variable that incerements over time with a combination of a keyframed speed variable. Sounds ...
Marten Zander's user avatar
5 votes
1 answer
102 views

Evolving lines with mirror effect

I would like to create evolving lines similar to those in this sequence (starting at 0:28): I know how to reveal lines, but I struggle to make the line moving so ...
Harold Cavendish's user avatar
4 votes
1 answer
8k views

After Effects: Parent a Camera's position to a Null-Object with specific Off-Set

I am just struggling with a simple expression thing I guess. I have a camera looking at an Object in 3D Space. Actually The Object is at [0,0,0]. The Camera's position is at [29,-1637,-2248]. What I ...
Marten Zander's user avatar
4 votes
2 answers
3k views

Scaling "Stroke" Effect "Brush Size" while scaling composition?

I've got a 100x100px composition with a Mask containing a Stroke effect used to animate the drawing of a vector. The problem I'm having is when I drop this composition into a larger one and attempt to ...
Chris Langford's user avatar
4 votes
2 answers
15k views

After Effects: Create an isometric/orthographic Camera

I know that its not possible to create an non-perspective camera in after effects. But I read about a way to fake the effect of an isometric camera in after effects. I just didn't find something ...
Marten Zander's user avatar
3 votes
2 answers
10k views

After Effects distance between two points

I have written an expression to get the distance between two points, but it does not work and I haven't a clue why. It's pretty simple: function findDistance(xa, xb, ya, yb) { return Math.sqrt( (...
Ben Mora's user avatar
  • 185
3 votes
2 answers
3k views

After Effects expression - define two positions, tween back and forth

So I want to do something simple: define two sets of coordinates (a "from" and a "to" position), along with a duration in frames. I want the animation to be executed, then reversed, and looped. I ...
Benjamin Allison's user avatar
3 votes
2 answers
4k views

Can you measure the width of a character in an AE expression?

I have a type effect that requires a couple of layers, one with the type, and another moving behind the letters as they appear (simulating the little text bubbles you get when typing on an iPhone). It'...
stib's user avatar
  • 13.7k
3 votes
1 answer
9k views

How to Sync a Layer's Position, to a Layer in Another (Time Remapped) Comp

So we are making a 2D animation. We have character assets in PSD. We have a "Character" Comp which contains the following: "Eyes" Comp, "Mouth" Comp and "Body" Comp. "Body" has the 2-second walk-...
Gokce Ozan's user avatar
3 votes
1 answer
117 views

Scripting - Where is the documentation for the Layer#Effects attribute?

I have been trying to make a script that will automatically apply an effect to the selected layer. So far, it looks like this: var myLayer = app.project.activeItem.selectedLayers[0]; I have seen ...
hololeap's user avatar
  • 161
3 votes
1 answer
432 views

After Effects Trim paths offset corner position based on rectangle width and height

I think it would be easier to share an image to show what I'm trying to accomplish. This will be a mogrt so the actual rectangle size / aspect ratio is determined by variable text size. But, I think ...
D34DC3N73R's user avatar
3 votes
1 answer
69 views

After Effects Prevent Widows in Text

So I'm pulling in text from a csv and I am trying to find a way to prevent widows (where there is a single word on a line). in JS we'd do this text = text.replace(/\s(?=[^\s]*$)/g, ' '); But ...
Picard102's user avatar
  • 145
3 votes
1 answer
55 views

Make a solid push another solid

Here's the situation: I'm not new to After Effects. I've been using it for a while and I could say I'm an intermediate user. My knowledge is limited to everything but expressions. So, I have a white ...
spund3's user avatar
  • 156
3 votes
1 answer
3k views

Parenting a null causes unexpected results

I've built an arrow that is controlled by two nulls - one at the start point and one at the end point. Using some trigonometry in some expressions, it works. When I move the nulls, the arrow resizes ...
tomh's user avatar
  • 7,908
3 votes
2 answers
719 views

AE Expression: Define FontSize

I'm making a complicated watch UI with a lot of expressions linked to different values of the display. As you can see from the image below, 9hrs isn't bonded to an expression yet, but it's graphically ...
Apeiron_Sound's user avatar
2 votes
1 answer
716 views

How to import 2D position data into After Effects

If I have a .csv file of x / y coordinates, representing positional data of an object in an animation, what's the easiest way to apply that to a 2D null in After Effects? Eg: Frame,Xpos,Ypos 1,33,...
tomh's user avatar
  • 7,908
2 votes
2 answers
2k views

Can an expression parse a text file or the expression of another property in After Effects?

I am going to have tons of layers use the same expression, but I need to be able to edit the expression later without having to edit it for every layer. I also can't simply have each layer's property ...
Ben Mora's user avatar
  • 185
2 votes
1 answer
247 views

random copied and being truly random

I have a comp... one null with an expression slider and the rest are image layers. the null with this expression, controls a random animation of the images beneath the null: Math.abs(Math.round(...
fleabilly's user avatar
2 votes
1 answer
41 views

AE Counter Switch (Mins > Hs)

I'm trying to create an expression that changes source text from minutes to hours. Here is an example of the graphic I'm animating: As you can see the 3 hours counter is on hold, I want that to start ...
Apeiron_Sound's user avatar
2 votes
1 answer
291 views

Physics and Chemistry Animations in After Effects

Are there any plugins/physics simulation engines other than Newton that will be useful for creating Physics and Chemistry content in After Effects?? For example, if I have a requirement to create the ...
Prudhvi Penmethsa's user avatar
2 votes
1 answer
62 views

changing this code to check for a collision from a specific layer

I got this code from motionscript and I would like to change it to check a specific layer instead of all the layers for a collision. Maybe within the function checklayers() and then there's the if ...
Caitlin's user avatar
  • 45
2 votes
1 answer
3k views

After Effects: controlling slider in ExtendScript

I'm newbie in After Effects. I've learned how to control slider from expressions. Now I need to get value of slider in script (jsx/extendscript). How can I achieve that? I've tried (in *.jsx): var a =...
49volro's user avatar
  • 151
2 votes
1 answer
9k views

Parent a Position X from Particular World to it's own transform xPosition

I have a layer called Blue. I applied CC Particular World to a ShapeLayer with an animated separated X Position (with 3 keyframes). The thing is that the effect doesn't move along with the shape. So ...
Horacsio's user avatar
2 votes
1 answer
251 views

After Effects: Images on whole pixel still blurry edges

I am jsut working on a new After Effects Project. I have a bunch of images I am working with and I just wondered, why the edges of images are so blurry. First I thought it might have something to do ...
Marten Zander's user avatar
2 votes
1 answer
136 views

Color textbox with consistent height

After-Effects newbie here. I have many many text lines all using exactly the same font. How can I best add background color textboxes with a consistent height? The color background must not change ...
Polly's user avatar
  • 123
2 votes
1 answer
6k views

Control key frame value with slider control

I have an object in After Effects comp and I need its scale to change from keyframe A to keyframe B and I need keyframe A to have value of 95% and keyframe B value of whatever is set via slider ...
Delltar's user avatar
  • 348
2 votes
2 answers
380 views

After effects position expression issue

I'm trying to make clouds move out of frame and than appear again from the other side. var vel = 100; var pInit = position.valueAtTime(0)[0]; // initial position of a cloud var tInit = (thisComp....
vmsynkov's user avatar
2 votes
1 answer
831 views

AE: Hide object after random time

So, I've a bunch of objects inside a composition and my ideia is the following: I want to create an expression in one of them that will change the opacity of that object to 0 after a random time. ...
TCB13's user avatar
  • 123
2 votes
1 answer
728 views

AE: Character Offset to Randomize Specific Pairs of Letters

I'd like the bottom left text to do the same as the top right, but the randomized text should be limited to "ATCG" in pairs (e.g. "AATTCCGG), instead of numbers. Is there a way to do ...
Onion44's user avatar
  • 31
2 votes
1 answer
24 views

Scale texts as the the parent shape layer changes

can anyone take a look at the animation I've made and provide some insights? Here is what I've got so far. https://drive.google.com/file/d/1eIdcAp9cK_AaA8UWBx9OKWAXXZWq0F2r/view?usp=sharing The ...
Haimeng's user avatar
  • 21
2 votes
1 answer
361 views

Animate a Slider With Json File Import?

So let me explain, I have a json file with numbers and the duration of how long each number should be displayed which is 4 seconds. I want the slider to show the first number (which is 1,000) and then ...
xavier gonzales's user avatar
2 votes
1 answer
151 views

position expression

Im trying to do an expression to my object. I want to make him come out from the side to center. I searched a lot but I didnt find any expression. I can do it with keyframes but I need expression only....
Marija Gabrielė's user avatar
2 votes
1 answer
138 views

help to animate an lower thirds that's positioned by expressions

I'm new to using expressions in after effects and I've also hardly touched Java before. However using some online tutorials and common sense, I managed to create a lower thirds title graphic ...
AutoBaker's user avatar
  • 368
2 votes
2 answers
3k views

Parent Pick Whip Not Showed On Effect Transform Keyframing

I wanted to parent the effect transform expression to the tracking motion (null object) When I saw the tutorials.. it showed me to click and drag the pick whip, but on my after effects there are no ...
Ferdi Ramadhan's user avatar
2 votes
1 answer
1k views

How do I create this slide/bouncy effect in After Effects?

The news channel in my country is using a nice bouncy/slide effect. Now I'm trying to recreate that in After Effects. I tried many effects and expressions, Googled a lot and watched many tutorials. ...
user3625118's user avatar
2 votes
0 answers
54 views

How to count datapoints in a JSON file with expressions in After Effects?

I load a JSON file with expressions in after effects. I need to know the number of datapoints in that JSON file for further processing. How can i count (or index?) Them with expressions?
TomTe's user avatar
  • 121
2 votes
0 answers
110 views

AE linear() function is not working with variable

I have set up a pretty simple expression that animates the number of copies of a shape layers' repeater: copies = 14; anim_start= 12; anim_end = 32; ftime = timeToFrames(time,25); if(ftime<...
Barbara's user avatar
  • 23
2 votes
2 answers
783 views

Animating particles with collision avoidance?

I need to drive a large number of small 2D cars around on screen in a fairly random fashion... I have the Trapcode Suite. I'd really like them not to overlap each other. What's the easiest way to ...
tomh's user avatar
  • 7,908
2 votes
1 answer
284 views

Reveal entire layer in after effects with mask partial overlap

I'm looking for a way to reveal my entire layer when a portion of my mask covers the layer. I have a composition with multiple individual layers, that I want to reveal with a set matte. However lets ...
Caitlin's user avatar
  • 45
1 vote
1 answer
183 views

Limit the scale of a pick whipped object

I want to make a speaker graphic 'wobble' to different frequencies.. Here's what I've done so far I made a speaker graphic in a comp And I parented the scale to a null in the main comp And I isolated ...
user152435's user avatar
1 vote
1 answer
187 views

Create an animation of a slider-crank mechanism system

I'm trying to create an animation of a slider-crank mechanism system in After Effects, but I'm finding it difficult to create a move closer to a real simulation. Would anyone have an idea how I ...
LCarvalho's user avatar
  • 417
1 vote
1 answer
2k views

set scale in pixels in After Effects using Expressions

You can right click on a scale, hit Edit, and then enter scale in Pixels, inches , % of Comp, of source.... I would like to set the scale in pixels. How can set the units using expressions? I tried ...
sanjihan's user avatar
  • 151
1 vote
1 answer
2k views

Link audio to opacity effect of an image in After Effects

I have 3 audio files from a podcast. 1 file from Steve, one from john, and the other is from me. I have a composition with the three audio files and also 3 png images of our faces, one for each of ...
Rafat Mahmoud's user avatar
1 vote
1 answer
2k views

How to automatically pull text out of a video

I am currently experimenting with after effects and premiere to see what sort of strange things they might be capable of and was hoping someone had some insight on an Idea I had. In this situation I ...
Malco's user avatar
  • 113
1 vote
1 answer
36 views

Defining animation once, then repeating across a selection of shapes in a cascading manner?

I have a comp with 20 windows (for a building), that I want to animate in a cascading manner (i.e. windows 1 though 20) with half a second in between each window animates in. Is there a way for me to ...
Andy Cheeseman's user avatar
1 vote
1 answer
99 views

How would I wiggle only on the y-axis when using wiggle with the slider expression control?

How would I use the wiggle expression only on the y-axis? I'm using two sliders. The first for the frequency and the second for the amplitude. Here's my expression so far. This works but wiggles on ...
hanumanDev's user avatar
1 vote
1 answer
21 views

Expression to make image same height as shape

I have a shape that varies in height, and an image that varies in height. I would like the image height to be the same height as the shape at all times. I got as far as this, but none of my math seems ...
Picard102's user avatar
  • 145
1 vote
1 answer
57 views

Matte only over items of a specific color?

Example scenario: I have 4 boxes. Box 1 is blue, Boxes 2 & 3 are a specific color of red and Box 4 is green. I would like Box 1 (blue) to only be visible when overlapping a red box. If Box 1 ...
Jacob Crocker's user avatar