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 / 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 / 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 / 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 / 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 / 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]
@sobotka
sobotka / here-be-dragons.diff
Created April 26, 2018 16:42
Half-float VSE hack
diff --git a/source/blender/alembic/intern/abc_object.cc b/source/blender/alembic/intern/abc_object.cc
index c8716d5..d0ed642 100644
--- a/source/blender/alembic/intern/abc_object.cc
+++ b/source/blender/alembic/intern/abc_object.cc
@@ -286,7 +286,7 @@ void AbcObjectReader::read_matrix(float r_mat[4][4], const float time,
has_alembic_parent = false;
}
else {
- has_alembic_parent = ixform_parent && schema.getInheritsXforms();
+ //has_alembic_parent = ixform_parent && schema.getInheritsXforms();
@sobotka
sobotka / gist:d6d86f72216c126a3711fdd05ef56598
Created April 19, 2018 18:07
half_float_hackeroonie_here_be_dragons.diff
diff --git a/source/blender/alembic/intern/abc_object.cc b/source/blender/alembic/intern/abc_object.cc
index c8716d5..d0ed642 100644
--- a/source/blender/alembic/intern/abc_object.cc
+++ b/source/blender/alembic/intern/abc_object.cc
@@ -286,7 +286,7 @@ void AbcObjectReader::read_matrix(float r_mat[4][4], const float time,
has_alembic_parent = false;
}
else {
- has_alembic_parent = ixform_parent && schema.getInheritsXforms();
+ //has_alembic_parent = ixform_parent && schema.getInheritsXforms();