Skip to content

Instantly share code, notes, and snippets.

View rafaelperez's full-sized avatar
🏠
Available

Rafael Silva rafaelperez

🏠
Available
View GitHub Profile
#! /home/vfx/Nuke11.1v1/libnuke-11.1.1.so -nx
version 11.1 v1
define_window_layout_xml {<?xml version="1.0" encoding="UTF-8"?>
<layout version="1.0">
<window x="1920" y="25" w="1920" h="2107" screen="0">
<splitter orientation="1">
<split size="1214"/>
<splitter orientation="2">
<split size="1102"/>
<dock id="" activePageId="Viewer.1">

Keybase proof

I hereby claim:

  • I am rafaelperez on github.
  • I am rafaelperez (https://keybase.io/rafaelperez) on keybase.
  • I have a public key ASAtwjZ9s7W16aOcHyb28V1x_KqK-_eRH6-ySW5IiysWaQo

To claim this, I am signing this object:

#----------------------------------------------------------------------------------------------------------
# Wouter Gilsing
# [email protected]
# May 2016
# v1.1
#----------------------------------------------------------------------------------------------------------
import nuke
import operator
set cut_paste_input [stack 0]
version 10.5 v8
push $cut_paste_input
Group {
name DegrainHelper
help "If you need some extra detail to work with, you can use this to reintroduce luminance grain to your degrained plate.\n\nThe degrained plate has to be completely degrained.\n\nThe slider controls how much luminance grain will be present in the output."
tile_color 0x7f7f7fff
xpos -260
ypos -178
addUserKnob {20 User}
#pragma once
// CLI11: Version 1.8.0
// Originally designed by Henry Schreiner
// https://github.com/CLIUtils/CLI11
//
// This is a standalone header file generated by MakeSingleHeader.py in CLI11/scripts
// from: v1.8.0
//
// From LICENSE:
Gizmo {
name X_Aton1
knobChanged "n = nuke.thisNode()\nif n\[\"use_3d\"].value()==1:\n n\[\"center\"].setEnabled(False)\nelse:\n n\[\"center\"].setEnabled(True)\nn\[\"iterations\"].setValue(int(n\[\"iterations\"].value()))\nif n\[\"mode\"].value()==\"Diffuse\":\n n\[\"diffuse\"].setEnabled(True)\nelse:\n n\[\"diffuse\"].setEnabled(False)\nn\[\"diffuse\"].setValue(max(n\[\"diffuse\"].value(),0))\nn\[\"iterations\"].setValue(max(n\[\"iterations\"].value(),1))"
addUserKnob {20 X_Aton}
addUserKnob {41 "Local GPU: " T BlinkScript1.gpuName}
addUserKnob {41 "Use GPU if Available" T BlinkScript1.useGPUIfAvailable}
addUserKnob {26 ""}
addUserKnob {12 center t "The point from which rays will be emitted."}
center {960 540}
addUserKnob {6 use_3d l "use 3d input" t "Use a <b>3D light</b> and a <b>3D camera</b> to calculate the center of the light. When enabled the <b>center</b> parameter will be disabled. Make sure both inputs (Light and Camera) are connected in order for this to work properly." -STAR
@rafaelperez
rafaelperez / turbo_colormap.glsl
Created March 4, 2020 11:24 — forked from mikhailov-work/turbo_colormap.glsl
Turbo Colormap Polynomial Approximation in GLSL
// Copyright 2019 Google LLC.
// SPDX-License-Identifier: Apache-2.0
// Polynomial approximation in GLSL for the Turbo colormap
// Original LUT: https://gist.github.com/mikhailov-work/ee72ba4191942acecc03fe6da94fc73f
// Authors:
// Colormap Design: Anton Mikhailov ([email protected])
// GLSL Approximation: Ruofei Du ([email protected])
@rafaelperez
rafaelperez / PlanarProjection.nk
Created May 12, 2020 15:09 — forked from jedypod/PlanarProjection.nk
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
# Add the following lines to your `menu.py`
nuke.menu('Nuke').addCommand("Viewer/Uprez", "nuke.activeViewer().node().knob('downrez').setValue(str(nuke.activeViewer().node().knob('downrez').getValue()-1))", "Alt+z")
nuke.menu('Nuke').addCommand("Viewer/Downrez", "nuke.activeViewer().node().knob('downrez').setValue(str(nuke.activeViewer().node().knob('downrez').getValue()+1))", "Alt+x")
# Add the following lines to your menu.py to adjust the zoom shortcut on Nuke's nodegraph
# Fell free to play with the zoom values so they fit your workflow/setup.
nuke.menu('Nuke').addCommand("Viewer/Zoom 1", "nuke.zoom(0.85)", "Alt+1", shortcutContext = 2)
nuke.menu('Nuke').addCommand("Viewer/Zoom 2", "nuke.zoom(0.20)", "Alt+2", shortcutContext = 2)
nuke.menu('Nuke').addCommand("Viewer/Zoom 3", "nuke.zoom(0.03)", "Alt+3", shortcutContext = 2)