-
Recent Comments
- mohamed hosni on Paint and Roto Reel:
thank you for supporting me - mohamed hosni on Colour Smear for Nuke (UPDATE v2.0):
thank u - Daniel on Rebuilding bad frames using OFlow:
Love this gizmo and use it all the time. I have added the option to use a Kronos as an alternative to OFlow and submitted a pull request on Github - justin.li on Keyframe Reduction script for Nuke:
keyframe-reducer-for-nuke-master\reduceKeyframes.py”, line 145, in doReduceKeyframes i=getKnobIndex() #find out if user only clicked on a single knob index, or the entire knob File “E:/nukepluginserver/Universal plug-in/NukeShared/Repository/_AutoInstaller/keyframe-reducer-for-nuke-master\reduceKeyframes.py”, line 64, in getKnobIndex return int(nuke.tcl(tclGetAnimIndex)) RuntimeError: Nothing is named “” - srikanth on Colour Smear for Nuke (UPDATE v2.0):
i want to use it for reflector on moving car glass window.
- mohamed hosni on Paint and Roto Reel:

Convert “Mocha for AE” tracking data to Shake / Nuke nodes via PHP
February 19, 2012
***UPDATE***
This import script has now been rebuilt in Python so that it will run natively within Nuke. Unless you need to create the Shake node, check out the new version here
***ORIGINAL POST BELOW***
A while ago I worked at a facility where I needed to do a Mocha planar track, then use the tracking data in Shake. They only had the “Mocha for AE” version of the software, so it would only create an After Effects corner pin node (AE was not the ideal environment to comp the shot as its corner pin does not support motion blur).
So I wrote a quick and dirty PHP script that takes the generated tracking data (a .txt file) and spits out a Shake “Stabilize” node. Once I had that, it was only a small tweak to have it to also create a Nuke “Tracker” node (credit to Mat Power for doing a lot of this side of the coding).
This has proved an invaluable tool for me, as Im often working at places that don’t have the full licence for Mocha. So I thought I’d share it here, as Im sure others will find it useful.
Just copy and paste the contents of the .txt file created by Mocha into the text area below, then hit “convert”.
I’ll link to the source code here so that people can run it locally, or if they feel that it could be improved. Its pretty ugly under the bonnet – I crashed the script out in a few hours so feel free to clean it up / extend its functionality. There is a function that parses the incoming text file and strips out the point / frame data, putting it into a master array. There are then 2 different functions to format / output the contents of the array into both Shake and Nuke nodes.
|
8 Responses to "Convert “Mocha for AE” tracking data to Shake / Nuke nodes via PHP"
Tim Christensen says: May 19, 2012 at 7:28 pm
Fantastic tool, thank you for this!
Great tool I was introduced to the original php scripts on your old site a long time ago. Thanks for sharing the source code, these things are always useful to someone like mysef learning a lttle more about coding (even if you feel its a bit rough around the edges)
Raymond says: October 23, 2012 at 3:36 am
I totally agree it’s a great tool. In my company, most of the newer licenses of mocha are always in used. And because of this, I can use mocha 1 and copy paste it to nuke. Thanks Richard!
Wow.. Amazing help. I will be using this. You are the man. Tracking info came from AE 6 and went right into Nuke with no issues.
This is awesome! Nice work!
Kyle says: November 15, 2017 at 11:55 pm
Hello, is the source code on this project still available?
Thanks so much!!