Skip to content

Instantly share code, notes, and snippets.

@donmccurdy
Created December 13, 2023 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donmccurdy/ca1d7cbb107435b40fa510f783f91ee8 to your computer and use it in GitHub Desktop.
Save donmccurdy/ca1d7cbb107435b40fa510f783f91ee8 to your computer and use it in GitHub Desktop.
Applies tone mapping (display transform + look) to source OpenEXR images using Blender's AgX OCIO config.
#!/usr/bin/env bash
OCIO="/Applications/Blender 4.0.app/Contents/Resources/4.0/datafiles/colormanagement/config.ocio"
OCIO_LOOK="AgX - Base Contrast"
# Source: https://github.com/sobotka/Testing_Imagery
declare -a arr=(
"blue_bar_709"
"Matas_Alexa_Mini_sample_BT709"
"mery_lightSaber_lin_srgb"
"red_xmas_rec709"
"Sweep_sRGB_Linear_Half_Zip"
)
for i in "${arr[@]}"
do
echo "$i"
oiiotool --colorconfig "$OCIO" -i "$i.exr" --colorconvert "Linear Rec.709" "sRGB" --ociolook "$OCIO_LOOK" --resize 50% -o ./out/"$i"_standard.jpg
oiiotool --colorconfig "$OCIO" -i "$i.exr" --colorconvert "Linear Rec.709" "AgX Base sRGB" --ociolook "$OCIO_LOOK" --resize 50% -o ./out/"$i"_agx.jpg
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment