gaffer / arnold acesCG workflow

278 views
Skip to first unread message

s.des...@gmail.com

unread,
Oct 5, 2021, 11:02:26 AM10/5/21
to gaffer-dev
Hello,

I didn't experiment yet but I'm wondering if you guys have any exemple or advices on how to render in ACES cg with gaffer/arnold ?
- Does it need development ?
- What is best practice ?
- Are there any specific node to use ?
- How do you set texture colorspace ?

Thx,

Seb

John Haddon

unread,
Oct 5, 2021, 1:34:28 PM10/5/21
to gaffer-dev
This isn't really my area, so hopefully someone a bit more colour savvy will come along to fill in the gaps. But this should be possible already, and the main starting point is to make a colour manager for Arnold from the node menu `/Arnold/Globals/Color Manager` section...

Aaron Powell

unread,
Oct 5, 2021, 1:37:02 PM10/5/21
to gaffe...@googlegroups.com
Seb,

The way we're doing it is adding an OpenColorIO node to the flow and setting the linear space to ACEScg and the narrow space to Output SRGB - you can set these based on what you need specifically. But that's really all you should need to do as long as you have the OCIO profile downloaded. You can either set the path to the OCIO profile in the node or set the `OCIO` environment variable and it will pick it up automatically.

Aaron

--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gaffer-dev/3b4ae421-18f5-434e-bb59-0eb680a51345n%40googlegroups.com.


--
Aaron Powell
Partner, Luna Digital, Ltd.

200 Anderson Avenue
Rochester, NY 14607

Aaron Powell

unread,
Oct 5, 2021, 1:37:36 PM10/5/21
to gaffe...@googlegroups.com
NOTE: The correct name is "Color Management" node. My apologies there.

Aaron Powell

unread,
Oct 5, 2021, 1:39:36 PM10/5/21
to gaffe...@googlegroups.com
Sorry to spam,

But to set the proper texture color space, simply type the name of the colorspace you need into the AiImage node under the color space parameter. For example, a standard 8-bit PNG would be set to 'texture_srgb', a normal map to 'raw' or something similar, etc, and it should work as expected. You can simply pull these values straight from the OCIO profile.

Sébastien Desmet

unread,
Oct 6, 2021, 3:31:16 AM10/6/21
to gaffe...@googlegroups.com
Thx Aaron for the infos ! I'm gonna test that !
It would be nice to have kind of a preset list on the aiImage colorspace text field. It will avoid syntax mistake and/or searching for correct colorspace name

Cheers,

Seb

John Haddon

unread,
Oct 6, 2021, 5:03:53 AM10/6/21
to gaffer-dev
On Wednesday, October 6, 2021 at 8:31:16 AM UTC+1 s.des...@gmail.com wrote:
It would be nice to have kind of a preset list on the aiImage colorspace text field. It will avoid syntax mistake and/or searching for correct colorspace name
 
This is a little bit tricky in general, because Arnold colour manager's are so configurable (they might not even be OCIO-based), and are part of the scene dataflow (so hard/ambiguous to discover from the shader node). But if you know you are using a manager based on the OCIO environment variable, then you can register this metadata from a startup file to add presets to the `aiImage` shader :

```
Gaffer.Metadata.registerValue( GafferArnold.ArnoldShader, "parameters.color_space", "presetNames", GafferImageUI.OpenColorIOTransformUI.colorSpacePresetNames )
Gaffer.Metadata.registerValue( GafferArnold.ArnoldShader, "parameters.color_space", "presetValues", GafferImageUI.OpenColorIOTransformUI.colorSpacePresetValues )
```

That would add them to the right-click presets submenu. If you want to replace the entire widget with a dropdown containing the presets you can use this :

```
Gaffer.Metadata.registerValue( GafferArnold.ArnoldShader, "parameters.color_space", "plugValueWidget:type", "GafferUI.PresetsPlugValueWidget )
```

Hope that helps...
Cheers...
John

Sébastien Desmet

unread,
Oct 6, 2021, 12:03:44 PM10/6/21
to gaffe...@googlegroups.com
Thx for the tips John,  I will try this

Seb

--
You received this message because you are subscribed to a topic in the Google Groups "gaffer-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gaffer-dev/CtAiYSkR02I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gaffer-dev/ed423e33-6d7b-4625-9b4e-7c3945d5058an%40googlegroups.com.

s.des...@gmail.com

unread,
Dec 7, 2021, 3:03:37 PM12/7/21
to gaffer-dev
Hello,

I have did some render test with ACES and I'm wondering if I have set up my gaffer script correctly.

So to test my aces workflow:
I did a render of my asset in maya with the OCIO /aces1.1 loaded in color management and I have set up all the colorspace for my texture following the arnold documentation.
After that, I have set up my gaffer script. OCIO is loaded when gaffer start. I also set up the colorspace for all my textures and try a render and it perfectly match the maya render. 

What I'm not sure is why I don't need the ArnoldColorManagment to make it work ? If I add the node and set the color space narrow to 'output - sRGB' and the color space linear to 'Aces - acescg', the render look wrong ! Am I missing something ? 

Actually it works but I'm not sure if it works like it should be !

Thx for your help,

Seb

Aaron Powell

unread,
Dec 7, 2021, 7:34:11 PM12/7/21
to gaffe...@googlegroups.com
Hey Seb!

Can you share an example of the "right" vs "wrong" renders? It sounds like something might be getting transformed twice or something.

If no ArnoldColorManager node is used, Arnold defaults to the OCIO color profile that ships with Arnold. If you're using a custom OCIO config, it might explain why your results are different when rendering with an ArnoldColorManager node vs without. If you could share a little more about how your OCIO install is configured, your Gaffer script, etc, I could help troubleshoot. If you haven't seen this before, the Arnold Node Reference docs have a nice writeup about the OCIO color manager in Arnold for more reading: https://docs.arnoldrenderer.com/display/A5NodeRef/color+managers.

Aaron


You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gaffer-dev/015e174e-09ec-44c8-a3a9-6e5aaac8d5a7n%40googlegroups.com.

s.des...@gmail.com

unread,
Dec 8, 2021, 2:17:08 PM12/8/21
to gaffer-dev
Hello Aaron,

So, there is a OCIO environment variable at gaffer startup who load aces1.1 . nothing special.
all my textures are using correct colorspace based on arnold documentation. (Utility - Raw, Utility - sRGB - Texture, ...)
on this link you can find a print screen of my settings on the arnoldColorManagment and 2 print screens: one is matching my render in maya (color management is disabled) and the other one is too dark (color management is enabled).
Like you said I have the feeling that the color management is applied twice.

thx for your help,

Seb

Aaron Powell

unread,
Dec 8, 2021, 2:21:47 PM12/8/21
to gaffe...@googlegroups.com
Out of curiosity, what happens when you point the ArnoldColorManager node to the OCIO config profile? When I was working on my Arnold for Blender plugin (and maybe even when I was configuring OCIO for Gaffer) I seem to remember that the OCIO color manager node acts erratically if it's not explicitly set, even if the OCIO variable is configured properly. Does setting the Config value in Gaffer change the render result?


s.des...@gmail.com

unread,
Dec 8, 2021, 5:14:38 PM12/8/21
to gaffer-dev
the render is exactly the same

Aaron Powell

unread,
Dec 9, 2021, 10:42:27 PM12/9/21
to gaffe...@googlegroups.com
I finally got a chance to download your images and A/B them - this doesn't appear to be a global color space issue. This might be a good thing. Everything is the same, except for the fur/textures on the bug. Is it possible there's something about the color space settings in those shaders that are causing an issue?

s.des...@gmail.com

unread,
Dec 10, 2021, 5:42:29 AM12/10/21
to gaffer-dev
Hello Aaron,

There is nothing special on the texture, I load them with aiimages and set the color space. 
there is maybe one thing that I have to investigate ! I have converted the textures to TX in maya. maybe the colorspace is baked in the tx and re-applied in gaffer a second time.. not sure at all of what I'm saying. I will give a test !

Seb

Sébastien Desmet

unread,
Dec 10, 2021, 8:00:28 AM12/10/21
to gaffe...@googlegroups.com
I confirm, the tx files are the problem ! If I use the original texture file everything is fine, If I use the tx file, the textures are not correct, I guess the color space is baked on the tx during the conversion.

s.des...@gmail.com

unread,
Dec 10, 2021, 9:23:00 AM12/10/21
to gaffer-dev
Hello,

So I made a test: 
I render one image of my asset with all the textures converted to TX. I also set all the textures colorspace to Utility - RAW and enable the ArnoldColorManagement. 
With these settings the render looks fine. 

I also render the same script with the unconverted  textures but with the correct colorspace and enable the ArnoldColorManagement. 
Both render looks the same now !

For you , what would be the best workflow to avoid any colorspace mishandling. The tx conversion seems to not be an issue in Maya. I guess maya manage tx files differently than gaffer ?!

Thx,

Seb

Aaron Powell

unread,
Dec 10, 2021, 10:03:38 AM12/10/21
to gaffe...@googlegroups.com
Huh, interesting! This post from Stephen on the Autodesk forum might help point you in the right direction though. https://forums.autodesk.com/t5/maya-shading-lighting-and/arnold-color-space-and-tx-files/td-p/6664027

As far as ensuring proper color management goes, there's nothing special I do personally. I haven't run into this issue because I don't use TX files explicitly, I use the original PNG/JPG/TIFF/EXR/etc. If you use the TX file, I'd just say remember to use Utility - Raw (it might actually be acescg, because that's the working scene linear space). This documentation page might shed more light on that for you. https://docs.arnoldrenderer.com/display/A5AFMUG/Maya+2017#Maya2017-ColorManagementandAutoTX

s.des...@gmail.com

unread,
Oct 13, 2022, 5:47:46 AM10/13/22
to gaffer-dev
Hello,

I'm back with OCIO. We have installed the latest gaffer release (1.1.1.0) and I checked one of my template and I see that the ArnoldColorManger node has an issue.
"color space narrow" and "colorspace linear" are turned red. I can't edit them anymore.
Do you know what can be the problem ?

Thx,

Seb

John Haddon

unread,
Oct 14, 2022, 12:59:35 PM10/14/22
to gaffe...@googlegroups.com
Hi Seb,
Looks like this is a bug that crept in when we updated to OpenColorIO 2. It should be fixed by this PR which I've just opened : https://github.com/GafferHQ/gaffer/pull/4911. It is just a UI bug, so in the meantime you should be able to set the value of those plugs via the scripting API...
Cheers...
John

Sébastien Desmet

unread,
Oct 17, 2022, 4:09:22 AM10/17/22
to gaffe...@googlegroups.com
Hi John,

Thx for the answer, can you show me the line of code that I should type to fix this ?

Thx,

Seb

John Haddon

unread,
Oct 17, 2022, 6:10:31 AM10/17/22
to gaffe...@googlegroups.com
Hi Seb,

The easiest thing to do might be to deploy the build from that PR, which you can find here : https://github.com/GafferHQ/gaffer/actions/runs/3251625887#artifacts. That's built using the same process as our official builds, and I don't think it will be long till we get the fix into an official release.

Alternatively, you can ignore the UI error and use the Python API to set the plugs to the values you want, like so :

```
root['ColorManagerOcio']['parameters']['color_space_narrow'].setValue( "sRGB" )
root['ColorManagerOcio']['parameters']['color_space_linear'].setValue( "linear" )
```

Cheers...
John

Reply all
Reply to author
Forward
0 new messages