Forum Replies Created

Page 115 of 1081
  • Dan Ebberts

    May 17, 2021 at 10:30 pm in reply to: Uniform Scale Wiggle

    You were close. This would work:

    i=wiggle(2,5);

    [i[0],i[0]]

  • Dan Ebberts

    May 14, 2021 at 3:35 am in reply to: Layer visibility expression no longer working

    I think I’d do it this way:

    thisComp.layer("name of the layer").active ? 0 : 100
  • Dan Ebberts

    May 14, 2021 at 3:28 am in reply to: Layer visibility expression no longer working

    It works for me as long as I replace your curly quotes with straight quotes.

  • n is the count of how many 2-second periods there have been. n%2 tells you whether n is odd or even. For the odd-numbered periods, you want t to go backwards (by subtracting time%dur from dur) otherwise, go forwards (just time%dur). time%dur gives you the remainder of of the time/dur operation, and is what generates the looping.

  • Try replacing everything after the function with this:

    dur = 2;

    n = Math.floor(time/dur);

    t = n%2 ? dur - time%dur : time%dur;

    startVal = 200;

    endVal = 800;

    customBezier(t,0,dur,startVal,endVal,[0.76, 0, 0.24, 1]);

  • Dan Ebberts

    May 9, 2021 at 1:51 pm in reply to: Turbulence in 3d space

    You should take a look at the noise() function. It gives you a Perlin noise field and will accept a 3-value array as its input parameter, so you could navigate the field using scaled x,y, and z position values and might also be able to incorporate time in some clever way.

  • Dan Ebberts

    May 8, 2021 at 12:19 am in reply to: sourcerectattime not working for a specific time

    Animating the position or scale shouldn’t affect sourceRectAtTime(). What will affect your result though, is the time parameter of toComp(). See if doing it this way helps:

    x = L.toComp([rect.left+rect.width,0],2)[0];

    and

    y = M.toComp([rv.left+rv.width,0],2)[0];

  • Dan Ebberts

    May 7, 2021 at 5:36 pm in reply to: Layer visibility expression no longer working

    It should work if you change the first {0} to {100}.

  • Dan Ebberts

    May 3, 2021 at 10:09 pm in reply to: Connecting movements inside of a mask to a slider

    The only thing I can think of would be to use sampleImage() (with postEffect=true) in a loop, starting at the top of the range and moving down (1 pixel at a time) until you find a pixel with non-zero alpha to determine the current height of that bar. Then use that value to drive the height of the mask.

  • BTW, the whole thing probably becomes much simpler if you can tap into whatever’s driving the mask expansion to also trigger the random positioning. For example, if the mask expansion is periodic, you could maybe use the same frequency value to trigger each new random position. That would be much more efficient and easier to code.

Page 115 of 1081

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