Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions truly randomize randomized randomness [duplicated comp with random expressions is an exact duplicate]

  • truly randomize randomized randomness [duplicated comp with random expressions is an exact duplicate]

    Posted by Patrick Grossien on August 10, 2015 at 11:19 am

    Hi everybody, Hi Dan 🙂

    I used some of Dan’s expressions from his site to randomise a blob that appears and disappears by scaling it 0-100-0 over 12 frames. I randomized a circle’s rotation, position, contents scale and the turbulent displacement effects offset and amount. I like the result of the single blob so far.

    For example this for the evolution:

    tMin = thisComp.layer("settings").effect("tMin")("Slider")*5; //minimum segment duration
    tMax = thisComp.layer("settings").effect("tMax")("Slider")*5; //maximum segment duration
    minVal = 0;
    maxVal = 720;
    end = 0;
    j = 0;
    while ( time >= end){
    j ++;
    seedRandom(j,true);
    start = end;
    end += random(tMin,tMax);
    }
    endVal = random(minVal,maxVal);
    seedRandom(j - 1,true);
    dummy = random(); //this is a throw-away value
    startVal = random(minVal,maxVal);
    ease(time,start,end,startVal,endVal)

    Now if I use that composition in another composition to create 4 duplicates of it, the blob’s duplicates are exactly the same as the original. I already used time remapping to make it start at a different place in time by using (also from Dan from another thread in here)

    seedRandom(index,true);
    myDelay = random(1,10);
    time - myDelay;

    on the 4 layers, but they also offset by the same amount.

    I believe it happens because of the seedRandom true element. But I need that to make this work, to control the speed of it all, don’t I? So how do I truly randomise randomness? Yikes!

    Patrick Grossien replied 10 years, 8 months ago 3 Members · 3 Replies
  • 3 Replies
  • Xavier Gomez

    August 10, 2015 at 4:06 pm

    For your first question, a comp is a footage, and it will look the same everytime you use it, there is no way out.

    So, to get different blobs, you need to duplicate the comp as a composition in the project panel, not as a layer in the composition (4 different blobs ===> 4 different comps).

    Xavier.

  • Dan Ebberts

    August 10, 2015 at 4:07 pm

    If you want the randomization of the precomps to be different, you need to create duplicate precomps in the Project panel, not just duplicate the precomp layer in your main comp.

    Dan

  • Patrick Grossien

    August 10, 2015 at 6:09 pm

    Oh man, life can be so easy… damn! 🙂

    Thank you both!

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