Re: ImageBufAlgo make_texture colorspace change
Larry Gritz <l...@...>
Phrases like "looks lighter in Nuke" always make me suspicious, there are too many ways things can go wrong.
Let's start from first principles.
oiiotool -pattern fill:color=.5,.5,.5 256x256 3 -o gray.tif
oiiotool -stats gray.tif
That should report min/max/average all 0.5.
Now run your conversion script on gray.tif, and 'oiiotool -stats' the resulting exr. What is the value? It *should* be 0.214041 everywhere if the conversion happened properly. If that is the case, then the problem is about how it is read or displays in Nuke.
There was a time when OIIO would, in cases where an OCIO config found, have color conversions *only* depend on OCIO. Color names that were not installed color spaces in your OCIO configuration would be errors and no color transformation would happen. If your output exr has values 0.5, that's probably the problem -- your OCIO configuration simply has no sRGB or linear color spaces defined.
IIRC, newer OIIO actually is a little smarter, in that if an OCIO exists but doesn't know how to do the requested transformation, it will see if the conversion is one of a few that it knows how to do regardless, and sRGB <-> linear is among them. But it needs to be a relatively recent OIIO for it to do that, if OCIO doesn't define those spaces.