Jump to content
SkatePerception
goonface

How To Get Smooth Ramped Slow Mo's

Recommended Posts

Yesterday I set out to find out how to do the really smooth ramped slow mo's as featured in the new Habitat video. I found some plugins for After Effects that might have done the trick, but I didn't want to pay for anything.

So eventually I stumbled upon [url="http://nerds-central.blogspot.com/2007/04/synthetic-slow-motion-with-avisynth.html"]this page[/url], which is where I got nearly all of the information to make this tutorial as well as links to the 100% free, open source software needed to do this. Also, I don't know if anyone else has already posted anything on how to do this here, but oh well. This way is probably a different way anyways. This was done on a PC by the way, if you have a Mac, there is another free program that might do what the mvtools plugin does later in this tutorial, but I'm not sure. You can find it [url="http://www.xs4all.nl/%7Ejeschot/home.html#DEI"]here[/url]; its called JES Deinterlacer (Mac only).
[b]
[color="#ff0000"][u]METHOD 1: FREEWARE[/u][/color][/b]
[b][u]
What you need:[/u][/b]
Adobe After Effects (I assume you already have this if you're already making ramped slow mo's)
[url="http://virtualdub.sourceforge.net/"]VirtualDub[/url] (freeware)
[url="http://sourceforge.net/project/showfiles.php?group_id=57023&package_id=72557"]AviSynth 2.5[/url] (freeware)
[url="http://avisynth.org.ru/mvtools/mvtools.html"]MVTools plugin[/url] for AviSynth (link is at the bottom of the page, just unzip into AviSynth's "plugins" directory)

[b][u]What you don't need but should check out anyway:
[/u][/b]The [url="http://www.nerds-central.com/Binaries/huffyuv-2.1.1.zip"]Huffy codec[/url]
This is a free [b]lossless[/b] codec you should use to protect the quality of the clip through this or any other similar process. I used to just save my ramps and other clips that need to be rendered elsewhere as uncompressed avi files, but this codec keeps the [b]exact same quality[/b] of an uncompressed avi with around [b]half[/b] the file size. Plus, from my experience, it renders just as fast as an uncompressed avi, so there's no real reason not to use it. Just read the instructions on how to install this (it's a piece of cake) and do it before you start any of these programs up.

Ok, I hope you're still with me here. First what you're going to do is open AFX and start a new composition with these settings, which are pretty much default.
[img]http://www.davecarulli.com/SP/tut01.gif[/img]

Now you're going to import the clip you will be ramping, and place it in the timeline.
[color="#ff0000"]EDIT: IT IS IMPORTANT YOU DO NOT EDIT THE IN/OUT POINTS OF THE CLIP IF YOU WANT TO SAVE TIME LATER.[/color]
Go to the "Layer" menu, select "Time Stretch" and apply a stretch factor of 200. Keep in mind your "New Duration" is going to be different than mine so don't worry about it.
[img]http://www.davecarulli.com/SP/tut02.gif[/img]

Now make sure your work area is trimmed to the full length of your video on the timeline and select "Add to render queue" in the Composition menu. For your render settings, just make sure field render is off.
[img]http://www.davecarulli.com/SP/tut05.gif[/img]

For your output module you should be using the Huffy codec mentioned above. If you're stubborn and/or lazy and didn't install it, just save it as an uncompressed avi.
[img]http://www.davecarulli.com/SP/tut03.gif[/img]

Check out Huffy's configuration menu just to make sure it's the same as [url="http://www.davecarulli.com/SP/tut04.gif"]this[/url].

Ok now render your file and remember what you named it cause here comes the tricky part. Open notepad and created a new text file. You're going to want to put this code in, but change some stuff around to suit your situation. You must already have "mvtools.dll" in your AviSynth "plugins" directory.

[code]LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mvtools.dll")
source = AVISource("J:\3ccd Footy\Dan\dan lipslide planter.avi",false)
oSource=source
source=ConvertToYV12(source)
source=AssumeFPS(source,30)
backward_vec = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1)
# we use explicit idx for more fast processing
forward_vec = source.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1)
cropped = source.crop(4,4,-4,-4) # by half of block size 8
backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2)
forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2)
fSource=source.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=120,idx=1,idx2=2)
fSource=AssumeFPS(fSource,30)
return fSource[/code]

Now save this file as anything you want, but MAKE SURE you save it as a [b].avs[/b] file.

Now for the things you'll be changing.
[img]http://www.davecarulli.com/SP/tut06.gif[/img]
[color="#ff0000"]EDIT: A MORE IDEAL NUMBER TO SET THE LAST VARIABLE TO WOULD BE 90.[/color]

What this code is going to do (when you open the .avs file in VirtualDub) is take your already slo mo'ed file and slow it down even more, but at the same time add newly created frames between your original frames. It basically opens the file in AviSynth and then opens it inside of VirtualDub, so don't think you can skip out of getting AviSynth. These new frames are guessed by the plugin by analyzing the luma and chroma channels in the video. It isn't the most accurate thing in the world, but it does a good enough job.

After you've made all the changes you want and you've saved it as an avs file (make sure you save it again if you changed anything), open VirtualDub. Go to File...Open video file... and browse for the avs file you just created. Upon opening, you should see your clip.
[img]http://www.davecarulli.com/SP/tut07.gif[/img]

Unfortunately, I don't know how to script AviSynth to keep the audio with the clip, so if you want the cool sound of a ramped slo-mo, you're going to have to take another step.

[color="#ff0000"]EDIT: There's a much easier way to do this, disregard the old way (the crossed out text).
Make 2 new compositions in AFX. In comp 2, bring your clip into the timeline. [b]NOTE: If you set the last variable in the avs file to 90, timestretch this clip by a factor of 16.6667. If you set the variable to 120, timestretch the clip by a factor of 12.5.[/b]

Now take the ORIGINAL clip and place it in the same place on the timeline, right below the first clip you brought in. Make sure the clips are both the same length, that way you'll know if you timestretched by the right factor.

Now just mute the audio for the top clip. Go to comp 1, and drag comp 2 into the timeline. RAMP AWAY.
[/color]
[s]Open your editor (I use the old school but awesome Premiere 6) and place your new mega slow clip into the timeline. Now place the audio from the original clip in the timeline, and slow it down to 12.5% (in this case). Now match up the audio so it's in sync and export the file AGAIN, making sure to use that handy Huffy codec. I assume if you've made it this far you don't need any diagrams for this step.

Now you are FINALLY ready to do the ramp. Open the clip with audio in AFX. The only difference here is that you're going to time stretch the clip to a factor of 12.5 and THEN do the ramp.

I am almost positive there is a way to just script the initial slowdown and the audio sync and put it in the avs file, but I have no clue at the moment how. I might look into it in order to GREATLY shorten this process.[/s]

[url="http://www.davecarulli.com/SP/example.mov"]Example Clip[/url]

[color="#ff0000"][b]
[u]METHOD 2: TWIXTOR AFX PLUGIN

[/u][/b][color="#000000"]First, open After Effects and make 3 compositions with the normal settings.
Just make sure the composition length is AT LEAST double that of your clip length.
[img]http://www.davecarulli.com/SP/twixtor01.gif[/img]

Now goto COMP 3 and drag your clip into the very beginning of the timeline. IT IS CRUCIAL you don't move it around or set any in and out points.
Also, take the audio level all the way down on this clip because Twixtor doesn't do too well with audio (don't worry about sound right now).
[img]http://www.davecarulli.com/SP/twixtor02.gif[/img]

Now move over to COMP 2. Drag COMP 3 into COMP 2 to the BEGINNING of the timeline. Again, no changing in and out points or anything like that. Now right click COMP 3 (within COMP 2 now) and apply the Twixtor Pro effect with these exact settings.
[img]http://www.davecarulli.com/SP/twixtor03.gif[/img]
It is a good idea to save these settings. I saved mine as "50 percent."[/color][/color]

Now take your original clip and drag it into the BEGINNING of COMP 2's timeline (It's easy to do this if your playhead is at the beginning of the timeline. Just drag your clip to the left of it.)

Now take the original clip (which is below COMP 3 in COMP 2's timeline) and apply a time stretch to it by a factor of 200.

We're doing this in order to preserve the audio for the final ramp. We silenced the track being Twixtored, and the audio from this clip will be used for the ramp.

Now trim COMP 3 down within COMP 2's timeline. We don't want regular motion video being Twixtored because it would take way longer to render. So just trim it down to the part you're going to ramp.
[img]http://www.davecarulli.com/SP/twixtor05.gif[/img]
Notice I didn't move any of the clips at all, just trimmed. The clip on bottom is not only preserving the audio, but its also lined up with the Twixtored clip above it, that's why we can trim the top clip. Before moving on make sure they're synced up by running the playhead over them.

Now FINALLY move over to COMP 1. Drag COMP 2 into the beginning of COMP 1's timeline. Apply a time stretch to it by a factor of 50 (You're speeding it back up to regular motion now for the ramp, Twixtor just doubled the amount of frames the clip had).

Now RAMP AWAY. Just make sure before you add it to the render cue you bring the workspace down to size cause there will be lots of black within the actual COMP 2 in the timeline.
[url="http://www.davecarulli.com/SP/example2.mov"]Example Clip[/url]

Share this post


Link to post
Share on other sites
That looks really good, but defintly takes too long if your editing and want it done fast. I've always liked the way Ty Evan's slowmos have been, maybe this is what he does.

Share this post


Link to post
Share on other sites
no he doesnt do it this way. i wish i could show you the actual final avi. its so much smoother than the quicktime file.

Share this post


Link to post
Share on other sites
[quote name='escapistwhat' post='2099237' date='Dec 30 2007, 01:56 AM']is this what all of us with AE should be doing? are the output settings i've been using thus far not up to par anymore?[/quote]
Well if you output to dv avi files from After Effects you are losing quality, and nobody wants that. Its just more important in this case because you're exporting the clip so many times.

Share this post


Link to post
Share on other sites
I'm going to be updating this soon with a way to do this with only 2 renders instead of 4 and it should DRASTICALLY reduce the tediousness of this.

Share this post


Link to post
Share on other sites
Guest Laxe
I think the regular way looks fine, this seems like too much work for a small amount of difference that is basically unnoticeable

Share this post


Link to post
Share on other sites
[quote name='Laxe' post='2170277' date='Feb 7 2008, 06:20 PM']I think the regular way looks fine, this seems like too much work for a small amount of difference that is basically unnoticeable[/quote]
You're telling me inhabitants ramped slow mo's were unnoticable? Anyways if anyone wants to skip the audio re-render, after you super slow mo it, bring the original clip and the super slow clip into after effects.

Now put the slow clip on top of Comp1 and the original clip below it and timestretch the original clip to the same percentage, which should be 25% if you put "60" in the AviSynth box.

Now mute the slow clips audio.

Make a new composition and then drag Comp1 into it. Then you do your time stretch to 400% or whatever and ramp it. It ramps the audio from the original clip so you don't have to worry about quality loss or anything.

So there, its actually pretty simple now, there's 3 pretty simple steps and shouldn't take very long. Worth it.

Share this post


Link to post
Share on other sites
thought it looked great but if there was an easier/faster way it would b better but than every 1 would be doing it

Share this post


Link to post
Share on other sites
awful lot of work...


it looks soooo sick though, at first you don't even notice it's going in slow mo haha.

Share this post


Link to post
Share on other sites
[quote name='GregFranklin' post='2305648' date='Apr 15 2008, 02:34 PM']I would love to hear more of Twixter. Got the goods Goonface? I know I'm bumping this, I just wan't a piece of goonface's knowlage :([/quote]
I'll post a tutorial pretty soon now that there's a demand for it.

Share this post


Link to post
Share on other sites
im trying this tonight cause i have nothing better to do and the INHABITANTS ramps are so gnarly.
ill post it when im done and if it looks good haha.

EDIT: im stuck! i cant save the file as a .avs file and i cant get the location of the clip.
also it wont let me download Huffy i dont know why.

Share this post


Link to post
Share on other sites
:(-->
QUOTE(Mr. B @ Apr 17 2008, 07:46 PM) [snapback]2309441[/snapback]
im trying this tonight cause i have nothing better to do and the INHABITANTS ramps are so gnarly.
ill post it when im done and if it looks good haha.

EDIT: im stuck! i cant save the file as a .avs file and i cant get the location of the clip.
also it wont let me download Huffy i dont know why.[/quote]
Ok, well for the avs file problem, when you goto save as in your text editor, goto "save as type" and select "all files" or something. Then put ".avs" at the end of the file name.

The location of the clip is where it is on your harddrive. Let's say the slow mo clip is on the c drive in the "footy" folder. You'd put "c:/footy/nameofclip.avi"

Did you get the zip file with the huffy codec contained in it?

Share this post


Link to post
Share on other sites
I just got Twixtor, it's pretty hard to get the timing exactly right, and the audio gets a bit messed up.

Share this post


Link to post
Share on other sites
[quote name='ChazUKdeux' post='2310206' date='Apr 18 2008, 05:03 AM']I just got Twixtor, it's pretty hard to get the timing exactly right, and the audio gets a bit messed up.[/quote]

Not with my method. You can get ultra smooth ramps with 1 render in AFX.

Share this post


Link to post
Share on other sites
Yeah my girlfriend is up here right now but after this weekend I'll post the tutorial in this thread asap.

Share this post


Link to post
Share on other sites
okay i figured out everything, thanks for helping me out but i still have one more problem. i saved that shit as .avs and know it wont let me open it in VirtualDub. did i do something wrong or soemthing

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×