-
Recent Comments
- pralhad on Colour Smear for Nuke (UPDATE v2.0):
i use this node education parpose - Francois Leduc on FrameBlendMerge:
You could also use a TimeEcho node. There’s no Min mode, but to fix that, apply a Invert Node to your source, plug TimeEcho (in Max method) and apply another Invert node after. Go at the end of your timeline, change the “Frames to look at” to the number of frames or your shot (or less) and you should get your clean plate. Of course all of this is done on a stabilized shot. - Richard Frazer on Colour Smear for Nuke (UPDATE v2.0):
Hi Josh. Thanks for the feedback. You have correctly discovered that this tool works best when you have a solid core for a matte with a feathered edge. Where it fails is if you have large areas that just have semi transparent alpha (such as your grimy window). I’d approach this by separating your actor with a rough roto and using the colour smear to deal with their edges. Then for the smudges maybe try extracting the green channel and using using it to drive a grade for your background, or... - Josh Northeast on Colour Smear for Nuke (UPDATE v2.0):
Hey Richard! Absolutely love the tool. Saved my ass alot. I’m working with some greenscreen plates where there is a smudgy window behind the actor and a greenscreen behind that. We need to preserve the smudges on the window but that means it’s hard to use your tool to treat the edges because the alpha isn’t clean. Any tips? Cheers, Josh - Matt on Keyframe Reduction script for Nuke:
Nice! Just used this on a projection/stabilization job and it worked great to simplify the original camera keyframes and smooth out the reprojected shot. Thanks!
- pralhad on Colour Smear for Nuke (UPDATE v2.0):

Import “Mocha-AE” tracks to Nuke via Python
July 27, 2012
This is an update to my original post Convert “Mocha for AE” tracking data to Shake / Nuke nodes
***UPDATE***
I must emphasise that this was a test project for me to learn Python for Nuke – what the script is doing is probably in violation of the Mocha end user agreement. As I stated in my original post, the PHP version of the script was a one-off fix for a small job where the facility I was working in did not have a full Mocha licence and I needed a quick solution. I have since been working at bigger facilities that use full Mocha Pro licences, so have not needed to use the script.
Mocha Pro is the current supported way to get Mocha tracking data to Nuke – please don’t use my hacky script as a stand-in for this great piece of software.
A while ago I wrote a PHP script that takes the tracking data generated by Mocha-AE (the version of Mocha that comes bundled with After Effects) and converts it to Shake and Nuke nodes.
Well I had a quiet spell over the last couple of days and thought I would use it to learn Python. My first project was to re-create my Mocha-AE import script, but have it run natively within Nuke. This would force me to cover some Python basics such as importing files, parsing strings to generate arrays etc. as well as some Nuke specific functions like creating nodes and adding animation data. I also wanted to extend the script to create a CornerPin node as well as a Tracker node.
I was surprised how quickly this came together. There are some great online resources such as The Foundry’s website and Nukepedia, and I find Python quite a simple and logical language to learn.
So here is my code. I will give the disclaimer that it is literally the first thing I have ever written in Python, so I’m sure that it could be more efficient. If you know any ways to improve its functionality, please leave comments below.
As with the previous version, this assumes you have used the “After Effects Corner Pin [corner pin only, supports RG Warp and mochaImport] (*.txt) “
export method from Mocha-AE.
You can wrap this up into a menu item to give your Nuke install permanent access to it as a function (I may update this post as to how, but until then try here), or the simplest way to run it is to just copy the code below and run it via Nuke’s Script Editor panel.
Here is the GitHub link for the code – just select the text, copy it then, then paste it into Nuke’s Script Editor panel.
4 Responses to "Import “Mocha-AE” tracks to Nuke via Python"
Henrique Reginato says: October 1, 2015 at 8:17 pm
Hey man, this is awesome and i have been using it for quite a while… But I’m having trouble wrapping it up into a Menu item…
have you figured out how ??
The closest I got was still launching the tool together with Nuke and the menu I created was unresponsive…
Raymond says: July 9, 2017 at 1:23 pm
Hi Richard… I’m not sure but I believe I used to work with you in dneg where we used your script and incorporate it into dneg Singapore’s nuke.
Anyhow, are you familiar with Natron? It’s like a clone version of nuke but difference is it’s free. I was wondering if it’s possible to have a mocha ae python script for that compositing software.
Awesome!!! Thanks so much for sharing this Richard!