ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Light Beams (Start at Random X axis point, hold that until 8 seconds when meeting at center, repeat from different x axis point)

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Kyle Balitz
Light Beams (Start at Random X axis point, hold that until 8 seconds when meeting at center, repeat from different x axis point)
on Nov 2, 2018 at 7:36:25 am
Last Edited By Kyle Balitz on Nov 2, 2018 at 7:39:41 am

Hello I know nothing about Java script programming but trying to get into learning how to do expressions. What I want seems simple but hard to execute. I am trying to make light beams that shoot from a random X axis point meeting at the same center point, and hold that for 8 seconds (or any amount of seconds I give it), and shoot off from another random x axis point at the beginning as it repeats. The Y axis does not change. I am trying to make something like blurred motion high way of cars meeting at the same point in the distance.

These were kinda the ideas I was starting with. I apologize if I am completely wrong, other wise the most simpler method would be to just duplicate my layers and just change the starting x axis point at a specific point I tell it to be. I am using the saber effects. I been toying with Random() and seed. Wiggle moves too fast. I also tried a slider null. Sorry I am just very confused about this, if it makes any sense.

Note: If I leave everything as is with no expressions used, the effect just repeats as is within 8 seconds, shooting from the same point at the bottom as I put loop() in other parts of the saber effect. But I want it to shoot from different parts at the bottom of the screen, but hold that same line position until it disappears into the center point. Using wiggle and random just makes the line travel everywhere randomly too fast.




Thank you.

e = effect("Saber")("End Offset");
if (e == 0) {
[value[0] + random(300, 1200), value[1]];
}
else (e > 0) {
[value[0], value[1]];
}

e = effect("Saber")("End Offset");
r = random(284, 1000);
if (e == 0) {
[value[0] + r, value[1]];
loopInDuration(type = "cycle", duration = 8);
}

if time>1{
value[0]+random(200,1200), value[1];
}
else time&lt;8
value[0], value[1];
}


Return to posts index

Kalleheikki Kannisto
Re: Light Beams (Start at Random X axis point, hold that until 8 seconds when meeting at center, repeat from different x axis point)
on Nov 4, 2018 at 9:18:31 am

To get a new random value every 8 seconds, you can change the random seed every 8 seconds with Math.floor(time/8).

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]