Re: combining a File-Based LUT Transform and a Display Transform?

Jeremy Selan <jeremy...@...>

New thought - one workaround for the moment would be to dynamically add a new colorspace for the user specified lut.

This is definitely not ideal (I'd much rather extend DisplayTransform), but this will work in the existing codebase.


# When the user lut is selected...
config = OCIO.GetCurrentConfig().createEditableCopy()
colorspace = OCIO.ColorSpace(name='user')
t = OCIO.FileTransform('/absolute/path/to/yourlut.lut', interpolation=OCIO.Constants.INTERP_LINEAR)
colorspace.setTransform(t, OCIO.Constants.COLORSPACE_DIR_FROM_REFERENCE)
colorspace.addColorSpace(colorspace)   # this will overwrite 'user', if it already exists.

# Add a fake  user display / user view.  (Ugh)
config.addDisplay('user', 'user', 'user', '')


# And then when the display transform is used, just do it normally.
Specify as inputColorSpace ROLE_REFERENCE.   And then specify display / view as 'user' / 'user'.  The lut will be applied.

On Thu, Dec 15, 2011 at 11:05 AM, Jeremy Selan <jeremy...@...> wrote:
I've just add the Mari source for the OCIO integration to the repo (with permission from the Foundry, of course) ;)

As far as I can tell,  they do not do any special channel swizzle handling when in 'simple LUT mode'. (my terminology).

I think this will be a common integration request in the future:  "to utilize OCIO for the convenience of DisplayTransform + Lut loading, but to optionally allow the user to not worry about creating a full OCIO config."

I think it would be easy to provide a new option to DisplayTransform to allow for this possibility - let me look into it further.

-- Jeremy

On Thu, Dec 15, 2011 at 10:34 AM, Joseph Slomka <joseph...@...> wrote:

It's simple enough as the display transforma are just specified as colorspaces.

I suspect that the swizzling is being done outside of ocio. You can just apply the standard image manipulation once it's loaded. So you can load a file, linearize it, apply exposure in linear, then move it to display space, and apply addition transforms, for gain offset gamma.

Or did I miss your question?


On Thu, Dec 15, 2011 at 10:41 AM, Paul Miller <pa...@...> wrote:
I saw in the Mari OCIO demo video they were able to load up a LUT and combine it with other display controls (gain/exposure). I can see how the LUT can be loaded using the FileTransform but how is it possible to combine that with a DisplayTransform with the other controls for gain/gamma and channel swizzling?

Are you guys doing your own gain/gamma/swizzling when using the File-based Transform?

Join to automatically receive all group messages.