Dev:Source/Image/OpenColorIO

提供: wiki
移動先: 案内検索

OpenColorIO Integration

Code

Links

Building

  • CMake/SCons should both support OCIO.
  • Prebuilt OCIO libraries for windows/mac needed to be added to svn.
  • Building without OCIO is not possible, should be added so Blender still function as before even without OCIO.

ColorSpace I/O

  • A per-image/movieclip/sequence strip colorspace setting should be added to load and save images in. This colorspace setting should indicate the colorspace of the file on disk. Float image buffer should always be converted to the reference scene linear color space.
  • Currently only float-images are color managed it seems, it should also be possible to do 8bit => 8bit color space conversion.
  • Default color spaces for 8bit/byte/log/.. images are currently specified in the user preferences. It seems to me that this should be in the OCIO configuration so that it's shared between all applications using the configuration.
  • Should the OCIO configuration be a user preference or a file setting? Perhaps the default file setting could be a user preference, but it still seems to make sense to have it per file, so that you can have multiple projects with different OCIO configurations, and not have to switch the user preferences to edit them correctly.

Display

  • There is a per window / image editor display setting. However the code internally does not actually support this, the display image is still stored in the 8bit "rect", which means different windows can't display the same image in different color spaces. It also means 8bit images can't be color corrected because they would overwrite their original buffer.
  • A solution would be to add a display cache list of rects in different display color spaces in the imbuf as requested by different parts of the code. The tricky thing is when to free this and who owns this display cache. It could be a per-image editor cache too, but note there's many areas of the code that rely on this, opengl textures, rendering and compositing preview renders, sequencer, .. somehow this has to be solved.
  • On the fly conversion for display using GLSL would be nice, but unfortunately not all OCIO transforms can run in GLSL (3D LUTs), and those are quite important ones.

Code Issues

  • Invalid or incomplete color configuration files will crash currently, this should be handled better with an error in the console and disabled color management.
  • The per-scene color management setting would be good to handle in colormanagement.c, without the rest of the code knowing anything about it. It also only makes sense to have this as a per-file setting (OCIO configuration None?), since it can't really work per-scene anyway.
  • Having a C wrapper seems sort of overkill to me, if OCIO API files are only used in one file, it could just become a .cpp file and call the API directly?
  • In the render engine and some other places the conversions are missing still.