What to do when publish from ACES Nuke script fails with Error Invalid LUT selected : Gamma2.2

What can you do if you are working in an ACES color management project and when you use the default toolkit publishing it fails with an error Invalid LUT selected : Gamma2.2

1 Like

So the issue you are seeing is because there is an app that creates the quicktime that is a part of the toolkit publishing from Nuke called tk-multi-reviewsubmission, and by default it will create a QT that works with Nukes standard color model.

So since you are using ACES (I’m assuming the ICIO model), we just need to change the colorspace setting in the tk-multi-reviewsubmission app by taking over and adding it into the codec_settings.py hook.

I’m not sure what codec would work best for your usage, but I’m using the Output - sRGB Codec as an example, you may need to change based on your color workflow. So in the codec_settings.py hook add the setting settings["colorspace"] = "Output - sRGB" to where it makes sense for your setup. (I’ve just added it everywhere)

        settings = {}
        if sys.platform in ["darwin", "win32"]:
            settings["file_type"] = "mov"
            if nuke.NUKE_VERSION_MAJOR >= 9:
                # Nuke 9.0v1 changed the codec knob name to meta_codec and added an encoder knob
                # (which defaults to the new mov64 encoder/decoder).                  
                settings["meta_codec"] = "jpeg"
                settings["mov64_quality_max"] = "3"
                settings["colorspace"] = "Output - sRGB"
                settings["codec"] = "jpeg"
                settings["colorspace"] = "Output - sRGB"

        elif sys.platform == "linux2":
            if nuke.NUKE_VERSION_MAJOR >= 9:
                # Nuke 9.0v1 removed ffmpeg and replaced it with the mov64 writer
                # http://help.thefoundry.co.uk/nuke/9.0/#appendices/appendixc/supported_file_formats.html
                settings["file_type"] = "mov64"
                settings["mov64_codec"] = "jpeg"
                settings["mov64_quality_max"] = "3"
                settings["colorspace"] = "Output - sRGB"
                # the 'codec' knob name was changed to 'format' in Nuke 7.0
                settings["file_type"] = "ffmpeg"
                settings["format"] = "MOV format (mov)"
                settings["colorspace"] = "Output - sRGB"

        return settings

Now if you got all that right then when you publish in Nuke the QT will be made in an ACES compatible colorspace!


We had the same issue with tk-nuke-quickreview FYI. In that scenario we ended up taking over the settings.py hook to set the output colorspace of the write node to something more sensible. In our case, since we wanted the OCIO profile to determine the appropriate colorspace we had to query for it like this:

    monitorLut = nuke.Root().knob("monitorLut").value()
    colorManagement = nuke.Root().knob("colorManagement").value()
    if colorManagement == 'OCIO':
        # OCIO displays either come in the form of view/display or display with an implicit 'default' view
        displayView = monitorLut.split('/')
        view = displayView.pop()
        display = displayView and displayView[0] or 'default'
        colorspace = nuke.Root().getOCIOColorspaceFromViewTransform(display, view)
        colorspace = monitorLut

Hey chaps, I’m struggling to get this working.

I’ve taken over the hook and brought it into the config by adding this line in the tk-multi-reviewsubmission.yml:

render_media_hook: '{self}/render_media.py:{config}/tk-multi-publish2/tk-nuke/render_media.py'

then added settings["colorspace"] = "matte_paint" to the render_media.py as outlined above:

Nuke doesn’t seem to pick this up and still tries to render the QT with gamma2.2.

Any ideas on what could be going wrong?



Hi Steve,

Did you ever get this sorted?
I am having the same issue, tries to render in Gamma2.2 but fails.
Seems if I change the working colorspace to nuke-default it will work, but this means we cannot render in ACES so its not really a solution, just another cookie crumb to try and follow