Skip to content

Instantly share code, notes, and snippets.

set cut_paste_input [stack 0]
push $cut_paste_input
Group {
name CornerPinMatrix
help "<b>PlanarProjection</b>\n\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. You 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.\n\nIf you are using matrix in GridWarp, points have to be in clockwise order, pick them one by one! Command set points doesn't respect selection order!\n\nCheck out the demo video on my website!\n\nKudos to Ivan Busquets for help with matrix math.\n\n--\ndeveloped by Vit Sedlacek (c)2012\nwww.vitsedlacek.com\n\n-- \nModified by Jed Smith to make calculation time nearly ins
@jedypod
jedypod / HexGenerator.nk
Last active December 17, 2018 12:37
Generates a Hex Pattern
set cut_paste_input [stack 0]
version 5.2 v1
Group {
inputs 0
name HexGenerator
selected true
xpos -50
ypos -482
addUserKnob {20 HexGenerator}
addUserKnob {41 format T HexGenCalc.format}
@jedypod
jedypod / AutoExposure.nk
Last active November 29, 2018 21:45
Sample Color values of input averaging within a box size
Group {
name AutoExposure
addUserKnob {20 User}
addUserKnob {41 wb T ColorMatch.wb}
addUserKnob {41 dst_color l dst T ColorMatch.dst_color}
addUserKnob {22 calc T "n = nuke.thisNode()\nnuke.root().begin()\nn.begin()\nct = nuke.toNode('CURVETOOL')\nct\['intensitydata'].clearAnimated()\nt = nuke.frame()\nnuke.execute(ct, t, t)" +STARTLINE}
addUserKnob {26 ""}
addUserKnob {41 intensitydata T CURVETOOL.intensitydata}
addUserKnob {41 sample T ColorSampler.sample}
addUserKnob {26 ""}
@jedypod
jedypod / photo_autoexpose.py
Last active November 24, 2021 06:08
Python script using OpenImageIO to automatically expose scene linear aces ap0 openexr source files and render into jpeg
import OpenImageIO as oiio
from OpenImageIO import ImageInput, ImageOutput
from OpenImageIO import ImageBuf, ImageSpec, ImageBufAlgo
import os, sys
import shlex, subprocess
import glob
#--------------------------------------------
@jedypod
jedypod / DAILIES_CONFIG.yaml
Last active March 22, 2024 09:46
NOTE: if you stumbled here via google, this code has been moved to a proper git repo which is here: https://github.com/jedypod/generate-dailies - A tool to pipe openexr images, apply an ocio display, and output through a bash pipe to ffmpeg and encode to mov
globals:
# Path to the ocio config to use
ocioconfig: /path/to/config.ocio
# Default ocio profile to use if not specified on the commandline
ocio_default_transform: grade
###############################################
## Reformatting and Cropping
###############################################
# If debug is true, no encoding will be done and there will be debug prints
@jedypod
jedypod / nuke_python_recipes.py
Last active June 18, 2019 21:12
Nuke Python Recipes
import nuke, math
def get_closest_node(node):
# Return the closest node to node
distances = {}
for n in nuke.allNodes():
if n.name() == node.name():
continue
distance = math.sqrt(
math.pow( (node.xpos() - n.xpos()), 2 ) + math.pow( (node.ypos() - n.ypos()), 2 )
)
@jedypod
jedypod / daily_still_photos.py
Created December 20, 2018 04:13
Develop and process still photos using OpenImageIO
import OpenImageIO as oiio
from OpenImageIO import ImageInput, ImageOutput
from OpenImageIO import ImageBuf, ImageSpec, ImageBufAlgo
import os, sys
import shlex, subprocess
import glob
#--------------------------------------------
@jedypod
jedypod / FLog2Lin.nk
Last active June 23, 2019 02:39
Fuji F-Log Colorspace Transformations
set cut_paste_input [stack 0]
push $cut_paste_input
Group {
name FLog2Lin
label "\[value operation]"
selected true
xpos -40
ypos -952
addUserKnob {20 FLog2Lin}
addUserKnob {4 operation M {log2lin lin2log}}
@jedypod
jedypod / README.md
Last active February 29, 2024 20:33
Nuke ffmpeg Render

Nuke ffmpeg Render

Writeffmpeg is a python script and a node that allows you to render from Nuke directly into ffmpeg. Instead of a 2 step process where you render from Nuke to a temporary image sequence that you then transcode using ffmpeg, this solution writes to a single uint16 cache tiff file and this data gets piped into ffmpeg.

I've included a little screen recordingto help demo how it works.

Files

ffmpeg_render.py Writeffmpeg.nk

Dependencies

@jedypod
jedypod / ExposureBlend.nk
Last active December 5, 2023 20:31
Nuke node to automate the blending of multiple bracketed exposures into a single high dynamic range hdr image. Includes a script to sort the input nodes based on exposure time.
set cut_paste_input [stack 0]
push $cut_paste_input
Group {
name ExposureBlend
label "\[value brackets] Brackets"
addUserKnob {20 ExposureBlend_tab l ExposureBlend}
addUserKnob {7 time_th l "time threshold" t "threshold duration in seconds between exposure bracket sets" R 1 10}
time_th 2
addUserKnob {1 capture_time l "capture time" t "Enter the metadata key for the exposure capture time metadata key in your source images"}
capture_time exr/Exif:DateTimeOriginal