Skip to content

Instantly share code, notes, and snippets.

@jedypod
jedypod / PlanarProjection.nk
Last active October 12, 2023 06:31
PlanarProjection Planar Projection Generates 2D coordinates for points in 3D space. Works on 4 points at once, is instantaneous to calculate, and generates a 4x4 transform matrix for use in rotos.
set cut_paste_input [stack 0]
push $cut_paste_input
Group {
name PlanarProjection
help "<b>Planar Projection</b>\nGenerates 2D coordinates for points in 3D space. Type in 3D point coordinates, or use vertex selection in 3D viewer and click set to pick average of selected points, or set points to set all four points at once. \n\nYou can connect node output to scene together with your pointcloud or geometry and see where your points are located in 3d space. Double click any of them to move it in 3d space like any traditional nuke transform control. \n\nA matrix transform is also generated to be used with RotoPaint, SplineWarp and GridWarp nodes. If you are using matrix in GridWarp, points have to be in clockwise order, pick them one by one! \n\nCommand set points doesn't respect selection order! \n\nCheck out the demo video on my website! Kudos to Ivan Busquets for help with matrix math. \n\n-- developed by Vit Sedlacek 2012 www.vitsedlacek.com \n\n-- Modified by Jed Smith to make calculation time nearly inst
@jedypod
jedypod / README.md
Created February 21, 2020 17:00
Nuke Python script to retime selected Roto, RotoPaint. or SplineWarp nodes.

Retime Roto

This is a python script for Nuke to retime roto shapes. It supports shapes only, not strokes, not opensplines.

It works by looping through each roto node, each shape in the roto node, and each point on the shape. It creates an expression on each point referencing a frame_lookup knob. Put a retime curve on this knob and your shapes will be retimed.