How do I set the color space pin on an image node to linear sRGB + legacy gamma
Spent hours on this, getting nowhere, thanks for your help.
FYI, this runs, but appears to do nothing, I would prefer to set the pin value without actually creating a colorspace node and connecting it.
-- OCIO Color Space Node
print("Creating Color Space Node")
nodeColorSpace = octane.node.create{ type = octane.NT_OCIO_COLOR_SPACE, name = "OCIO Color Space", position = { 900, 200 } }
--nodeColorSpace:setPinValue(octane.P_COLOR_SPACE, 2, true)
nodeColorSpace:setAttribute(octane.A_OCIO_COLOR_SPACE_NAME , "Linear sRGB", true)
Setting color space pin value
Windows 11, 2x Intel I9, 64GB Ram, 2x GTX 1080 TI, 1 x RTX 380 TI, Oculus Quest 2
Hi,
I have not tried, but, by default, the OCIO pin is set to None (sRGB) in the NT_IMAGER_CAMERA node, while the Linear color space is chosen in the Response curve popup: So, try to only change the P_RESPONSE pin to Linear/off, in the NT_IMAGER_CAMERA node, without creating the NT_OCIO_COLOR_SPACE node.
ciao,
Bppe
I have not tried, but, by default, the OCIO pin is set to None (sRGB) in the NT_IMAGER_CAMERA node, while the Linear color space is chosen in the Response curve popup: So, try to only change the P_RESPONSE pin to Linear/off, in the NT_IMAGER_CAMERA node, without creating the NT_OCIO_COLOR_SPACE node.
ciao,
Bppe
Something like this:MB wrote:I would prefer to set the pin value without actually creating a colorspace node and connecting it.
Code: Select all
local nodeImage = octane.project.getSelection()[1]
local nodeColorSpace = nodeImage:getConnectedNode(octane.pinId.P_COLOR_SPACE, false)
nodeColorSpace:setAttribute(octane.attributeId.A_COLOR_SPACE, octane.namedColorSpace.LINEAR_SRGB)
If the P_COLOR_SPACE might be nil you will need to create the node in advance. You can't use `setPinValue` on the image node because this is not a value type, it's more complex than a simple enum. (A hint is that it doesn't have a single A_VALUE attribute).
Thank you all, that worked well.
Windows 11, 2x Intel I9, 64GB Ram, 2x GTX 1080 TI, 1 x RTX 380 TI, Oculus Quest 2