This script has an embedabble UI, click for an installation video tutorial Watch a quick demo video about this script

Simplifies the workflow between Mocha and After Effects. More precisely, it helps you to apply the Mocha tracking data in After Effects in whatever way you want.

"Name Your Own Price"
You can pay anything you want, the amount displayed in the cart is only a suggested amount.
View Cart

MochaImport Compatible with After Effects CS3Compatible with After Effects CS4Compatible with After Effects CS5

Version: 2.04   Sign up to be notified by email when a new version of this script is posted
Creating a Tracked Head Wound Tutorial on Aetuts+

Creating a Tracked Head Wound Tutorial from Aetuts+

I have created a new After Effects script called MochaImport. As you might guess, it simplifies the work with Mocha for After Effects. More precisely, it helps you to apply the Mocha tracking data in After Effects in whatever way you want.

    With the script the following tasks can be done as one click operations:

  • create corner pin
  • create CC power pin
  • create Red Giant Warp corner pin (Red Giant Warp plugin required)
  • create AE trackpoints from Mocha track
  • stabilize footage
  • move layers according to track
  • create a precomp in which the footage is stabilized while maintaining the movement in the original composition
  • create a precomp in which the footage is stabilized and undistorted while maintaining the movement and distortion in the original composition (Red Giant Warp plugin required)

Tutorial:

New features in MochaImport 2.0:

MochaImport works with Mocha for After Effects versions 1 and 2.

if you have problems
If you have problems, make sure you have installed the newest version of the script (currently version 2.02).

There where several problems to paste the tracking data into the textbox. Since this is a bug in After Effects and not in my script, I unfortunately cannot fix it. Therefore I deactivated the cut and paste now. You have to load the data from a text file now instead of pasting it from the clipboard.

report a bug

    if you encounter any problems, best send me a mail to mmohlREMOVE_THIS_TO_AVOID_SPAM@gmx.de containing the following information

  • a short description of what does not work
  • the Mocha data you used (e.g. attached as text file; check whether there are differences in the text file you save in mocha and what finally ends up in the textbox of the script)
  • the script version you used
  • the operating System you use (Mac/Win)
  • the AE version you use (CS3/CS4)
  • a screen-shot of the AE window while the error occurs (this is not absolutely necessary, but in the bug reports I obtained so far, it helped to find the problem much faster)

Reporting bugs does NOT mean you should feel obliged to donate. By helping to improve the script you also make an important contribution.

fixed bugs
Problems with the script on CS3 (unknown UI element type “Group”) where fixed in Version 1.1.

The “pasted keyframe data has 29.97 fps but your comp has 29.97fps” error message is fixed since Version 1.2

Some issues with tracked fields/interleaced footage where fixed in 2.0

Some problems with corner pin data (Error Message “Invalid corner pin or transform data”) where fixed in 2.02


Last updated October 19th, 2009
27,784 views
Tags: , , , , , , , , ,

About the author

I started compositing and working with After Effects back in 2007 as a free time activity. As a computer scientist I am used to a formal, mathematical way of thinking which allows me to push the limits of After Effects. Therefore, I started developing scripts that let people perform complex tasks via easy and intuitive interfaces.

Pingbacks

53 Comments

  • You don’t explain how you set up Mochaimport to use in After Effects. I downloaded the script and now what. Where do I put it.

    Thank you

    Steve

  • Steve, you have a tutorial on how to install & run scripts in the FAQ page of the site.
    Here is the direct link: http://aescripts.com/faq/how-to-install-and-run-scripts/

  • friend I bought the script to import Mocha, I installed it was not more like the toolbar iqual is yours. what needs to be done w / him is his equal? work on Windows Vista and Adobe After Effects CS4.

  • friend I could install, plus the program window is not equal what you show in your video. the file so that I bought came MOCHAIMPORT.JSX did not equal the two shows in the tutorial to install .. I want my match to your window and the script is different from the wild.

  • Excellent script! One of my favorites… too bad the copy / paste function doesn’t work! ):

  • @valter: can you explain what looks different for you? Maybe you can email me a screen shot.

  • whoa, why the heck is it being sold for cash now when I downloaded it for free from the Author’s site? :/

  • Snap, my bad. I didn’t even realise this was a name your price system. Maybe it should be more clear!

  • hello dear,
    i have donate and i download it the script, but i tried to put it in after effect it dose not work.
    I am using AFTER EFFECT CS4 and i added it in sript forder inside that folder this is UI folder and i past it there.

    anyhelp please email me thank you very much ( m14125@hotmail.com )

  • @bashair: I wrote you an email.

  • Mathias greetings from Greece. I’ve instaled the script but it looks empty(no apply button) in my control panel. I have the latest version of the script, cs3 and windows xp. don’t know what I am doing wrong. please mail me for help ( patsober@gmail.com )

  • ok. that was my mistake. everything’s fine now.
    great script and thank you very mutch. sorry for my bad english

  • thank you so much mathias. just donate some money for your hard working and dedication to your hobby. keep it coming!!!

  • Mathias,

    I tried to do the Picture Frame HP commercial using your mochaimport techniques. I tried to see if it follows the picture frame accurately or not. I made a white picture frame and place that in front of my face, and then move that down where half of the picture frame will be out the film. this should be simple, right. i used the xspline around the the entire frame, and made sure perspective is also selected, and proceed with track forward. as soon as the frame goes down, the xspline is distorted quickly. so i tried to add inner xspline to include the frame only. same problem. i can not export any data to AE after this problem is corrected using surface, right?

    oh yeah, i used a tiff sequence to import the clip. the frame rate is set to 30, same as for AE. i need help.

  • @tvandang: The way you described it would be exactly how I would do it. Make sure that the inner and outer splines are placed such that a small border around the inner and outer boundary of the picture frame is contained. No idea why it should not track properly without knowing the shot. Any yes, you are right, adjusting the splines does not adjust the track but only helps tracking later frames. If the spline distorts, i.e. it already looks wong within Mocha, it is definitely a problem with the tracking and not with the script.

  • Mathias,
    Thank you for your quick reply. Yes, I did make sure that the inner and outer spline are within the frame but the splines distort when the picture frame goes down in front of the body and tilted at an angle towards the body. It is not your script:-)

    Your examples are more complex but they track so well compared to my simple example. Just wondering why. I will keep trying:-) Thanks!

  • @tvandang: try tracking only with shear and not perspective (or even without shear), maybe this helps if Mocha guesses a perspective change where there is none.

  • Mathias,

    Is it the adjustments of the inner and outer splines points that creates the data corner points to AE or the adjustments of the surface points? i can have the inner and outer splines tracking perfectly within the picture frame but the surface points somehow to be off and need to be adjusted throughout the clip. does the surface follows the spline area that we create? anyway,

  • i am still trying to perfect it and i am not going to sleep yet:-) i remembered you mentioned about suggested tutorials on your website. check this out, Mathias: http://www.youtube.com/watch?v=2RPl5vPEoQk&feature=related

    only if you have the time, i would love to see this tutorial from you. thanks!

  • @tvandang: The corner pin relys on the surface points not on the splines. The splines just tell the tracker what area to track and the tracker then tells the surface points how to move. If you adjust the splines after tracking to move perfectly it does NOT buy you anything for the corner pin. This makes only sense if you want to use the splines for something else than tracking, for example with the Shape plugin.

  • Mathias,

    Sorry you to bother you and I know you are busy yourself. Only reply if you have time.

    I have to clear this understanding about mocha.

    So I created an inner and outer splines around the picture frame because that is the only visible area to track, right? After tracking forward is completed, I adjusted the splines so that it looked correctly throughout the clip.

    Then I went back to the first frame and I turned on the surface points and line up the surface points to line up where the picture frame was at angle or a change in perspective. Going through the entire clip, adjusting the surface points, I was wondering if this how it had to be done. I couldn’t imagine it though. I guessed I was doing it wrong.

    Since I set the splines(inner and outer) to track what area to track, the tracker would tell the surface points how to move, why didn’t the surface points move along where the area was being tracked? oh yeah, the surface points were set the same as the inner spline.

    I was only adjusting the surface points for only several frames and then exported the tracking data to AE.

    In AE, I created a square shape mask on a solid layer where the picture would be on the picture frame. At the first frame on that layer, I loaded the data file into your scripts and hit “apply”. It tracked accordingly but I just could not imagine, that I had to adjust the surface points in Mocha after the splines were adjusted.

    So if the splines were set to track the area and then I exported the data to AE without setting the surface point, what would I track in AE? Is it the shape only?

    WHAT AM I DOING WRONG HERE? FRUSTRATION… I CAN’T SLEEP:-(

  • *technical answer*
    Watch my 3-minutes intro: http://www.vimeo.com/5676977
    Mocha is a planar tracker, it tracks the movement of planes in your video. It does NOT track 4 points of a corner pin or the shape of a spline. It tracks a plane. With the splines you tell Mocha, in which area of the frame this plane is visible. The movement of the plane will only be measured on the area you marked with your spline. Once you tracked the movement of the plane, modifying the splines does not help you. It won’t make the track better. The surface points tell you, which part of the tracked plane you want to export as a corner pin. If manual corrections are necessary, modify those.

    *practical answer*
    If manual corrections are necessary, manually adjust only the surface points and not the splines if you want to export tracking data. Modify only the splines and not the surface points, if you want to export the shapes with MochaShape Plugin.

  • Hi Mathias,

    I just made a donation and downloaded the script. It works fine so far.
    Thanks for your work.

    some other web site of mine

    http://www.vimeo.com/dalmasso/videos
    http://www.view54.com

  • Cool script, except for the fact, u can’t import shape data…Any chance of updating that, would be awesome, cause AE clipboard is always stuffing up…

  • Ok i am feeling a bit stupid but… after the donation, how can i download the script?

  • @Fabio: After the check out there should be a download link and you also get an email with a download link. If you have any problems, you can also send me an email (mmohlREMOVE-THIS-TO-AVOID-SPAM@gmx.de)

  • just donated for your Mocha Import script but it does not work like your tutorial shoes, I paste the Tracking data into AE9 and select the layer hit apply and nothing happens?? If i past the Tracking data straight to a null and it works fine so the tracking data is there.

    Why i use your script the null is created with the parameters activated for animation but there are no keyframes, I made the seq bigger to see if they were pasted earlier or later but no luck,

    Thanks Mark

  • @Mark: Did you load the tracking data from a file or tried to do cut and paste? The cut and paste is not possible with the current version of the script (since it sometimes causes errors due to After Effects Bugs concerning the clipboard). You have to store the tracking data from Mocha in a file and load the file with the script. If you still have problems, you best send me a bug report via email as described in the “report a bug” section above.

  • Mathias,

    You are genius and so kind as well to share your script! I still need to try it all out, getting Warp 1.0 right now just so I can play! Thank you for your knowledge. I hope all goes well on your venture on attaining PHD. Dont go astray from us when you do. I will test out your goodies super soon.

    Hold on to your lug nuts, its time for an overhaul.

    -J

  • Ooops site didnt go through…hahaha go figure. Great work once again…

    http://www.BaguaKungfu.com

  • hi mathias, i just wanted to download your moch import script. after filling out the required details (3 times!) i checked out (i thougt you cant do anything wrong!?) and ended up with… nothing. empty page (http://www.e-junkie.com/ecom/ppdirect.php) and no idea, where to download. HELP!!! :-)
    cheers & beers
    Frank

  • Hi Mathias, you are a pure genius and love the plugin. Only I am having difficulties utilizing the script in CS3. I have installed Red Giant Warp tool and your script but I dont have access to the action drop menu list in the Mocha Import palette. All options are still ghost out even after my repeated efforts of installing both plugins, yours and Red Giant. When I manually paste the script in Mocha Palette, it works but I just dont have the various options in action list. I have also made sure the frame duration is of the same footage and exported tracked data to that time frame. I have exported in all types of text files from Mocha Tracking Export and still, options for action list in Mocha Import palette still ghost out. Mocha Import 2.04 is used on AfterEffects CS3 on windows Vista. Could you or others provide suggestions? I am so eager to use this tool for a project and would love to have immediate response. Thank all for reading and aiding in technical support. Best of care.

  • I must add that I am also using MochaAE V2 so I seem to be all up to date in third party apps/scripts on AfterEffects CS3….

  • Hey there–

    Great script, I use this all the time. One question–when I use it in conjunction with RG Warp, the quality of the object I’m pinning seems to degrade a bit. So for example if I paint out a part of the frame, mask it out, freeze frame it, and then apply “RG Warp–Keep Frame”, the quality goes down a bit of that layer. Same thing using the undistort function. I’ve messed around with the Warp settings but I can’t seem to figure it out.

    Any ideas?

    Thanks.

    • If you work with an undistorted precomp, RG warp first undistorts the image to get the undistorted precomp and then redistorts it again, to apply your modifications to the original comp. This always leads to a little bit loss of quality. You can avoid that by keeping in your precomp really only the parts that you changed.

      See for example this tutorial:
      http://ae.tutsplus.com/tutorials/vfx/creating-a-tracked-head-wound/
      I create the head wound in an undistorted precomp and once I finished the wound, I deactivate the background layer. By that the background is transparent in the precomp and hence has no loss in quality (and no unwanted additional motion blur).

  • Is this script working with CS5

  • Hello Mathias;
    I use Mochaimport with success, congratulation for the work, I want to suggest the following function with the purpose of bypassing the well known AE clipboard bug : I use the MochaShape plug-ins, can you add the necessary script to apply Mochashape parameters on selected layer, this will definitely bypass the clipboard PB.
    Regards
    Serge

  • HI Mathias. Love your stuff but i got a problem. I got Mocha for After Effects CS5 (v2) wich means that i cant use the red giant functions. Can you make a script for the mocha v2?

  • Cuz it the reg giant selection got a star to the left and says that it accepts only v1 data. So how can I fix this?

Leave a comment

(to reply to a specific comment use the link by the comment)