Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Is there an expression code for random positions of repeating starting and ending fireworks effect?

  • Is there an expression code for random positions of repeating starting and ending fireworks effect?

  • Kyle Balitz

    April 29, 2020 at 5:54 am

    I am trying to create an automated fire works show. The animation is 5 seconds flat. Is there a good random expression programming code for randomizing starting and ending positions of fire works shooting off from the bottom to the top of the screen.

    I have set three key frames. And would like the trail layer to start from a random y position and shoot off into a random x & y position in 5 seconds which I will loop. Do I have to separate dimensions? And does this require a slider? Is it possible? Perhaps an if statement?

    Note: I know I can do posterize time for the explosion, but the random shooting off part makes things a bit more difficult. The trail is supposed to connect to the firework position in some way.

    holdTime = 5; //time to hold each position (seconds)
    seed = Math.floor(time/holdTime);
    seedRandom(seed,true);
    random(0,1920)

    NULL LAYER

    ---

    temp = thisComp.layer("Null 2").effect("Slider Control")("Slider");
    [value[0], temp]

    FireWorks Layer connected to slider

  • Robert Müller

    April 29, 2020 at 11:01 am

    Hi, you seem to be using a plugin for the firework. Which one?

  • Kyle Balitz

    April 29, 2020 at 8:07 pm

    Hi Robert, Sorry for the lack of information, I am using Trap Code Particular.

Viewing 1 - 3 of 3 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy