Skip to content

Instantly share code, notes, and snippets.

View UnaiM's full-sized avatar
🤓
Learning

Unai Martínez Barredo UnaiM

🤓
Learning
View GitHub Profile
@UnaiM
UnaiM / just_convert_everything_to_acescg.md
Last active February 11, 2024 23:09
An investigation on whether “respecting” plate colour in a VFX pipeline makes any real difference

“Just convert everything to ACEScg”

An investigation on whether “respecting” plate colour in a VFX pipeline makes any real difference

Motivation

Until 2020, I always had worked either without any real colour management, or in an environment where everything was converted to (and encoded in) ACEScg on ingest, effectively before anyone used it. But I always had a hunch that this solution wasn’t “pure”— if the Academy had devised another linear colour space (ACES2065–1) for archival, it had to have a reason.

@UnaiM
UnaiM / the-magic-of-kronos.md
Created November 7, 2023 09:20
Why my rolling shutter fix didn’t match with RollingShutter

The magic of Kronos

(AKA Why My Rolling Shutter Fix Didn’t Match with RollingShutter) – 20th December 2014
WARNING: doesn’t come to any solution.

My last post was about trying to recreate The Foundry’s RollingShutter plugin, using the new Kronos 2 technology instead of the old one, which the discontinued plugin was left with. And while the proposed solution benefitted from Regularized motion estimation, when switching back to Local it was clear that RollingShutter still won over it. So there’s something missing that I didn’t recreate, and have yet to figure out.


@UnaiM
UnaiM / rollingshutter-never-left-us.md
Created November 7, 2023 09:10
How to correct rolling shutter in NukeX without plugins

RollingShutter never left us

(AKA How to Correct Rolling Shutter in NukeX Without Plugins) – 11th December 2014

As you may know, The Foundry had a really good plugin for Nuke and After Effects called RollingShutter, used to try and remove the so-called effect that most of current cameras’ sensors introduce in the footage.

YouTube video by The Foundry titled ‘RollingShutter - an introduction’.
(VIDEO) RollingShutter - an introduction

Every other popular rolling shutter fix uses the “global skew” method mentioned in the video, even After Effects’ Warp Stabilizer and Rolling Shutter Repair in its default setting (the Pixel Motion mode suggests a more accurate approach). This method is fundamentally wrong unless the camera is just panning and nothing moves in the shot.

@UnaiM
UnaiM / support_etiquette.md
Last active August 22, 2023 21:11
Sometimes I wish this was in every company’s Wiki

Support Etiquette

# In this situation Don’t say this Because…
1 On a ticket whose status is New and with 0 comments Has anyone started looking into this? You can already see that the answer is ‘no’— this comment really is a rhetorical tactic to jump the queue, which is very disrespectful to everyone affected by other ongoing issues.
2 On an active ticket Can we bump the priority on this? The answer is always ‘no’— you’re talking to people, not the render farm; an issue is either active or it isn’t, and you can see its status. By saying this, you’re implying that the people working on it aren’t giving their 100% at work, which is disrespectful.
3 When a problem occurs This is really inconvenient / This isn’t an optimal situation to be in Comments like these are demoralising for everyone and don’t provide any helpful information.
4 When a problem occurs This shouldn’t take long for you to fix You’re implying that you know better about a technic
@UnaiM
UnaiM / plot_lut
Last active August 22, 2023 21:09
Given a LUT file, plot its luma EOTF to a tiny image
#! /usr/bin/env python
import argparse
import OpenImageIO as oiio
LUMA = (0.2126, 0.7152, 0.0722)
@UnaiM
UnaiM / on_dispatch.py
Last active August 22, 2023 21:04
Gaffer: trying to add the ability to modify the graph on dispatch
import os
import Gaffer
import GafferDispatch
# Add an 'onDispatch' task input to all task nodes.
tasknode_init_orig = GafferDispatch.TaskNode.__init__
@UnaiM
UnaiM / obs_props_update.lua
Created April 7, 2021 22:38
Example of a question in the OBS Discord community
local elapsed = 0
function script_properties()
local props = obslua.obs_properties_create()
obslua.obs_properties_add_bool(props, 'foo', 'Foo')
return props
end
function script_tick(seconds)
if elapsed then
class Item(object):
def __init__(self, name):
self.name = name
self.links = []
def __repr__(self):
return self.name
a, b, c, d, e, f, g, h = (Item(x) for x in 'abcdefgh')
@UnaiM
UnaiM / del_corrupted_refs.py
Created November 28, 2019 17:37
Script for Maya that deletes reference nodes that have been mysteriously corrupted (not showing anywhere, not pointing anywhere).
import maya.cmds as mc
refs = []
message = 'No corrupted references to delete.'
for ref in mc.ls(references=True):
try:
mc.referenceQuery(ref, filename=True)
except RuntimeError:
mc.lockNode(ref, lock=False)
refs.append(ref)
import re
from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
from shiboken2 import wrapInstance
import maya.cmds as mc
from maya.OpenMayaUI import MQtUtil