ISAAC SPIEGEL
  • Demo Reel
  • work
  • Blog
  • Contact

Nuggets of knowledge

Organizing and Optimizing the Tracker node

9/5/2019

6 Comments

 
I like to keep my Tracker nodes precise and organized to help the overall readability of my comps. When another artist goes to pick up my work, they should easily be able to tell which Tracker created what nodes and they should have easy access to the basic tracking information in the label of the node. There's nothing too complex inside these tools and with a rudimentary understanding of Python and TCL (but mostly Google) these tools can easily be implemented. I've briefly scratched the surface of my menu.py in a previous blog post. This write up will go into a bit more depth specifically focusing on the Tracker node.

All python scripts and files referenced in this post can be found on my GitHub page for this post.
Picture

Part 1: The Label

Picture
Left, my custom tracker. Right, Nuke default tracker
The first step I take to organizing my Tracker node is to display the Reference Frame as well as the type of motion that the Tracker is currently using. Being able to view the Reference Frame without having to dive into the node is quick and can help when creating roto-shapes that will be attached to this Tracker. Seeing the output type is helpful for a similar reason, with a glance I can tell what type of motion I should be seeing when viewing the Tracker. This can be achieved with some simple Python code added to your menu.py file.
Code Editor

    
Furthermore, I find it helpful to have the Tracker's reference frame automatically set to the frame when the Tracker was created. When I'm looking for an element to track, I place my Tracker node on the frame where I want to start my track. This line of code allows me to skip the extra clicks of going inside the node and selecting 'set to current frame'.

    
Finally, there are a few more defaults that I adjust for my Tracker node. These are mostly personal preferences and are pretty straight forward so I'll refrain from writing more than what's necessary for them.

I set my shutter offset to centered because cameras in the real world always have motion blur that's centered around an object. It's strange that nuke even has this as a default for so many nodes. However, I rarely use the Tracker for calculating transforms because it's quite slow compared to a baked Transform or Corner Pin (more on that later).

I check 'adjust for luminance changes' which I find quite often gets me a better track.

I also check 'hide progress bar', which is a total personal preference, I don't like seeing the bar pop up when I start tracking. I've seen some compers who like to put the progress bar in its own windowpane within Nuke's UI as well.

I set the default export dropdown to 'Transform (match-move, baked)', more on that later on. In the end, the code in my menu.py looks like this

    

Part 2: Baked Tracker/Corner Pin Naming

Picture
Left, my custom baked Transforms output from a Tracker named 'trackerName'. Right, Nuke's default output from the same Tracker.
When tracking, I like to use the 'Transform (match-move, baked)' export option. I've found that linking Transform nodes to Trackers slows down my comps. The slow down may be caused by Nuke having to process both the Transform and the Tracker nodes when drawing up a frame.

The big downside to this is that, by default, the baked Transform/CornerPin created from the Tracker is difficult to differentiate from regular old Transforms. Additionally, there's no easy way to tell which Tracker created that Transform. Being able to tell where a baked Transform came from is super helpful for other compers picking up shots and when I'm iterating through multiple Trackers. I've written a Python script that is called when the user presses the 'create' button with the Transform (match-move, baked) or CornerPin (match-move, baked) dropdown selected. I've left out the stabilize versions of these as I typically check the 'invert' checkbox within these nodes, to swap between matchmove and stabilize transformations. The script creates a Transform/CornerPin node and sets the nodes name with this format 'TrackerName_Matchmove' or 'TrackerName_CornerPin' depending on the drop down. It also adds in the Trackers reference frame to the label of the Transform. Here's a link to a GitHub page with the 'customTrackerIS.py' script.

To use this script, you have to add these lines of code to your menu.py file:

    

Part 3: Fast Toggle Tracker TRS Checkboxes

Picture
Picture
The final amend to Nuke's native Tracker node that I've implemented is a Python button, built into the node that allows me to quickly check or uncheck the translate, rotate and, scale options for all tracks within the Tracker. I do a lot of my tracking using Mocha and when I copy over a Tracker node from Mocha into Nuke, all the tracks inside the node are toggled off by default. I'd find myself having to click through every translate, rotate and, scale checkbox toggling them all on. Using the 'manage user knobs' in the Tracker node, I added three boolean knobs, one for each translate, rotate and, scale and a PyScript button. When pressed, the PyScript button will look at the three checkboxes, and change all tracks in the node to match the selected boxes. So if the user ticks off just the translate and presses the button, only the T (translate) knobs for all trackers will be checked. Here's a GitHub link to the TRS custom tracker node.

Additionally, I've added a separate python script that allows me to quickly tick a specific column using a hotkey. To check all the boxes I can press shift+t, shift+r, and shift+e for translate, rotate, and scale, respectively (shift+s is bound by default for nuke's settings menu) Here's a GitHub link to the script. This script also needs some code added to the menu.py:


    
That about wraps it up! I'm always looking for more ways to streamline my compositing process, if there's a better way I could be running things, shoot me a chat.
6 Comments

    Archives

    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    September 2020
    March 2020
    September 2019
    August 2019
    June 2019
    December 2018

About

Compositing.
Motion Design.
Climbing.
Cooking.
Shiba.

Contact

email:         isaacspiegel.freelance@gmail.com
web:           isaacspiegel.com
instagram: @fuzzymango
  • Demo Reel
  • work
  • Blog
  • Contact