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

Can wiggle be made less random using seed?

Explorer ,
Dec 26, 2024 Dec 26, 2024

Copy link to clipboard

Copied

Using a wiggle expression to a film jitter effect, eg wiggle(12,7)

 

Is there a way to make the wiggle effect use each keyframe as the "seed" of the subsequent keyframe, instead of using the center as the point of reference, and in that way making it less random? I'm looking for an effect that produces "drift" while jittering. Is this possible using a math expression, with a set minimum and maxium excursion of position?

TOPICS
Expressions , How to

Views

162

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
Community Expert ,
Dec 26, 2024 Dec 26, 2024

Copy link to clipboard

Copied

You can stack multiple wiggles, like this (in this example w1 is a fast jittery wiggle, where w2 is slower, providing drift):

w1 = wiggle(12,7) - value;
w2 = wiggle(.5,25) - value;
value + w1 + w2

Votes

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
Explorer ,
Dec 26, 2024 Dec 26, 2024

Copy link to clipboard

Copied

Great - thank you, that's a neat solution. So w2 is moving position based on where it is in w1, not just in parralel, right?

 

Can I use that same type of 'nested' expression of "wiggle" for other effects that wiggle, eg a flicker in level of exposure? 

Votes

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
Community Expert ,
Dec 26, 2024 Dec 26, 2024

Copy link to clipboard

Copied

Both w1 and w2 are based on the pre-expression value, but they're added together so the result is cumulative. Not sure if that answers your question though. wiggle() is somewhat unique in that its result includes the pre-expression value, so to get just the wiggle part, you have to subtract value from the result. This technique should work for any property, if that's what you're asking.

Votes

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
Explorer ,
Dec 27, 2024 Dec 27, 2024

Copy link to clipboard

Copied

I see what you're saying. It's a different approach to what I was expecting, but it looks like it pretty much does what I was seeking to do. Less linear than I was expecting, it's quite interesting how complex this is. Many thanks!

Votes

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
Community Expert ,
Dec 27, 2024 Dec 27, 2024

Copy link to clipboard

Copied

Once you have two wiggles isolated, you can combine them in interesting ways. For example, you could multiply the two wiggles together, like this, to get a completely different feel:

w1 = wiggle(12,7) - value;
w2 = wiggle(.5,25) - value;
value + [w1[0]*w2[0],w1[1]*w2[1]]

 

Votes

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
Explorer ,
Dec 27, 2024 Dec 27, 2024

Copy link to clipboard

Copied

Yes interesting. At risk of getting even more into the weeds, is it possible with a wiggle expression to radomize the frequency variable;  eg, instead of performing the w2 wiggle *every* instance 0.5 times per second, to instead perform that wiggle at a more randomized interval of let's say, once in a range of 0.1 to 24 per second?

In other words, w1 happens lets say 24 times per second

w2 happens at random intervals, within a range (no less often than 0.1 times per second, no more than 24 per/sec)

 

That would start looking a lot more organic. Hope that question is clear.. 

Votes

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
Community Expert ,
Dec 27, 2024 Dec 27, 2024

Copy link to clipboard

Copied

Manipulating the frequency is surprisingly tricky, but possible. This might be helpful:

https://www.motionscript.com/articles/speed-control.html#wiggle

Votes

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
Explorer ,
Dec 27, 2024 Dec 27, 2024

Copy link to clipboard

Copied

LATEST

Wow okay, that's a lot of code. Popping this code in there with a slider and a few keyframes surprisingly worked well. Not exactly what I intended, but very interesting and definitely more non-linear. Hard to control but getting much closer to an organic film jitter. Thank you.

 

freq = effect("Slider Control")("Slider");
amp = 1;
n = freq.numKeys;
if (n > 0 && freq.key(1).time < time){
  accum = freq.key(1).value*(freq.key(1).time - inPoint);
  for (i = 2; i <= n; i++){
    if (freq.key(i).time > time) break;
    k1 = freq.key(i-1);
    k2 = freq.key(i);
    accum += (k1.value + k2.value)*(k2.time - k1.time)/2;
  }
  accum += (freq.value + freq.key(i-1).value)*(time - freq.key(i-1).time)/2;
}else{
  accum = freq.value*(time - inPoint);
}
wiggle(1,amp,.5,.5,accum)

Votes

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