Blender Git Commit Log
Git Commits -> Revision b0605ee
Revision b0605ee by Sergey Sharybin (master) September 10, 2012, 11:46 (GMT) |
Color Management: finish pipeline changes This commit hopefully finishes color management pipeline changes, implements some missed functionality and fixes some bugs. Mainly changes are related on getting rid of old Color Management flag which became counter-intuitive in conjunction with OpenColorIO. Now color management is always assuming to be enabled and non-color managed pipeline is emulated using display device called None. This display has got single view which is basically NO-OP (raw) transformation, not applying any tone curve and displays colors AS-IS. In most cases it behaves the same as disabling Color Management in shading panel, but there is at least one known difference in behavior: compositor and sequence editors would output images in linear space, not in sRGB as it used to be before. It'll be quite tricky to make this behave in exactly the same way as it used to, and not sure if we really need to do it. 3D viewport is supposed to be working in sRGB space, no tonemaps would be applied there. This is another case where compatibility breaks in comparison with old color management pipeline, but supporting display transformation would be tricky since it'll also be needed to make GLSL shaders, textures and so be aware of display transform. Interface is now aware of display transformation, but it only uses default display view, no exposure, gamma or curve mapping is supported there. This is so color widgets could apply display transformation in both directions. Such behavior is a bit counter-intuitive, but it's currently the only way to make color picking working smoothly. In theory we'll need to support color picking color space, but it'll be also a bit tricky since in Blender display transform is configurable from the interface and could be used for artistics needs and in such design it's not possible to figure out invertable color space which could be used for color picking. In other software it's not so big issue since all color spaces, display transform and so are strictly defined by pipeline and in this case it is possible to define color picking space which would be close enough to display space. Sequencer's color space now could be configured from the interface -- it's settings are situated in Scene buttons, Color Management panel. Default space is sRGB. It was made configurable because we used vd16 color space during Mango which was close to Film view used by grading department. Sequencer will convert float buffers to this color space before operating with them hopefully giving better results. Byte buffers wouldn't be converted to this color space an they'll be handled in their own colors[ace. Converting them to sequencer's working space would lead to precision loss without much visible benefits. It shouldn't be an issue since float and byte images would never be blended together -- byte image would be converted to float first if it's needed to be blended with float image. Byte buffers now allowed to be color managed. This was needed to make code in such areas as baking and rendering don't have hardcoded linear to sRGB conversions, making things more clear from code point of view. Input color space is now assigning on image/movie clip load and default roles are used for this. So for float images default space would be rec709 and for byte images default space would be sRGB. Added Non-Color color space which is aimed to be used for such things as normal/heights maps. It's currently the same as raw colorspace, just has got more clear naming for users. Probably we'll also need to make it not affected by display transformation. Think this is all main pipeline-related changes, more details would be there: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management Other changes and fixes: - Lots of internal code clean up in color management module. - Made OpenColorIO module using guarded memory allocation. This allowed to fix couple of memory leaks and would help preventing leaks in the future. - Made sure color unpremultiply and dither are supported by all OpenColorIO defined color transformations. - Made compositor's preview images be aware of display transformation. Legacy compositor still uses old Color Management flags, but likely we'll disable compositor for the release and remove legacy code soon, so don't think we'll need to spend time on porting that code to new color management system. - Made OpenGL rendering be aware of display transform when saving render result. Now it behaves in the same way as regular rendering. TODO: - HSV widgets are using linear rgb/sRGB conversions for single channel, not sure how this should be ported to new color pipeline. - Image stamp would use hardcoded linear rgb to sRGB conversion for filling rectangles. Probably it should use default display view for this instead, would check this with Brecht. - Get rid of None color space which was only used for compatibility reasons. - Made it more clear which color spaces could be used as input space. - There're also some remained TODO's in the code marked as OCIO_TODO, but wouldn't consider them as stoppers for at least this commit. |
Commit Details:
Full Hash: b0605eed2c9f6424c8d8ae4dc053639ece130831
SVN Revision: 50503
Parent Commit: 832841d
Lines Changed: +2096, -1298
99 Modified Paths:
/intern/opencolorio/CMakeLists.txt (+1, -1) (Diff)
/intern/opencolorio/ocio_capi.cpp (+30, -21) (Diff)
/intern/opencolorio/ocio_capi.h (+6, -4) (Diff)
/intern/opencolorio/SConscript (+1, -1) (Diff)
/release/datafiles/colormanagement/config.ocio (+32, -3) (Diff)
/release/scripts/startup/bl_ui/properties_render.py (+1, -4) (Diff)
/release/scripts/startup/bl_ui/properties_scene.py (+13, -2) (Diff)
/source/blender/blenkernel/BKE_colortools.h (+5, -2) (Diff)
/source/blender/blenkernel/BKE_node.h (+4, -1) (Diff)
/source/blender/blenkernel/BKE_scene.h (+2, -0) (Diff)
/source/blender/blenkernel/BKE_sequencer.h (+11, -1) (Diff)
/source/blender/blenkernel/intern/colortools.c (+24, -11) (Diff)
/source/blender/blenkernel/intern/image.c (+11, -4) (Diff)
/source/blender/blenkernel/intern/scene.c (+25, -0) (Diff)
/source/blender/blenkernel/intern/seqeffects.c (+3, -3) (Diff)
/source/blender/blenkernel/intern/sequencer.c (+104, -5) (Diff)
/source/blender/blenloader/intern/readfile.c (+15, -0) (Diff)
/source/blender/compositor/COM_compositor.h (+14, -1) (Diff)
/source/blender/compositor/intern/COM_compositor.cpp (+5, -3) (Diff)
/source/blender/compositor/intern/COM_CompositorContext.cpp (+2, -10) (Diff)
/source/blender/compositor/intern/COM_CompositorContext.h (+24, -2) (Diff)
/source/blender/compositor/intern/COM_ExecutionSystem.cpp (+5, -1) (Diff)
/source/blender/compositor/intern/COM_ExecutionSystem.h (+3, -1) (Diff)
/source/blender/compositor/intern/COM_Node.cpp (+4, -4) (Diff)
/source/blender/compositor/intern/COM_Node.h (+2, -2) (Diff)
/source/blender/compositor/nodes/COM_BlurNode.cpp (+4, -4) (Diff)
/source/blender/compositor/nodes/COM_BokehImageNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_ChromaMatteNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_ColorMatteNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_CompositorNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_DespeckleNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_DifferenceMatteNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_DilateErodeNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_DistanceMatteNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_FilterNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_ImageNode.cpp (+2, -2) (Diff)
/source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_MixNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_MovieClipNode.cpp (+3, -19) (Diff)
/source/blender/compositor/nodes/COM_OutputFileNode.cpp (+4, -3) (Diff)
/source/blender/compositor/nodes/COM_RenderLayersNode.cpp (+31, -31) (Diff)
/source/blender/compositor/nodes/COM_RenderLayersNode.h (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_SplitViewerNode.cpp (+4, -3) (Diff)
/source/blender/compositor/nodes/COM_TextureNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_ViewerNode.cpp (+4, -3) (Diff)
/source/blender/compositor/operations/COM_OutputFileOperation.cpp (+9, -3) (Diff)
/source/blender/compositor/operations/COM_OutputFileOperation.h (+6, -1) (Diff)
/source/blender/compositor/operations/COM_PreviewOperation.cpp (+11, -2) (Diff)
/source/blender/compositor/operations/COM_PreviewOperation.h (+4, -1) (Diff)
/source/blender/compositor/operations/COM_SplitViewerOperation.cpp (+1, -17) (Diff)
/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp (+5, -6) (Diff)
/source/blender/compositor/operations/COM_ViewerBaseOperation.h (+6, -6) (Diff)
/source/blender/compositor/operations/COM_ViewerOperation.cpp (+1, -15) (Diff)
/source/blender/editors/include/ED_view3d.h (+5, -3) (Diff)
/source/blender/editors/interface/interface.c (+29, -1) (Diff)
/source/blender/editors/interface/interface_draw.c (+9, -4) (Diff)
/source/blender/editors/interface/interface_handlers.c (+8, -4) (Diff)
/source/blender/editors/interface/interface_intern.h (+9, -0) (Diff)
/source/blender/editors/interface/interface_ops.c (+13, -7) (Diff)
/source/blender/editors/interface/interface_regions.c (+19, -12) (Diff)
/source/blender/editors/interface/interface_widgets.c (+10, -6) (Diff)
/source/blender/editors/object/object_bake.c (+8, -2) (Diff)
/source/blender/editors/render/render_internal.c (+3, -15) (Diff)
/source/blender/editors/render/render_opengl.c (+37, -17) (Diff)
/source/blender/editors/render/render_preview.c (+23, -6) (Diff)
/source/blender/editors/sculpt_paint/paint_image.c (+12, -8) (Diff)
/source/blender/editors/space_image/image_buttons.c (+5, -7) (Diff)
/source/blender/editors/space_image/image_draw.c (+2, -2) (Diff)
/source/blender/editors/space_image/image_ops.c (+6, -3) (Diff)
/source/blender/editors/space_image/space_image.c (+2, -2) (Diff)
/source/blender/editors/space_node/node_edit.c (+3, -2) (Diff)
/source/blender/editors/space_sequencer/sequencer_view.c (+1, -1) (Diff)
/source/blender/editors/space_view3d/drawmesh.c (+9, -1) (Diff)
/source/blender/editors/space_view3d/view3d_draw.c (+32, -14) (Diff)
/source/blender/gpu/intern/gpu_draw.c (+6, -1) (Diff)
/source/blender/gpu/intern/gpu_material.c (+6, -2) (Diff)
/source/blender/imbuf/IMB_colormanagement.h (+53, -25) (Diff)
/source/blender/imbuf/IMB_imbuf_types.h (+9, -6) (Diff)
/source/blender/imbuf/intern/allocimbuf.c (+3, -3) (Diff)
/source/blender/imbuf/intern/colormanagement.c (+1215, -840) (Diff)
/source/blender/imbuf/intern/IMB_colormanagement_intern.h (+12, -1) (Diff)
/source/blender/makesdna/DNA_color_types.h (+1, -1) (Diff)
/source/blender/makesdna/DNA_scene_types.h (+2, -1) (Diff)
/source/blender/makesrna/intern/rna_image_api.c (+10, -8) (Diff)
/source/blender/makesrna/intern/rna_scene.c (+5, -33) (Diff)
/source/blender/makesrna/intern/rna_space.c (+1, -1) (Diff)
/source/blender/nodes/composite/nodes/node_composite_image.c (+3, -0) (Diff)
/source/blender/nodes/composite/nodes/node_composite_outputFile.c (+3, -0) (Diff)
/source/blender/nodes/composite/node_composite_tree.c (+6, -2) (Diff)
/source/blender/nodes/composite/node_composite_util.c (+3, -0) (Diff)
/source/blender/render/intern/include/render_result.h (+5, -1) (Diff)
/source/blender/render/intern/source/envmap.c (+1, -2) (Diff)
/source/blender/render/intern/source/pipeline.c (+5, -6) (Diff)
/source/blender/render/intern/source/rendercore.c (+10, -2) (Diff)
/source/blender/render/intern/source/render_result.c (+15, -16) (Diff)
/source/blender/render/intern/source/render_texture.c (+11, -10) (Diff)
/source/blender/render/intern/source/shadeinput.c (+8, -1) (Diff)
/source/blender/windowmanager/intern/wm_files.c (+2, -2) (Diff)
/intern/opencolorio/ocio_capi.cpp (+30, -21) (Diff)
/intern/opencolorio/ocio_capi.h (+6, -4) (Diff)
/intern/opencolorio/SConscript (+1, -1) (Diff)
/release/datafiles/colormanagement/config.ocio (+32, -3) (Diff)
/release/scripts/startup/bl_ui/properties_render.py (+1, -4) (Diff)
/release/scripts/startup/bl_ui/properties_scene.py (+13, -2) (Diff)
/source/blender/blenkernel/BKE_colortools.h (+5, -2) (Diff)
/source/blender/blenkernel/BKE_node.h (+4, -1) (Diff)
/source/blender/blenkernel/BKE_scene.h (+2, -0) (Diff)
/source/blender/blenkernel/BKE_sequencer.h (+11, -1) (Diff)
/source/blender/blenkernel/intern/colortools.c (+24, -11) (Diff)
/source/blender/blenkernel/intern/image.c (+11, -4) (Diff)
/source/blender/blenkernel/intern/scene.c (+25, -0) (Diff)
/source/blender/blenkernel/intern/seqeffects.c (+3, -3) (Diff)
/source/blender/blenkernel/intern/sequencer.c (+104, -5) (Diff)
/source/blender/blenloader/intern/readfile.c (+15, -0) (Diff)
/source/blender/compositor/COM_compositor.h (+14, -1) (Diff)
/source/blender/compositor/intern/COM_compositor.cpp (+5, -3) (Diff)
/source/blender/compositor/intern/COM_CompositorContext.cpp (+2, -10) (Diff)
/source/blender/compositor/intern/COM_CompositorContext.h (+24, -2) (Diff)
/source/blender/compositor/intern/COM_ExecutionSystem.cpp (+5, -1) (Diff)
/source/blender/compositor/intern/COM_ExecutionSystem.h (+3, -1) (Diff)
/source/blender/compositor/intern/COM_Node.cpp (+4, -4) (Diff)
/source/blender/compositor/intern/COM_Node.h (+2, -2) (Diff)
/source/blender/compositor/nodes/COM_BlurNode.cpp (+4, -4) (Diff)
/source/blender/compositor/nodes/COM_BokehImageNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_ChromaMatteNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_ColorMatteNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_CompositorNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_DespeckleNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_DifferenceMatteNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_DilateErodeNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_DistanceMatteNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_FilterNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_ImageNode.cpp (+2, -2) (Diff)
/source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_MixNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_MovieClipNode.cpp (+3, -19) (Diff)
/source/blender/compositor/nodes/COM_OutputFileNode.cpp (+4, -3) (Diff)
/source/blender/compositor/nodes/COM_RenderLayersNode.cpp (+31, -31) (Diff)
/source/blender/compositor/nodes/COM_RenderLayersNode.h (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_SplitViewerNode.cpp (+4, -3) (Diff)
/source/blender/compositor/nodes/COM_TextureNode.cpp (+1, -1) (Diff)
/source/blender/compositor/nodes/COM_ViewerNode.cpp (+4, -3) (Diff)
/source/blender/compositor/operations/COM_OutputFileOperation.cpp (+9, -3) (Diff)
/source/blender/compositor/operations/COM_OutputFileOperation.h (+6, -1) (Diff)
/source/blender/compositor/operations/COM_PreviewOperation.cpp (+11, -2) (Diff)
/source/blender/compositor/operations/COM_PreviewOperation.h (+4, -1) (Diff)
/source/blender/compositor/operations/COM_SplitViewerOperation.cpp (+1, -17) (Diff)
/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp (+5, -6) (Diff)
/source/blender/compositor/operations/COM_ViewerBaseOperation.h (+6, -6) (Diff)
/source/blender/compositor/operations/COM_ViewerOperation.cpp (+1, -15) (Diff)
/source/blender/editors/include/ED_view3d.h (+5, -3) (Diff)
/source/blender/editors/interface/interface.c (+29, -1) (Diff)
/source/blender/editors/interface/interface_draw.c (+9, -4) (Diff)
/source/blender/editors/interface/interface_handlers.c (+8, -4) (Diff)
/source/blender/editors/interface/interface_intern.h (+9, -0) (Diff)
/source/blender/editors/interface/interface_ops.c (+13, -7) (Diff)
/source/blender/editors/interface/interface_regions.c (+19, -12) (Diff)
/source/blender/editors/interface/interface_widgets.c (+10, -6) (Diff)
/source/blender/editors/object/object_bake.c (+8, -2) (Diff)
/source/blender/editors/render/render_internal.c (+3, -15) (Diff)
/source/blender/editors/render/render_opengl.c (+37, -17) (Diff)
/source/blender/editors/render/render_preview.c (+23, -6) (Diff)
/source/blender/editors/sculpt_paint/paint_image.c (+12, -8) (Diff)
/source/blender/editors/space_image/image_buttons.c (+5, -7) (Diff)
/source/blender/editors/space_image/image_draw.c (+2, -2) (Diff)
/source/blender/editors/space_image/image_ops.c (+6, -3) (Diff)
/source/blender/editors/space_image/space_image.c (+2, -2) (Diff)
/source/blender/editors/space_node/node_edit.c (+3, -2) (Diff)
/source/blender/editors/space_sequencer/sequencer_view.c (+1, -1) (Diff)
/source/blender/editors/space_view3d/drawmesh.c (+9, -1) (Diff)
/source/blender/editors/space_view3d/view3d_draw.c (+32, -14) (Diff)
/source/blender/gpu/intern/gpu_draw.c (+6, -1) (Diff)
/source/blender/gpu/intern/gpu_material.c (+6, -2) (Diff)
/source/blender/imbuf/IMB_colormanagement.h (+53, -25) (Diff)
/source/blender/imbuf/IMB_imbuf_types.h (+9, -6) (Diff)
/source/blender/imbuf/intern/allocimbuf.c (+3, -3) (Diff)
/source/blender/imbuf/intern/colormanagement.c (+1215, -840) (Diff)
/source/blender/imbuf/intern/IMB_colormanagement_intern.h (+12, -1) (Diff)
/source/blender/makesdna/DNA_color_types.h (+1, -1) (Diff)
/source/blender/makesdna/DNA_scene_types.h (+2, -1) (Diff)
/source/blender/makesrna/intern/rna_image_api.c (+10, -8) (Diff)
/source/blender/makesrna/intern/rna_scene.c (+5, -33) (Diff)
/source/blender/makesrna/intern/rna_space.c (+1, -1) (Diff)
/source/blender/nodes/composite/nodes/node_composite_image.c (+3, -0) (Diff)
/source/blender/nodes/composite/nodes/node_composite_outputFile.c (+3, -0) (Diff)
/source/blender/nodes/composite/node_composite_tree.c (+6, -2) (Diff)
/source/blender/nodes/composite/node_composite_util.c (+3, -0) (Diff)
/source/blender/render/intern/include/render_result.h (+5, -1) (Diff)
/source/blender/render/intern/source/envmap.c (+1, -2) (Diff)
/source/blender/render/intern/source/pipeline.c (+5, -6) (Diff)
/source/blender/render/intern/source/rendercore.c (+10, -2) (Diff)
/source/blender/render/intern/source/render_result.c (+15, -16) (Diff)
/source/blender/render/intern/source/render_texture.c (+11, -10) (Diff)
/source/blender/render/intern/source/shadeinput.c (+8, -1) (Diff)
/source/blender/windowmanager/intern/wm_files.c (+2, -2) (Diff)