Copy link to clipboard
Copied
Hello experts!!
I'm trying to simulate an old movie. The only thing I can not get is that every X amount of time skips Y amount of frames. Where X and Y can act randomly
I have found on the web a code that simulates the stop motion, but it doesn't do the work ok!
skip = random(2,3); //number of frames to skip
fr = thisComp.frameDuration;
dur = skip * fr;
Math.floor(time / dur) * dur
Hopefully someone can help me!
Thanks!
Copy link to clipboard
Copied
That cannot work because you never carry any info about which frames you have skipped and how long the intervals actually were. You do not even control randomness, so it changes every frame, which makes this even more useless. I'm afraid it's not that simple and you would have to construct a loop around it. Instead I suggest you use a simpler approach:
seedRandom(Math.floor(timeToFrames(time)/5),true)
time+framesToTime(random(2,3))
This will give a glitch every 5 frames. Change the values as you need them.
Mylenium