Hey Jacob, Since you're already using the snap3d module, have a look at "projectSelectedPoints". That should give you projected points into screen space coordinates.
But I guess you'll ultimately want to get an animated curve for each point. For that, you may need to do a bit more work and handle the transformations in a loop for yourself. Still, there's other functions in there that can help: - cameraProjectionMatrix(cameraNode) -> gives you a matrix object the inverse of which you can use to convert your Vector3 from world to screen space. If it's of any help, I've done something very similar but using matrices from the metadata of prman renders. http://www.nukepedia.com/gizmos/gizmo-downloads/metadata/prmantracker/ The methods should be the same, though (get the inverse of your camera's projection matrix, use that to get normalized screen coordinates, scale that to your format's resolution, and copy the resulting XY coordinates into your tracker / cornerpin node. Hope that helps. Can't check any of that now, but I'm happy to elaborate if this sounds confusing. Cheers, Ivan On Tue, Mar 1, 2011 at 8:30 PM, Jacob Harris <[email protected]> wrote: > I've written a script to semi-automate a Reconcile3d workflow. It uses > > for pt in nukescripts.snap3d.selectedPoints(): > pos = nuke.math.Vector3(pt.x, pt.y, pt.z) > > to grab the currently selected point, feeds that to Reconcile3d, > executes it, and copies the output to a Tracker node. > > What I want to do now is grab multiple points and get a separate > output curve from each one in turn. I seem to have hit a wall, though. > I've picked apart the snap3d module as best I could as well as any > post containing the words "Ivan Busquets" ;) Not sure if this requires > extensive camera matrix calculations or if I'm missing something > easier. > _______________________________________________ > Nuke-python mailing list > [email protected] > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python >
_______________________________________________ Nuke-python mailing list [email protected] http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
