Oh my, you are right about the inverse. In fact, at an internal place I had 
reversed the order of the inverse and unpremult parameters as passed by python. 
Also had called it "invert" in some places instead of the correct "inverse".

I will have a patch forthcoming as soon as I also fix the other thing you 
report, which is that for filetransform, there is no need to issue an error 
message for missing config.

        -- lg


> On Oct 16, 2019, at 7:27 PM, Haarm-Pieter Duiker <l...@duikerresearch.com> 
> wrote:
> 
> Hello,
> 
> I'm running into what appears to be a regression. The ImageBufAlgo 
> ociotransform used to work with only a LUT specified. It now seems to require 
> that the OCIO environment variable points to a valid config, even if the LUT 
> has nothing to do with the specified config. This issue shows up when using 
> that operation from the oiiotool command line or via the Python bindings.
> 
> Secondarily, the invert options does seem to work for the Python bindings of 
> the ociotransform operation. It works when called from oiiotool, so the 
> problem would seem to be isolated to the Python bindings.
> 
> Results and reproduction notes below.
> 
> Does this sound familiar to anyone? Any help would be appreciated,
> HP
> 
> 
> export OCIO_LOGGING_LEVEL=debug
> 
> # This breaks
> oiiotool test.exr --ociofiletransform /full/path/to/lut.csp -o test_lut.exr 
> [OpenColorIO Info]: Color management disabled. (Specify the $OCIO environment 
> variable to enable.)
> [OpenColorIO Debug]: This .ocio config has no environment section defined. 
> The default behaviour is to load all environment variables (0), which reduces 
> the efficiency of OCIO's caching. Considering predefining the environment 
> variables used.
> oiiotool ERROR: ociofiletransform : Could not construct the color transform
> Full command line was:
> > oiiotool test.exr --ociofiletransform /full/path/to/lut.csp -o test_lut.exr
> 
> # Now set OCIO to something
> export 
> OCIO=/path/to/Nuke12.0v1.app/Contents/Resources/OCIOConfigs/configs/aces_1.1/config.ocio
> 
> # This works
> oiiotool test.exr --ociofiletransform /full/path/to/lut.csp -o test_lut.exr
> [OpenColorIO Debug]: This .ocio config  
> '/path/to/Nuke12.0v1.app/Contents/Resources/OCIOConfigs/configs/aces_1.1/config.ocio'
>  has no environment section defined. The default behaviour is to load all 
> environment variables (0), which reduces the efficiency of OCIO's caching. 
> Considering predefining the environment variables used.
> [OpenColorIO Debug]: Opening /full/path/to/lut.csp
> [OpenColorIO Debug]:     Loaded primary format cinespace
> [OpenColorIO Debug]: GPU Ops: Pre-3DLUT
> [OpenColorIO Debug]: GPU Ops: 3DLUT
> [OpenColorIO Debug]: Optimizing Op Vec...
> [OpenColorIO Debug]:     Op 0: <FileNoOp>  supports_gpu:1
> [OpenColorIO Debug]:     Op 1: <Lut1DOp>  supports_gpu:0
> [OpenColorIO Debug]:     Op 2: <Lut3DOp>  supports_gpu:0
> [OpenColorIO Debug]: Optimized 3->2, 1 passes, 1 noops removed, 0 inverse ops 
> removed
> [OpenColorIO Debug]: 0 ops combines
> [OpenColorIO Debug]:     Op 0: <Lut1DOp>  supports_gpu:0
> [OpenColorIO Debug]:     Op 1: <Lut3DOp>  supports_gpu:0
> [OpenColorIO Debug]: GPU Ops: Post-3DLUT
> [OpenColorIO Debug]: CPU Ops
> [OpenColorIO Debug]: Optimizing Op Vec...
> [OpenColorIO Debug]:     Op 0: <FileNoOp>  supports_gpu:1
> [OpenColorIO Debug]:     Op 1: <Lut1DOp>  supports_gpu:0
> [OpenColorIO Debug]:     Op 2: <Lut3DOp>  supports_gpu:0
> [OpenColorIO Debug]: Optimized 3->2, 1 passes, 1 noops removed, 0 inverse ops 
> removed
> [OpenColorIO Debug]: 0 ops combines
> [OpenColorIO Debug]:     Op 0: <Lut1DOp>  supports_gpu:0
> [OpenColorIO Debug]:     Op 1: <Lut3DOp>  supports_gpu:0
> 
> 
> Tested with
> OpenImageIO.VERSION = 10813
> OpenImageIO.VERSION = 20008L
> 
> opencolorio-1.1.0
> 
> https://github.com/OpenImageIO/oiio/blob/master/src/libOpenImageIO/color_ocio.cpp#L281
>  
> <https://github.com/OpenImageIO/oiio/blob/master/src/libOpenImageIO/color_ocio.cpp#L281>
> https://github.com/OpenImageIO/oiio/blame/d71ac830c966fcc2bc05349e1eebc0b883a352f3/src/libOpenImageIO/color_ocio.cpp#L281
>  
> <https://github.com/OpenImageIO/oiio/blame/d71ac830c966fcc2bc05349e1eebc0b883a352f3/src/libOpenImageIO/color_ocio.cpp#L281>
> 
> 
> 
> Example script that exercises the functionality
> https://github.com/hpd/general/blob/master/hdr/python/mkhdr.py 
> <https://github.com/hpd/general/blob/master/hdr/python/mkhdr.py>
> 
> Example lut
> https://github.com/hpd/general/blob/master/hdr/curves/thetas.spi1d 
> <https://github.com/hpd/general/blob/master/hdr/curves/thetas.spi1d>
> 
> Example command line
> python mkhdr.py -r /path/to/thetas.spi1d —I /path/to/a.jpg -o /path/to/b.exr 
> -b 0
> 
> 
> 
> _______________________________________________
> Oiio-dev mailing list
> Oiio-dev@lists.openimageio.org
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

--
Larry Gritz
l...@larrygritz.com




_______________________________________________
Oiio-dev mailing list
Oiio-dev@lists.openimageio.org
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to