Filmic in NUKE

Saturday, July 1, 2017
Updated Sunday, July 15, 2018

Two Ways:

1 - Environment Variable

Set-up an environment variable called OCIO that will point to the config_02.ocio file.
If you don't really know how to do that, download this little .bat file, edit it, change the path to point to the config_02.ocio file then double click on it.
If you also use Houdini you will be all set at this point too.
Then, when you load NUKE you will just have to change the color management to OCIO (see image below).
Go to step 3.

2 - Custom Set-Up

In NUKE, you can hit the S key to go in the Project Settings.

When you switch from one config to another you'll sometimes need to save ans reload NUKE, I usually get errors...

 

3 - Use It

Display the scene linear data through the View Transform:

You can choose between the different Filmic looks like "Filmic Base Contrast", "Filmic Medium High Contrast" and so on... It is up to you.

Render what we see in the View to a display referred file (sRGB):

A View Transform is just here to bend the data in the View but not in the file. Now we have to bake the data in the file to render it properly.
To do that you'll have to create two nodes in NUKE:

OCIO Colorspace:

OCIO FileTransform:

This process is exactly replicating what the Filmic Base Contrast is doing in the View Transform but on the data.

I simplified it in just one node where you can set the path to the looks folder and choose between the different levels of contrast (copy paste those lines in NUKE):


Group {
 name bakeOCIO1
 selected true
 xpos 480
 ypos 549
 addUserKnob {20 controls l Controls}
 addUserKnob {2 looksFolder l "looks Folder"}
 looksFolder /X/Softwares/OCIO/filmic-blender-dev-extra/looks
 addUserKnob {4 filmicContrast l "Filmic Contrast" M {"Very Low" Low "Medium Low" Base "Medium High" High "Very High"}}
 filmicContrast Base
 addUserKnob {52 dd +STARTLINE}
}
 Input {
  inputs 0
  name Input1
  xpos 1200
  ypos 339
 }
 OCIOColorSpace {
  in_colorspace Linear
  out_colorspace "Filmic Log Encoding"
  name OCIOColorSpace1
  tile_color 0x5361dbff
  xpos 1200
  ypos 409
 }
set N7fc60000 [stack 0]
 OCIOFileTransform {
  file "\[value parent.looksFolder]/Filmic_to_1.20_1-00.spi1d"
  working_space Linear
  name OCIOFileTransform7
  tile_color 0xba50b5ff
  xpos 1740
  ypos 549
 }
push $N7fc60000
 OCIOFileTransform {
  file "\[value parent.looksFolder]/Filmic_to_0.99_1-0075.spi1d"
  working_space Linear
  name OCIOFileTransform6
  tile_color 0xba50b5ff
  xpos 1560
  ypos 549
 }
push $N7fc60000
 OCIOFileTransform {
  file "\[value parent.looksFolder]/Filmic_to_0-85_1-011.spi1d"
  working_space Linear
  name OCIOFileTransform5
  tile_color 0xba50b5ff
  xpos 1380
  ypos 549
 }
push $N7fc60000
 OCIOFileTransform {
  file "\[value parent.looksFolder]/Filmic_to_0-70_1-03.spi1d"
  working_space Linear
  name OCIOFileTransform4
  tile_color 0xba50b5ff
  xpos 1200
  ypos 549
 }
push $N7fc60000
 OCIOFileTransform {
  file "\[value parent.looksFolder]/Filmic_to_0-60_1-04.spi1d"
  working_space Linear
  name OCIOFileTransform3
  tile_color 0xba50b5ff
  xpos 1020
  ypos 549
 }
push $N7fc60000
 OCIOFileTransform {
  file "\[value parent.looksFolder]/Filmic_to_0-48_1-09.spi1d"
  working_space Linear
  name OCIOFileTransform2
  tile_color 0xba50b5ff
  xpos 840
  ypos 549
 }
push $N7fc60000
 OCIOFileTransform {
  file "\[value parent.looksFolder]/Filmic_to_0-35_1-30.spi1d"
  working_space Linear
  name OCIOFileTransform1
  tile_color 0xba50b5ff
  xpos 660
  ypos 549
 }
 Switch {
  inputs 7
  which {{parent.filmicContrast}}
  name Switch1
  xpos 1200
  ypos 689
 }
 Output {
  name Output1
  xpos 1200
  ypos 829
 }
end_group


Here is a little sum up of the process in one image: