6 votes

After Effects distance between two points

Hate to spoil all your good work, but it's a lot easier to use the built-in length() function: length(pointa, pointb) e.g. length(thisComp.layer(1).position, thisComp.layer(2).position) or ...
stib's user avatar
  • 13.7k
5 votes

How to import 2D position data into After Effects

Found the answer here. Copying any positional keyframes out of After Effects generates a text file like this: Adobe After Effects 8.0 Keyframe Data Units Per Second 25 Source Width 100 ...
tomh's user avatar
  • 7,585
4 votes
Accepted

After Effects: Make beam effect go over end/beginning

You can't do it with the beam effect as it stands. But… A workaround would be to move your start and end points further out along the line that they define. A bit of maths and an expression will do ...
stib's user avatar
  • 13.7k
4 votes

random copied and being truly random

The random number generator in AE seems to be linked to the layer index, but generates the same results for every composition. To demonstrate here's a comp with a shape layer where the vertices of the ...
stib's user avatar
  • 13.7k
3 votes

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

Yes, since expressions are basically JavaScript, you can load and evaluate external source files. Unfortunately the location needs to be hard-coded, since (AFAIK) expressions do not have access to the ...
swizzlevixen's user avatar
3 votes

Physics and Chemistry Animations in After Effects

There are a number of physics engines and related scripts available in the Physics Simulation category at AEScripts. However, without a more specific question about what kind of animation you're ...
swizzlevixen's user avatar
3 votes
Accepted

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

Yes, checkLayers() is what is performs the collision test, and compares every layer in the Comp against the one running the script. To check against only one layer, you could re-write that function a ...
swizzlevixen's user avatar
3 votes
Accepted

After Effects: controlling slider in ExtendScript

I found out - .value after slider.effect("Slider Control").property("Slider") and it works. var a = slider.effect("Slider Control").property("Slider").value
49volro's user avatar
  • 151
3 votes

After Effects distance between two points

I figured it out. The syntax and/or order of operation could not handle squaring two numbers before adding them, so I added parenthesis to isolate each number and square them BEFORE adding them ...
Ben Mora's user avatar
  • 185
3 votes
Accepted

AE Counter Switch (Mins > Hs)

Make three text layers with a slider on each. Call the layers value 1, value 2, and value 3. In the source text of each of the text layers put this expression, to display the slider value and round ...
tomh's user avatar
  • 7,585
2 votes

After Effects: Increment a Variable over time

You can loop over the range of frames from the start of the comp to the present and calculate the value along the way. function myFuncf(theTime){ //whatever the function you're using to create the ...
stib's user avatar
  • 13.7k
2 votes
Accepted

How to automatically pull text out of a video

I do not know of any existing solutions for this in Premiere or AE. However, if you know a little about programming, you might be able to write a script using OpenCV that runs Tesseract OCR on video ...
swizzlevixen's user avatar
2 votes
Accepted

Create an animation of a slider-crank mechanism system

The setup is reasonably simple, built in functions, trigonometry and some Pythagoras will get you there. Have a look at the diagram below: The orange solid is the crank, with its anchor point shown ...
stib's user avatar
  • 13.7k
2 votes
Accepted

set scale in pixels in After Effects using Expressions

The size in pixels is easily computed as the source's original dimensions multiplied by the scale. Or in other words p = d × s where p=pixel dimensions required, d=source dimensions, s=scale. So ...
stib's user avatar
  • 13.7k
2 votes
Accepted

Control key frame value with slider control

You were close. if (numKeys > 1){ t1 = key(1).time; t2 = key(2).time; v1 = [95, 95]; //or if it's 3d [95, 95, 95] slider = comp("INPUT").layer("CONTROL").effect("Zoom intensity")("Slider");...
stib's user avatar
  • 13.7k
2 votes
Accepted

Link audio to opacity effect of an image in After Effects

The easiest way to do this is to use an expression. First you convert audio to keyframes. Then set an expression on your opacity channel. If you drag the pick-whip for the expression to the audio ...
stib's user avatar
  • 13.7k
2 votes
Accepted

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

You can't put the expression on a null object, but you can use a text layer. Following @bobtiki's eval() tip I tried using the source text of a text layer and running eval() on it. Initially I had no ...
stib's user avatar
  • 13.7k
2 votes
Accepted

Is it possible to modify a single precomp instance via scripting?

Scripting can do anything you can do with the UI. This isn't something you can do with the UI, so no, you can't do it with scripting. If you change the colour of precomp1.layer1.simpleRectangleLayer ...
stib's user avatar
  • 13.7k
2 votes
Accepted

Limit the scale of a pick whipped object

You need to do a linear map as an Expression. So the example below would take any value between 0-100 and map it between -100 to 100. input = effect("Slider Control")("Slider"); ...
tomh's user avatar
  • 7,585
2 votes
Accepted

After Effects Prevent Widows in Text

There is not much information about this. I have found a discussion where someone said there could be a bug with regex lookahead, maybe it's not even implemented (source). Instead, you could capture ...
Matt's user avatar
  • 1,401
2 votes
Accepted

Color textbox with consistent height

Make a text layer called “Text”. Align the text centrally using the Paragraph controls. Make a filled rectangular shape layer beneath it. Add two sliders to the shape layer called "horizontal ...
tomh's user avatar
  • 7,585
2 votes
Accepted

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

In order to align the lines to each corner, I was able to do this: Bottom left corner: No offset Set trim start to 50% Set trim end to 50% Set expression on trim end to be 100 minus the trim start or ...
Clif's user avatar
  • 196
1 vote
Accepted

using images as text characters in after effects

The Characteristic plugin for After Effects is built specifically for this: https://aescripts.com/characteristic/ You can set kerning and spacing parameters for each character. Check out this ...
Parker Young's user avatar
1 vote
Accepted

How to translate face tracking offset values into a 3D null position

You can access the position of a point in a mask with expressions (in AE CC 2017+) with expressions. To access the first point of a mask called "Mask 1" on layer called "my Layer" you'd use pts = ...
stib's user avatar
  • 13.7k
1 vote

Animating particles with collision avoidance?

I solved this using the built in Foam particle render - it does have basic collision avoidance
tomh's user avatar
  • 7,585
1 vote

After effects position expression issue

You're making it hard for yourself basing it on the time rather than the position. Here it is using the bounds of the comp rather than the time it takes to reach the bounds of the comp, which just ...
stib's user avatar
  • 13.7k
1 vote

After effects position expression issue

I don't think you need an expression to achieve this. You could just loop a cloud moving across the screen inside a precomp.
tomh's user avatar
  • 7,585
1 vote

Adobe After Effects: Keying layers based on other layers

There is a way of doing per-pixel logic such as what you want, by using Blending Modes. Basically the different transfer modes in AE can be though of as Boolean logic operations that go on at the ...
stib's user avatar
  • 13.7k
1 vote

Parent Pick Whip Not Showed On Effect Transform Keyframing

Expressions aren't parented. They use the same kind of widget but it's not the one in the parent column. You need to enable expressions on the property by alt-clicking the stopwatch. Now you'll see ...
stib's user avatar
  • 13.7k
1 vote
Accepted

What properties of After Effects project can be edited without opening the application itself

To my knowledge there is no tool available for editing After Effects project files other than After Effects itself. However you can script After Effect using Adobe's Extendscript language, so that it ...
stib's user avatar
  • 13.7k

Only top scored, non community-wiki answers of a minimum length are eligible