Simulate a "scrubbing" effect

Moderators: Disciple, zlovatt

Post Reply
malex
Posts: 20
Joined: May 21st, 2004, 3:03 pm

May 24th, 2004, 11:28 am

Problem : How to simulate a "scrubbing" effect, as if you were randomly dragging the time needle around a timeline

Solution : Posted by Dan Ebberts on AE List Aug 27 2003

tmin = .125; //minimum segment duration(can't be zero)
tmax = .25; //maximum segment duration = 0;
initialSeed = 11;

end = 0;
j = initialSeed;
while (time >= end){
j +=1;
seed_random(j,true);
start = end;
end += random(tmin,tmax);
}

targetTime = random(this_comp.duration);
seed_random(j-1,true);
dummy=random(); //this is a throw-away value
oldTime = random(this_comp.duration);
linear(time,start,end,oldTime,targetTime)



Fiddle with the first three parameters to change the effect. You might also
want to change the last line from linear() to ease().
JeffKopp
Posts: 1
Joined: August 30th, 2004, 8:57 am

August 30th, 2004, 9:57 am

Very Cool Expression... Thanks! 8)
MadCow
Posts: 1
Joined: February 15th, 2007, 1:01 pm

February 21st, 2007, 12:13 am

Not to sound like a complete moron but in which layer property box do I want to add this expression?
thanks in advance
User avatar
Disciple
Posts: 137
Joined: June 5th, 2004, 8:05 am
Location: Los Angeles, CA
Contact:

February 21st, 2007, 12:43 pm

Enable Time remapping and plug it in there!

Alex
explorer
Posts: 17
Joined: March 1st, 2007, 11:12 pm
Location: Poland, Warsaw

November 27th, 2007, 1:22 pm

you should check this out.
http://library.creativecow.net/articles ... huffle.php

seems to be just a thing
User avatar
Atomic
Posts: 157
Joined: April 30th, 2007, 5:55 am
Location: United States, Ohio

December 3rd, 2007, 9:14 am

Malex,

This code does not seem to really work.

No matter what values I put in, it does not change the speed or duration of footage. I applied it to a time map of a precomp.

I am looking for a way to randomly select a frame from a precomp, have it remain on screen for x number of frames, then choose another.

Explorer,

The multaanon code also suffers from the lack of the ability to control the speed of the effect.
Last edited by Atomic on December 3rd, 2007, 2:27 pm, edited 1 time in total.
Dan Ebberts
Posts: 319
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

December 3rd, 2007, 2:11 pm

Something like this might work:

Code: Select all

n = 10; // hold frames
f = timeToFrames(time); // current frame
period = Math.floor(f/ n);
seedRandom(period,true);
if (numKeys >1){
 random(inPoint,key(numKeys).time - thisComp.frameDuration)
}else{
 value
}
Dan
User avatar
Atomic
Posts: 157
Joined: April 30th, 2007, 5:55 am
Location: United States, Ohio

December 3rd, 2007, 2:44 pm

Dan,

Thanks for the reply.

I am using AE7.0.

Just to be clear, is this how I use the expression?

I enable time remapping on my precomp.
Then I paste the expression into the time remap value.

Using this technique, I still end up with blank frames being displayed by the expression. It seems like the expression is doing an on for hold frames, then off for hold frames before it picks a new frame.

What does the number of keys have to do with the expression? By default, when I enable time remap, I get two key frames. I stretch out my precomp length to generate my coverage, then move the last keyframe to the end of the precomp.

Ideally, it would be nice to be able to have the frame fade in and fade out at the end of the hold time. This would be like telling a movie clip to play in flash. I am wondering if this is possible via expressions, or would I be better off doing this in JSX. Presently I am generating my precomp with a JSX.

I guess my JSX would need to look at the list of items in the project window, then pick one and assign it to a layer. Then fade it in an out and save the out time to be the in time for the next picked layer. Continue until coverage time is met.
Dan Ebberts
Posts: 319
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

December 3rd, 2007, 2:52 pm

Try not moving the second keyframe. :-)

Not sure exactly what you're after with the fade in/fade out, but it should be possible with an opacity expression set to the same period.

dan
Post Reply