mamoworld

Tools and Tutorials for After Effects

  • Deutsch
  • English
Start Tutorials Advanced Tutorials Tutorial: Stabilize Motion Without the Need to Zoom

In this tutorial you learn how to stabilize a shaky shot with the Mocha tracker and the MochaImport script. After stabilization, you usually need to zoom in a bit to get rid of empty areas that show up at the borders of the image. Instead of this, we use a clever technique to fill the missing parts at the borders such that there is no need for zooming any more. The technique uses frames before and after the current frame to fill in parts of the image that are missing in the current frame. Sounds complicated but works very well and is done with a few clicks using MochaImport.

Things to learn in this After Effects tutorial:

  • Learn how to track in Mocha (I use Mocha Pro, but it also works with any other variant)
  • Learn how to stabilize a shot with the MochaImport script.
  • Learn how to smooth the camera movement with a simple expression.
  • Learn how to fill in missing parts at the borders of the stabilized footage by inserting appropriate material from the frames before and after the current point in time.

Contents

  1. Tracking the shot in Mocha (1:46-5:44)
  2. Stabilizing the shot (5:45:55-11:25)
  3. Fill in missing parts at the borders (11:26-21:01)

Expression for Smoothing the Camera Movement

smooth(width = 1, samples=5, t=time)
The smoothness can be controlled by the value for "width". To get an even more smooth movement make this value larger, to make it less smooth make it smaller (e.g. "width=0.5"). "width=1" means that the values over the duration of one second are smoothed (i.e. averaged).

See also

After Effects Project Download

tut-mocha-stabilize.zip (7,03 MB)

 

Comments  

 
+2 # Jay S 2010-12-15 10:48
I would like to see some tutorial about Mocha Pro!
Reply | Reply with quote | Quote
 
 
+2 # Mathias Möhl 2010-12-15 11:48
Are there particular features that you would like to learn about? e.g. Stabilization, insert module, remove module, lens module?

Here are some tutorials about MochaPro as a starting point:
www.imagineersystems.com/.../
Reply | Reply with quote | Quote
 
 
0 # Jay S 2010-12-15 12:38
I really really want to know "Lens Distortion" module, because I have a camera and I want to use my camera for 3D tracking in Boujou or 3D Equalizer, but I don't know how to fix lens distortion in there.
Can you make tutorial about lens correction?
Thank you Mathias :oops:
Reply | Reply with quote | Quote
 
 
0 # luantran 2010-12-15 15:29
thanks for all tuts, great, plz up more tuts visual effects and motion graphic
Reply | Reply with quote | Quote
 
 
0 # conigs 2010-12-15 17:20
This is a great tip. I use Mocha for general tracking, but I didn't realize it could track an entire shot like that.

Another option for extending the frame is to nest your composition, then use the Time>Echo effect twice. Once with the expression thisComp.frameDuration and another set to -thisComp.frameDuration on the Echo Time parameter. Set the Echo Operator to Composite in Back and adjust the number of echos, and you now have a more automatic method than duplicating your layer.

If you want to skip frames, you could add *2 to the expression to use every other frame, *3 for every third, etc…
Reply | Reply with quote | Quote
 
 
+1 # Mathias Möhl 2010-12-16 08:06
This is a very clever idea, conigs!
I just tried it, but it has one drawback compared to shifting the layer: Assume, you apply the echo on the nested comp to composite the frame that is let's say 10 frames before the current one below the current frame. Then the frame from 10 frames before is placed there, where the camera was pointing 10 frames before and not where it is pointing at the current frame. In other words: The overlayed frames are not aligned correctly.

In short: with the echo effect you go back in time and camera positioning, whereas when shifting a duplicate of the layer (but not the NULL containing the camera movement), you only go back in time, but not with the camera position.
Reply | Reply with quote | Quote
 
 
0 # Burt Brown 2010-12-18 21:48
Excellent!!!! Many thanks for this tut! I knew there had to be a way to do this, but it would just never come to me on my own. It seems so simple AFTER you know the trick, but it took some CLEVER thinking to get things to work. BRAVO!!!! :)

Burt
Reply | Reply with quote | Quote
 
 
0 # Tenzo 2011-01-20 16:56
FUCKIN ACE!
Reply | Reply with quote | Quote
 
 
0 # Aivaras 2011-01-22 05:53
Brilliant!
I used to do this manually (only with single planes as background extensions), this mocha+mochaimpo rt workflow really speeds things up!
My method used to be (ae only):
- Track single point in shaky footage
- apply this data to a null.
- parent another null to this null, and add a divider in the link expression. /2 equals to half the smoothness!
- drive the footage position with new null

Your way is much, much better! Thanks :)
Reply | Reply with quote | Quote
 
 
0 # Mx 2011-01-31 14:36
Hello, Can you please make a few tutorials on the new Remove module?? Looks amazing but I just want to see how it works when you have parallax in between elements on complicated projects!
Many thanks, your site ROCKS!
Reply | Reply with quote | Quote
 
 
0 # Tom Daigon 2011-02-23 00:58
Another wonderful tutorial! I have a problem that I cant figure out though. When I apply the TF data in AE, at about frame 137 (when the camera zooms in) the image moves off the screen. This is after applying "Stabilize" then "Move" using Mochaimport. Im sure it has something to do with the tracking I did in Mocha, but I did what you did in the tutorial (kind of) and am at a loss as to what is wrong. Help! ;-)
Reply | Reply with quote | Quote
 
 
0 # Tom Daigon 2011-02-23 04:46
OK, I got it to work in AE. I just tracked backward...initally around the man and woman, then widened out and moved the trackers to accidate the picture.
My first attempt (using your technique) showed a good stabilization in Mocha but got weird in AE from about frrame 130 to 160 during the zoom. But tracking backward solved that problem for me!
Reply | Reply with quote | Quote
 
 
0 # Mathias Möhl 2011-02-23 08:28
Thank you for the feedback. Its hard to guess where the problem came from but nice that it is working now :-)
Reply | Reply with quote | Quote
 
 
0 # ben 2011-03-08 14:22
brilliant
Reply | Reply with quote | Quote
 
 
0 # bstark 2011-03-09 14:39
Excellent tutorial Mathias

Those techniques really work.

Thank you!
Reply | Reply with quote | Quote
 
 
0 # Tim 2011-03-15 14:58
very nice - thank you!
Reply | Reply with quote | Quote
 
 
0 # tune 2011-03-27 17:53
Спасибо!
Без тебя было не разобраться!
Можно этот видео урок скачать?
Thank you!
Reply | Reply with quote | Quote
 
 
0 # AntoxaGray 2011-03-30 07:31
Nice trick, video copilot has another method (with mirroring and stamp or whatever), could be supplement to this.
Reply | Reply with quote | Quote
 
 
0 # Hologramman 2011-04-24 01:16
You really rock. I want to thank you so much.
Reply | Reply with quote | Quote
 
 
0 # Garamond 2011-04-27 13:53
Hi Mathias.

You have used a video which includes panning. What I would like to ask is that; is your method works well with the shot using tilts.

Best.
Reply | Reply with quote | Quote
 
 
0 # Mathias Möhl 2011-04-28 23:14
Hi Garamond,
it works fine with any kind of motion. Only rolling shutter and motion blur are things you won't get rid of. And if you have moving subjects or foreground elements creating paralaxe effects, those might cause artefacts in the reconstructed border parts of the image.
Reply | Reply with quote | Quote
 
 
0 # Helge 2011-05-29 00:53
I read what you wrote at CGTalk (click link) that you can use this technique to remove hair that was on the lens while shooting and is visible on the footage. Please make a small tutorial or guide me through this. I tried what you wrote on the CGTalk forum, but I can't get it to work. It's a shot with a moving camera following an actress very close, and it's for my exam. :-)
Reply | Reply with quote | Quote
 
 
0 # Mathias Möhl 2011-05-30 08:39
Hi Helge,
if your actress is moving independent of the background, you will probably only be able to fill the background and have to do the paining on the actress by hand. Track the background and proceed as in the tutorial (skipping the stabilization part). You can also try to track the actress to fill in the part that is covered by the actress but for this is will probably be harder to get good results.
Reply | Reply with quote | Quote
 
 
0 # Yuval 2011-06-07 20:20
Great tutorial, thank you Mathias! I needed to do just that, stabilize a shot based on a Mocha track, and your tutorial, along with MochaImport made it so straighforward.
Reply | Reply with quote | Quote
 
 
0 # Kevin 2011-09-21 21:20
Wow - that's brilliant! I never would have figured that would work. Now all we need is a script to automate duplicating and time-slipping the layers...
Reply | Reply with quote | Quote
 

Add comment


Security code
Refresh