Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1932124 - Blender not compatible with OpenColorIO 2.0
Summary: Blender not compatible with OpenColorIO 2.0
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: blender
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Luya Tshimbalanga
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1901430 1972119
TreeView+ depends on / blocked
 
Reported: 2021-02-24 03:06 UTC by Richard Shaw
Modified: 2021-07-11 11:40 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Richard Shaw 2021-02-24 03:06:35 UTC
Blender does not appear to be compatible with OpenColorIO 2.0...

/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc: In member function 'virtual const char* OCIOImpl::configGetDisplayColorSpaceName(OCIO_ConstConfigRcPtr__**, const char*, const char*)':
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:397:43: error: 'using element_type = const class OpenColorIO_v2_0::Config' {aka 'const class OpenColorIO_v2_0::Config'} has no member named 'getDisplayColorSpaceName'; did you mean 'getDisplayViewColorSpaceName'?
  397 |     return (*(ConstConfigRcPtr *)config)->getDisplayColorSpaceName(display, view);
      |                                           ^~~~~~~~~~~~~~~~~~~~~~~~
      |                                           getDisplayViewColorSpaceName
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc: In member function 'virtual void OCIOImpl::configGetDefaultLumaCoefs(OCIO_ConstConfigRcPtr__**, float*)':
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:409:56: error: cannot convert 'float*' to 'double*'
  409 |     (*(ConstConfigRcPtr *)config)->getDefaultLumaCoefs(rgb);
      |                                                        ^~~
      |                                                        |
      |                                                        float*
In file included from /builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:29:
/usr/include/OpenColorIO/OpenColorIO.h:874:39: note:   initializing argument 1 of 'void OpenColorIO_v2_0::Config::getDefaultLumaCoefs(double*) const'
  874 |     void getDefaultLumaCoefs(double * rgb) const;
      |                              ~~~~~~~~~^~~
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc: In member function 'virtual void OCIOImpl::configGetXYZtoRGB(OCIO_ConstConfigRcPtr__**, float (*)[3])':
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:436:25: error: 'using element_type = const class OpenColorIO_v2_0::Processor' {aka 'const class OpenColorIO_v2_0::Processor'} has no member named 'applyRGB'
  436 |       to_rgb_processor->applyRGB(xyz_to_rgb[0]);
      |                         ^~~~~~~~
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:437:25: error: 'using element_type = const class OpenColorIO_v2_0::Processor' {aka 'const class OpenColorIO_v2_0::Processor'} has no member named 'applyRGB'
  437 |       to_rgb_processor->applyRGB(xyz_to_rgb[1]);
      |                         ^~~~~~~~
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:438:25: error: 'using element_type = const class OpenColorIO_v2_0::Processor' {aka 'const class OpenColorIO_v2_0::Processor'} has no member named 'applyRGB'
  438 |       to_rgb_processor->applyRGB(xyz_to_rgb[2]);
      |                         ^~~~~~~~
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc: In member function 'virtual void OCIOImpl::colorSpaceIsBuiltin(OCIO_ConstConfigRcPtr__**, OCIO_ConstColorSpaceRcPtr__**, bool&, bool&)':
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:570:16: error: 'using element_type = const class OpenColorIO_v2_0::Processor' {aka 'const class OpenColorIO_v2_0::Processor'} has no member named 'applyRGB'
  570 |     processor->applyRGB(cR);
      |                ^~~~~~~~
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:571:16: error: 'using element_type = const class OpenColorIO_v2_0::Processor' {aka 'const class OpenColorIO_v2_0::Processor'} has no member named 'applyRGB'
  571 |     processor->applyRGB(cG);
      |                ^~~~~~~~
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:572:16: error: 'using element_type = const class OpenColorIO_v2_0::Processor' {aka 'const class OpenColorIO_v2_0::Processor'} has no member named 'applyRGB'
  572 |     processor->applyRGB(cB);
      |                ^~~~~~~~
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:573:16: error: 'using element_type = const class OpenColorIO_v2_0::Processor' {aka 'const class OpenColorIO_v2_0::Processor'} has no member named 'applyRGB'
  573 |     processor->applyRGB(cW);
      |                ^~~~~~~~
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc: In member function 'virtual void OCIOImpl::processorApply(OCIO_ConstProcessorRcPtr__**, OCIO_PackedImageDesc__**)':
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:655:42: error: 'using element_type = const class OpenColorIO_v2_0::Processor' {aka 'const class OpenColorIO_v2_0::Processor'} has no member named 'apply'
  655 |     (*(ConstProcessorRcPtr *)processor)->apply(*(PackedImageDesc *)img);
      |                                          ^~~~~
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc: In member function 'virtual void OCIOImpl::processorApply_predivide(OCIO_ConstProcessorRcPtr__**, OCIO_PackedImageDesc__**)':
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:670:35: error: invalid conversion from 'void*' to 'float*' [-fpermissive]
  670 |       float *pixels = img->getData();
      |                       ~~~~~~~~~~~~^~
      |                                   |
      |                                   void*
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:684:44: error: 'using element_type = const class OpenColorIO_v2_0::Processor' {aka 'const class OpenColorIO_v2_0::Processor'} has no member named 'apply'
  684 |       (*(ConstProcessorRcPtr *)processor)->apply(*img);
      |                                            ^~~~~
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc: In member function 'virtual void OCIOImpl::processorApplyRGB(OCIO_ConstProcessorRcPtr__**, float*)':
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:694:40: error: 'using element_type = const class OpenColorIO_v2_0::Processor' {aka 'const class OpenColorIO_v2_0::Processor'} has no member named 'applyRGB'
  694 |   (*(ConstProcessorRcPtr *)processor)->applyRGB(pixel);
      |                                        ^~~~~~~~
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc: In member function 'virtual void OCIOImpl::processorApplyRGBA(OCIO_ConstProcessorRcPtr__**, float*)':
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:699:40: error: 'using element_type = const class OpenColorIO_v2_0::Processor' {aka 'const class OpenColorIO_v2_0::Processor'} has no member named 'applyRGBA'
  699 |   (*(ConstProcessorRcPtr *)processor)->applyRGBA(pixel);
      |                                        ^~~~~~~~~
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc: In member function 'virtual void OCIOImpl::processorApplyRGBA_predivide(OCIO_ConstProcessorRcPtr__**, float*)':
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:705:42: error: 'using element_type = const class OpenColorIO_v2_0::Processor' {aka 'const class OpenColorIO_v2_0::Processor'} has no member named 'applyRGBA'
  705 |     (*(ConstProcessorRcPtr *)processor)->applyRGBA(pixel);
      |                                          ^~~~~~~~~
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:717:42: error: 'using element_type = const class OpenColorIO_v2_0::Processor' {aka 'const class OpenColorIO_v2_0::Processor'} has no member named 'applyRGBA'
  717 |     (*(ConstProcessorRcPtr *)processor)->applyRGBA(pixel);
      |                                          ^~~~~~~~~
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc: In member function 'virtual OCIO_DisplayTransformRcPtr__** OCIOImpl::createDisplayTransform()':
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:747:3: error: 'DisplayTransformRcPtr' was not declared in this scope; did you mean 'OCIO_DisplayTransformRcPtr'?
  747 |   DisplayTransformRcPtr *dt = OBJECT_GUARDED_NEW(DisplayTransformRcPtr);
      |   ^~~~~~~~~~~~~~~~~~~~~
      |   OCIO_DisplayTransformRcPtr
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:747:26: error: 'dt' was not declared in this scope
  747 |   DisplayTransformRcPtr *dt = OBJECT_GUARDED_NEW(DisplayTransformRcPtr);
      |                          ^~
In file included from /builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:36:
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:747:50: error: expected type-specifier before 'DisplayTransformRcPtr'
  747 |   DisplayTransformRcPtr *dt = OBJECT_GUARDED_NEW(DisplayTransformRcPtr);
      |                                                  ^~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/blender-2.91.2/intern/guardedalloc/MEM_guardedalloc.h:278:89: note: in definition of macro 'OBJECT_GUARDED_NEW'
  278 | #    define OBJECT_GUARDED_NEW(type, args...) new (MEM_mallocN(sizeof(type), __func__)) type(args)
      |                                                                                         ^~~~
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:749:9: error: 'DisplayTransform' has not been declared
  749 |   *dt = DisplayTransform::Create();
      |         ^~~~~~~~~~~~~~~~
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc: In member function 'virtual void OCIOImpl::displayTransformSetInputColorSpaceName(OCIO_DisplayTransformRcPtr__**, const char*)':
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:757:6: error: 'DisplayTransformRcPtr' was not declared in this scope; did you mean 'OCIO_DisplayTransformRcPtr'?
  757 |   (*(DisplayTransformRcPtr *)dt)->setInputColorSpaceName(name);
      |      ^~~~~~~~~~~~~~~~~~~~~
      |      OCIO_DisplayTransformRcPtr
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:757:29: error: expected primary-expression before ')' token
  757 |   (*(DisplayTransformRcPtr *)dt)->setInputColorSpaceName(name);
      |                             ^
/builddir/build/BUILD/blender-2.91.2/intern/opencolorio/ocio_impl.cc:757:30: error: expected ')' before 'dt'
  757 |   (*(DisplayTransformRcPtr *)dt)->setInputColorSpaceName(name);


Full log:

https://download.copr.fedorainfracloud.org/results/hobbes1069/OIIO/fedora-rawhide-x86_64/02014083-blender/builder-live.log.gz

Comment 2 Luya Tshimbalanga 2021-02-24 16:31:23 UTC
From the ticket on comment #2, upstream refused to backport the compatibility to 2.91.2 and suggest to build on 2.93.0 which will be available on May 2021 according to the schedule (https://developer.blender.org/project/view/125). The alternative will be a patch on future 2.92 which will be out in a few week or wait for 2.93.

Comment 3 Luya Tshimbalanga 2021-02-24 16:35:10 UTC
Another suggestion is to set a package OCIO 1.1.1 as a stopgap until Blender reaches 2.93.

Comment 4 Nicolas Chauvet (kwizart) 2021-03-04 10:10:17 UTC
(In reply to Luya Tshimbalanga from comment #2)
> From the ticket on comment #2, upstream refused to backport the
> compatibility to 2.91.2 and suggest to build on 2.93.0 which will be
> available on May 2021 according to the schedule
This looks possible for f34+ if dependencies (LuxRender, others) are compatible.
Of build with openvdb support dropped until moving to 2.93 ?

This could be done with a copr.

Comment 5 Richard Shaw 2021-03-04 12:27:33 UTC
I don't mind waiting a little while, but May seems a bit long. If you want to do some testing I can add you to my COPR.

Comment 6 Luya Tshimbalanga 2021-03-04 16:56:57 UTC
Feel free to find an effective method. Another option is something like OpenColorIO1 for dependency as a stopgap until Blender 2.93 lands.

Comment 7 Richard Shaw 2021-03-04 17:01:15 UTC
This is where things get confusing for me. Would we also need a OpenImageIO compatibility package linked with OCIO 1.x instead of 2.x?

The only consumers of OCIO right now are:
Blender - not compatible
Krita - builds look to be failing for Boost related reasons so I haven't tested
OpenImageIO - Builds fine

Comment 8 Luya Tshimbalanga 2021-03-05 02:17:23 UTC
(In reply to Richard Shaw from comment #7)
> This is where things get confusing for me. Would we also need a OpenImageIO
> compatibility package linked with OCIO 1.x instead of 2.x?
> 
> The only consumers of OCIO right now are:
> Blender - not compatible
> Krita - builds look to be failing for Boost related reasons so I haven't
> tested
> OpenImageIO - Builds fine

According to the Blender version.cmake (https://developer.blender.org/diffusion/B/browse/blender-v2.92-release/build_files/build_environment/cmake/versions.cmake), it seems the case. I had similar case with embree 2.x in the past.
Perhaps using upstream patch may help : https://developer.blender.org/diffusion/B/browse/master/build_files/build_environment/cmake/

Comment 9 Luya Tshimbalanga 2021-06-04 09:00:46 UTC
Blender 2.93.0 is released. I already pushed the commit on all Fedora release. Feel free to rebuild Blender with OCIO 2.x.

Comment 10 Richard Shaw 2021-06-10 11:12:51 UTC
Thanks for following up. I'm still working on Krita, and a new dependency usd.

Comment 11 Luya Tshimbalanga 2021-06-30 06:05:26 UTC
Do you need access to usd commit? Maybe so options need to get disabled.

Comment 12 Richard Shaw 2021-06-30 12:15:19 UTC
No, I'm a PP, I just kinda gave up. The API has changed significantly in the 2.0 release and porting the projects myself is not practical. I do need to file some bugs upstream so they hopefully at least know about it and will adopt it at some point in the near future.

Comment 13 Luya Tshimbalanga 2021-07-07 23:39:16 UTC
(In reply to Richard Shaw from comment #12)
> No, I'm a PP, I just kinda gave up. The API has changed significantly in the
> 2.0 release and porting the projects myself is not practical. I do need to
> file some bugs upstream so they hopefully at least know about it and will
> adopt it at some point in the near future.

Since Krita is the only dependent package for OCIO 1.x, it would be nice to push 2.x in the repository while making OCIO1.x as a stopgap for time being.
The new version of Blender will refuse to support 1.x.

Comment 14 Richard Shaw 2021-07-11 11:40:43 UTC
Bah, I may have to do that. Currently fighting a similar problem with OpenEXR 2.x vs 3.x.


Note You need to log in before you can comment on or make changes to this bug.