Using ACES shaper spaces in OCIO bakelut

Tags: #<Tag:0x00007fc5255bc6f0>

Hi to all,

I have a need to bake some ACES transforms into various LUT formats, and wish to correctly handle values >1.0.
So, I’m hoping to use ociobakelut and one of the ACES shaper spaces to achieve this (employing ACES 1.0.3 ocio config)

Something along the lines of:

./ociobakelut.exe -v --inputspace acescg --outputspace out_srgb --shaperspace "crv_lmtshaper" --format cinespace /c/tmp/acescg_to_srgb.csp

However, every space I’ve tried as a shaper (other than “Role - data”) results in:

OCIO Error: Error baking cinespace:The specified shaperSpace, 'crv_lmtshaper' has channel crosstalk, which is not appropriate for shapers. Please select an alternate shaper space or omit this option.

Has any one else attempted this? Any recommendations for a suitable shaper space? I’m aware there’s a handy selection of pre-baked LUTs in the OCIO config, but I’d really like to be able to create my own.

thanks

The command line used to generate the csp files for ACEScg input looks like this:
ociobakelut --iconfig aces_1.0.3/config.ocio -v --inputspace “ACES - ACEScg” --outputspace “Output - sRGB” --description “ACES 1.0 Output - sRGB for ACEScg data” --shaperspace “Utility - Log2 48 nits Shaper - AP1” --shapersize 4096 --cubesize 65 --format cinespace “aces_1.0.3/baked/maya/sRGB for ACEScg Maya.csp”

The variants on the shaper that include ‘- AP1’ are there to avoid the issue that you’re running into.

Hope that helps,
HP

Thanks - that’s just what I need. Makes perfect sense.

Unfortunately I’ve not been able to employ my LUT successfully yet…

ffmpeg is my current target - I’d like to bake in the acescg->srgb transformation when creating mxfs (from exrs) for editorial.
I’ve been able to apply the generated LUTs, but highlights appear clipped - leading me to think either ffmpeg doesn’t support processing >1.0 values through a LUT, or that I’m tripping up when composing my arguments for ffmpeg.

From my research Flame format 3dl LUTs provide the only intersection of “LUT formats supported by ffmpeg” and “LUT+shaper formats supported by ociobakelut”, so that’s what I’m using currently.
The 3dl LUT I have appears correct when applied in Nuke.

So if any one has any suggestions of how to tackle this in ffmpeg, that would be most appreciated.

thanks
Ben

sample of current ffmpeg command:
ffmpeg -start_number 1 -r 25 -y -i input.%04d.exr -c:v dnxhd -pix_fmt yuv422p -b:v 120M -vf lut3d='C\:/tmp/acescg_to_srgb.3dl' out.mxf

.3dl is an integer LUT format, so I am not sure if it can support >1 input (or output) values. I am not certain though, as I cannot find a spec for the .3dl format anywhere. And there are a number of variations on the format in use, anyway. I’m pretty sure that the Flame variant is integer only.

Unclamped float input is supported by the Resolve and Adobe/Iridas variants of the .cube LUT format, and also by Truelight .cub files and Nucoda .cms files (since V3). There may be others, but many LUT formats certainly clamp input to the 0-1 range.

Thanks Nick.

I had a quick look at .cube, but ociobakelut doesn’t seem to want to generate those for me.
Help suggests my choices are limited to:

--format %s the lut format to bake: flame (.3dl), lustre (.3dl), cinespace (.csp), houdini (.lut), iridas_itx (.itx), icc (.icc)

The options at the ffmpeg end are (taken from the ffmpeg docs https://ffmpeg.org/ffmpeg-filters.html#lut3d-1):

file
Set the 3D LUT file name.

Currently supported formats:

‘3dl’
AfterEffects

‘cube’
Iridas

‘dat’
DaVinci

‘m3d’
Pandora

So possibly I should be looking at generating a csp from ociobakelut and translating that to cube by hand?
Or are there other approaches to get around this in ffmpeg - maybe using some chain of LUTs to go acescg->log->out_srgb?

That would be the simplest alternative. You still need to find a 1D LUT format that ffmpeg supports, and which allows unclamped float input.

Most production pipelines that I’ve seen isolate ffmpeg from any real color space processing. Nuke, oiiotool, RV or your image processing packag of choice is used to apply the LUT and convert from EXR to TGA/Tiff/your 8 or 16 bit int uncompressed format of choice. ffmpeg is then only responsible for encoding the quicktime / movie format using those 8 bit frames as a starting point.

One command-line option that is helpful in preserving the colorspace of the input images is:
-vf colormatrix=bt601:bt709

Hope that helps,
HP

Thanks again. That’s useful info to hear.

We’re moving away from RVIO for licensing reasons, and where hoping that ffmpeg would be a one stop shop.
Pre-converting might be the way to go.

cheers

Hi to all,
I’ve found this pretty old topic and wanted to know if you managed to find a way to convert the color space using FFmpeg?
Thank you.
Cheers,
Andriy