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

How to make this animation using an expression with create nulls with paths.

Engaged ,
Jan 14, 2025 Jan 14, 2025

Copy link to clipboard

Copied

Hi community. 

 

Recently Rick Gerard provided me with an expression using create nulls with paths, to move with 1 pixel increments using Null paths.

 

StefanCargoski_0-1736913219393.png

 

 

rNull = thisComp.layer("Null Left");
strtPos = rNull.position;
endX = 126


,
spd = 1
; // number of pixels to move per frame
StrtTime = 0; // Start on Frame 40;
eTime = endX/spd;
t = timeToFrames();
mov = linear(t, StrtTime, StrtTime + eTime, 0, endX);
[strtPos[0] + mov, strtPos[1]];

 

This animation below is correct. And is using the right null

 

Ricks_Code_slider.gif

 

 

 

For the following animation below, I changed the expression into the left null (deleting the code from the right null), so the green line is going in reverse, which is correct, but when it starts to expand from the centre of the line towards the right side, the line is cut short, not an even animation. (Not enough frames im dont know....) . see Example below:

 

 

BipolarLineAnimeationSample.gif

 

Line animation-.gif

 

My thoughts to emulate the blue line animation would be, having 2 different expressions I can use with Ricks code in the position. .

 

One line going from left to middle 

Another line going from middle to right

 

And I can join them, unless its possible to have one expression emulating the blue line animation, which is called a bipolar line behavior. 

 

Thanks for your help.

 

 

 

 

 

 

 

 

TOPICS
How to

Views

41

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
no replies

Have something to add?

Join the conversation