PYTHON

XY STMap 1.1

This code allows you to convert all the points of a Tracker through a STMap.

In your Tracker, select the XY STMap panel, then:

1.) Select a STMap

2.) Start the conversion


XY STMap retrieves each point from the Tracker and find the corresponding point on the STMap. Then it creates a new Tracker that contains these new track points.

How I have done it

  • The main difficulty is that a 4k STMap contains more than 8 million points. If you have 600 track points, that is almost 5 billion matches to test!


  • I therefore applied myself to first coding a system that estimates the area of the STMap where the point we are looking for could be located, and thus limit the number of points to be compared.


  • On my machine, XY STMap now takes 17 seconds to convert 600 track points.

How to install XY STMap ?

Create a folder named ‘python’ in your .nuke folder and put this file inside.


Add this line to the init.py file:


nuke.pluginAddPath("python")


Then add these lines to the menu.py file:


import xy_stmap

nuke.addOnUserCreate(lambda:xy_stmap.panel(nuke.thisNode()),nodeClass="Tracker4")