Skip to content

Instantly share code, notes, and snippets.

@jedypod
jedypod / _Dockerfile
Last active September 22, 2019 02:49
Compile Krita 4.2.5 on Centos 7.6 using Docker
# Dockerfile
FROM centos
LABEL maintainer="JED"
ENV HOME /root
WORKDIR $HOME
RUN yum update -y && yum clean all
@jedypod
jedypod / CornerPinOffset
Created August 3, 2019 00:57
CornerPin node with offset controls for each corner. Useful for tweaking cornerpin after all keyframes are baked (e.g. , from a tracker), in case you need to cheat the perspective or something else.
set cut_paste_input [stack 0]
push $cut_paste_input
Group {
name CornerPinOffset
tile_color 0x9073adff
addUserKnob {20 PinControl}
addUserKnob {26 CornerPinControls l "" +STARTLINE T "<font size=5><b>Corner Pin Data</b></font>"}
addUserKnob {20 CornerPinData l "" +STARTLINE n 1}
addUserKnob {41 to1 T cpMaster.to1}
addUserKnob {41 enable1 -STARTLINE T cpMaster.enable1}
@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
@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 / 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 / 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 / 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 / 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 / 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 / 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 ""}