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


Paul Miller <pa...@...>
 

On 12/16/2011 10:46 AM, Jeremy Selan wrote:
> Ah, this was easier than it looked. Note I skipped the display, view,
and input color-space options when a simple LUT is selected. Is that the
preferred way to do it?

Yup. The input colorspace, view, and display are just used to look up
which display transform to use, and your user-specified LUT conceptually
is performing that operation. So the sequence I gave you is exactly
what you'd get internally, if I added this feature to the
DisplayTransform natively.
Cool. It was "easy" once I realized the FileTransform replaced the display/view/colorspace stuff. Here is the code in C++:

if (fileTransform)
{
OCIO::GroupTransformRcPtr group = OCIO::GroupTransform::Create();
group->push_back(gainTransform);
group->push_back(swizzle);
group->push_back(fileTransform);
group->push_back(expTransform);

processor = config->getProcessor(group);
}
else
{
OCIO::DisplayTransformRcPtr transform = OCIO::DisplayTransform::Create();
transform->setInputColorSpaceName(colorspace);
transform->setDisplay(display);
transform->setView(view);
transform->setLinearCC(gainTransform);

processor = config->getProcessor(transform);
}

Join ocio-dev@lists.aswf.io to automatically receive all group messages.