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"
            else:
                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"
            else:
                # 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!

3 Likes

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)
    else:
        colorspace = monitorLut
4 Likes