Skip to content

Instantly share code, notes, and snippets.

View KelSolaar's full-sized avatar
🔅
Bending Light

Thomas Mansencal KelSolaar

🔅
Bending Light
View GitHub Profile
@KelSolaar
KelSolaar / absolute_luminance_calibration.nkp
Created September 1, 2016 09:41
Nuke - Absolute Luminance Calibration
set cut_paste_input [stack 0]
version 9.0 v4
push $cut_paste_input
Group {
name Absolute_Luminance_Calibration
tile_color 0xffbf00ff
selected true
xpos -40
ypos 39
addUserKnob {20 absolute_luminance_calibration_tab l "Absolute Luminance Calibration"}
@KelSolaar
KelSolaar / CCT_D_uv_computation_from_SPD.py
Created August 25, 2016 22:04
CCT & D_uv Computation from Spectral Power Distribution
import colour
colour.filter_warnings()
XYZ = colour.spectral_to_XYZ(colour.ILLUMINANTS_RELATIVE_SPDS['D65']) / 100.0
UCS = colour.XYZ_to_UCS(XYZ)
uv = colour.UCS_to_uv(UCS)
CCT, D_uv = colour.uv_to_CCT_Ohno2013(uv)
print(CCT, D_uv)
@KelSolaar
KelSolaar / figure_1.png
Last active August 13, 2016 20:57
Vishal - Plotting Spds
figure_1.png
@KelSolaar
KelSolaar / keybase.md
Created July 10, 2016 21:10
Thomas Mansencal - keybase.io

Keybase proof

I hereby claim:

  • I am kelsolaar on github.
  • I am thomasmansencal (https://keybase.io/thomasmansencal) on keybase.
  • I have a public key whose fingerprint is 2331 CA52 9DDA 0A42 6B76 37E1 502D 5DCA A231 FF22

To claim this, I am signing this object:

@KelSolaar
KelSolaar / raytracing.py
Created June 7, 2016 07:30 — forked from rossant/raytracing.py
Very simple ray tracing engine in (almost) pure Python. Depends on NumPy and Matplotlib. Diffuse and specular lighting, simple shadows, reflections, no refraction. Purely sequential algorithm, slow execution.
import numpy as np
import matplotlib.pyplot as plt
w = 400
h = 300
def normalize(x):
x /= np.linalg.norm(x)
return x
@KelSolaar
KelSolaar / secondary_chromaticities_computation.py
Created March 4, 2016 08:23
Secondary Chromaticity Coordinates Computation
P = np.array(
[[0.6650, 0.3220],
[0.2950, 0.6070],
[0.1500, 0.0600]])
W = np.array([0.3127, 0.3290])
NPM = colour.normalised_primary_matrix(P, W)
NPM_i = np.linalg.inv(NPM)
@KelSolaar
KelSolaar / munsell_to_srgb.py
Last active February 20, 2022 17:27
Munsell Colour to sRGB
import numpy as np
import colour
xyY = np.asarray(colour.MUNSELL_COLOURS_REAL[2000][1])
# Munsell Renotation System uses C illuminant.
# Luminance is in range [0-100], so we need to scale it
# back to [0-1].
XYZ = colour.xyY_to_XYZ(xyY)
RGB = colour.XYZ_to_sRGB(
@KelSolaar
KelSolaar / dominant_wavelength.ipynb
Created January 4, 2016 10:29
Dominant Wavelength
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KelSolaar
KelSolaar / ACEScc_OECF.spi1d
Created December 16, 2015 02:00
Colour - Spi1d
Version 1
From 0 1
Length 1024
Components 1
{
-0.358447488584475
-0.015901280236606
0.041176345334171
0.074564615923278
0.098253970904947
@KelSolaar
KelSolaar / colorchecker_2005_-_conversion.ipynb
Created December 15, 2015 22:42
ColorChecker 2005 - Conversion
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.