SceneLinear to LogC into an ICC profile

379 views
Skip to first unread message

Andrew Britton

unread,
Nov 27, 2012, 9:22:50 PM11/27/12
to ocio...@googlegroups.com
A question about converting from scene linear to ARRI LogC via an icc profile:

when I use ociobakelut I'm wondering how to create an icc file that will be a viewing profile for a scenelinear image, to view it in LogC. My assumptions are as follows with a question about the direction of a LUT.

First I'm assuming this will be the proper command for creating said ICC profile:
ociobakelut --inputspace lnf --lut ln_2_logC.3dl --format icc /path/finalPath/LogC_Viewer.icc

So the question I have when making the ln_2_logC.3dl is which direction should the LUT be created? ie... should the .cube be created to convert from SceneLinear to LogC or vice versa? My apologies if this seems obvious, and my assumption is that the .cube should be from SceneLinear to LogC, but I'm confused as to why there would need to be an --inputspace predefined if it's already in the .3dl LUT. In this case of converting a .3dl to a .icc, I would expect the command to only need one .3dl file.

Thank you,
Andrew

dbr/Ben

unread,
Nov 29, 2012, 8:35:09 AM11/29/12
to ocio...@googlegroups.com
The --inputspace/--outputspace arguments are only required when using an OCIO config. The --lut argument is used, alone, for "Config-free baking":


So you would just do something like:

ociobakelut --lut ln_1_logC.3dl --format icc mynewlut.icc

..which will make an ICC which applies the same transform as the 3dl.


However, I suspect there's a bigger problem with what you are trying to do - the .3dl and .icc profiles don't tend to work well with scene-linear values:

- 3dl only works with integer values (usually print-denstity-space scans or Rec709 video), it would clamp scene-linear values over 1.0 (to about 0.6 in LogC)

- ICC probably can, there was an update to the ICC spec to support their equivalent to a floating-point shaper LUT ("unbounded Device-side encoding"?)


However this requires that the host application supports that version of ICC (Photoshop CS4 doesn't, and pretty sure neither does CS5). Also I'd guess OCIO's baker would need updated also.

Kai-Uwe Behrmann

unread,
Nov 29, 2012, 8:41:03 AM11/29/12
to ocio...@googlegroups.com
There are at least two open source CMM's around, which support float
style lookup tables. One is used in Krita, which in turn links to OCIO.
The involved Lcms CMM has since version 2.4 a option to apply pre and
post linearisation curves to ICC transforms, which greatly improves
linear to gamma conversion quality.

kind regards
Kai-Uwe
--
www.oyranos.org

Andrew Britton

unread,
Dec 3, 2012, 7:19:43 PM12/3/12
to ocio...@googlegroups.com
I've solved the error of Photoshop (ver12.1 x64), for PC, not recognizing my ICC files. In my attempts to convert a LUT to an .ICC file I was originally forgetting to include the "--description" flag. Once this flag was included, I was able to read in the profile to Photoshop and assign it to an image.
I figured this may be useful to someone else.

Thanks for everyone's help thus far.

Brendan Bolles

unread,
Dec 3, 2012, 8:27:57 PM12/3/12
to ocio...@googlegroups.com
On Dec 3, 2012, at 4:19 PM, Andrew Britton wrote:

> I've solved the error of Photoshop (ver12.1 x64), for PC, not recognizing my ICC files. In my attempts to convert a LUT to an .ICC file I was originally forgetting to include the "--description" flag. Once this flag was included, I was able to read in the profile to Photoshop and assign it to an image.
> I figured this may be useful to someone else.


I'd call that a bug. Currently ociobakelut gives an error you don't provide a copyright, but it should really give an error if there's no description. Copyright is more optional, I think.

If no description is provided, we could also use the output file name, but there definitely should be a description. I'm surprised lcms doesn't throw an error when the description is set to an empty string.


Brendan

Jeremy Selan

unread,
Dec 3, 2012, 8:37:38 PM12/3/12
to ocio...@googlegroups.com
Added for tracking. Should be easy to fix. Sorry for not catching this sooner.

https://github.com/imageworks/OpenColorIO/issues/291
> --
>
>

Kai-Uwe Behrmann

unread,
Dec 4, 2012, 1:39:39 AM12/4/12
to ocio...@googlegroups.com
Am 04.12.2012 02:27, schrieb Brendan Bolles:
> Copyright is more optional, I think.

It is not.

> If no description is provided, we could also use the output file name, but there definitely should be a description. I'm surprised lcms doesn't throw an error when the description is set to an empty string.

Filename == description is a good assumtion at profile write time.
Reply all
Reply to author
Forward
0 new messages