MATERIALX_BUILD_OCIO cmake option to enable OCIO building
MATERIALX_OCIO_DIR cmake option to incidate root directory of OCIO install
New OCIO color management system with corresponding custom OCIO source code generator node logic
New OCIO config option (_options.mtlx) on unit tests. Only GenGLSL and RenderGLSL unit tests take this into account.
(To look at added an external project dependency if desired later)
Basic Support
Can generate code for LUT and non-LUT based transforms.
LUT (texture based) transforms have no mechanism to prase and pass back image data for introspection. Delayed as config for base MTLX will most likely not have LUTs.
Support for color3 inputs and outputs using color3->color4 conversion and color4->color3 conversion nodes connected to each OCIO shader node. This basically brackets the main function call.
Test renders (GLSL) for new unit test look as follows.
Includes:
Test of color4
Test of color3 where no conversion from color3->color4->color3 is required
Test reuse single update node with a given color transform (above add, and of transformed color3(0.5, 0,0, 0.0) and color3(0.0, 0.5, 0.0) -- resulting in yellow render)
Test use of multiple upstream nodes using the same color transform code but different inputs / outputs
Update #815.
Preliminary setup for OCIO support
Basic Build Setup
MATERIALX_BUILD_OCIO
cmake option to enable OCIO buildingMATERIALX_OCIO_DIR
cmake option to incidate root directory of OCIO installBasic Support
Test Results
Example generated GLSL code:
where 2 transforms are bracketed and then routed to a add function to combine for final result.
Single copy of translform (in this case acescg to lin_rec709) looks like this (generated by OCIO code gen):