Skip to content

Instantly share code, notes, and snippets.

@sobotka
sobotka / MMLUT.spi1d
Last active April 20, 2022 05:01
MM LUT from Captain Fried
Version 1
From 0.0 10.0
Length 4096
Components 1
{
0.0000000000
0.0000191362
0.0001060989
0.0002921250
0.0005740942
@sobotka
sobotka / alexa_stanza
Last active February 25, 2022 06:24
Arri Wide Gamut to REC.709
- !<ColorSpace>
name: Alexa Wide Gamut LogC
family: ""
equalitygroup: ""
bitdepth: 32f
description: |
LogC Arri Wide Gamut to REC.709 Primaries
isdata: false
allocation: uniform
allocationvars: [0, 1]
@sobotka
sobotka / Log2
Last active December 15, 2021 22:55
def open_domain_to_normalized_log2(
in_od,
in_middle_grey=0.18,
minimum_ev=-6.0,
maximum_ev=+7.0
):
total_exposure = maximum_ev - minimum_ev
in_od = numpy.asarray(in_od)
in_od[in_od <= 0.0] = numpy.finfo(numpy.float).eps
@sobotka
sobotka / bare-bones-ocio-configuration.py
Created March 23, 2020 16:33
Bare Bones OpenColorIO Configuration Generation via Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import PyOpenColorIO
import numpy
import colour
from colour import (
io,
adaptation,
models
@sobotka
sobotka / stanza.snippet
Created September 3, 2021 21:24
Artificial Image Reconstruction to Filmic Working Space
- !<ColorSpace>
name: Reconstructed Filmic
family: log
equalitygroup:
bitdepth: 32f
description: |
Use to reconstruct generic imagery to work with Filmic
isdata: false
@sobotka
sobotka / FFMPEG.txt
Created January 11, 2018 00:44
BT.709 encoding
ffmpeg -i file.dpx -vf scale=out_color_matrix=bt709 -movflags write_colr -color_primaries bt709 -color_trc bt709 -colorspace bt709 -codec prores output.mov
@sobotka
sobotka / stuffs.py
Created July 12, 2020 21:09
Film Like Curve Bezier Stuffs
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy
import math
# Return value as scalar or array. Shamelessly borrowed from
# Colour-science.org.
def as_numeric(obj, as_type=numpy.float64):
@sobotka
sobotka / window-sample.py
Last active May 10, 2020 20:14
Minimal pyglet with OpenImageIO
#!/usr/bin/env python
import OpenImageIO
import pyglet
import glooey
if __name__ == "__main__":
window = pyglet.window.Window()
batch = pyglet.graphics.Batch()
ui = pyglet.graphics.OrderedGroup(100)
@sobotka
sobotka / gist:d8aa79b2b9909b9367002fa99aeafdd2
Created December 14, 2019 23:38
Fucking Shitty Houdini Shit
- !<ColorSpace>
name: Filmic Log Encoding - Base Contrast
family:
equalitygroup:
bitdepth: 32f
description: |
Log based filmic shaper with 16.5 stops of latitude, and 25 stops of dynamic range.
isdata: false
allocation: lg2
allocationvars: [-12.473931188, 12.526068812]
@sobotka
sobotka / Alexa Filmic Transform
Last active December 11, 2018 00:38
Alexa Filmic Transform from Arri Wide Gamut LogC to Scene Referred Arri Wide Gamut
- !<ColorSpace>
name: Alexa Filmic Log
family: log
equalitygroup:
bitdepth: 32f
description: |
Log based filmic shaper with 16.5 stops of latitude, and 25 stops of dynamic range
isdata: false
allocation: lg2
allocationvars: [-12.473931188, 12.526068812]