Jump to content
You must now use your email address to sign in [click for more info] ×

Linear colour space handling in photo?


Recommended Posts

I work with images output from a render engine which exports linear colour space files. Usually to save issues further down the line I will convert from linear space to sRGB in photoshop as the first operation and work from there. However in Affinity Photo when I open the linear space render file it is incredibly dark and contrasy - like it doesnt handle the linear space tone mapping. So even if I try and adjust the image files to sRGB its too late and the dark image persists as it is incorrect from opening. Is there an option to correctly open a linear colour space image somewhere im missing?

 

Thanks  

Link to comment
Share on other sites

Is there a support email address I can contact serif directly on about this? Or is this the best way to get their attention? Maybe I'll repost in the bugs section as this has quickly dropped off on to page 2 never to be seen again. Currently Affinity is unusable for professional 3D if there is no way around this which is a shame as I really like the tool set.

Link to comment
Share on other sites

Does your rendering application tag the linear output file you generate with a particular color profile?  If not, then AP has no way of knowing how to interpret the color in your image, so it interprets it in the working color space (which is probably not linear).  You can use an OCIO adjustment layer to tell AP how to display the image (non-destructively) so that you can work on linear data while displaying it in some other gamma encoding.

 

The OCIO config set for vfx and animation are here:

 

http://opencolorio.org/configurations/index.html

 

and will probably give you the transforms you are looking for.  The ACES 1.0.3 config set is particularly useful.

 

If your image is 32bit, you can use the same transforms in the 32-bit preview panel.

 

Unfortunately, you cannot set up AP to use a linear color space as its working color space for files lower than 32bit per channel and you cannot assign a lower bit depth (16 or 8 bit) file a linear profile.  If your images are 32bit then you are good to go - just set up the color preferences properly and apply the OCIO transform you want for display in the 32bit preview panel.

 

You can also use a LUT if you have one that does the specific transform you need, again as an adjustment layer.

 

There are a few tutorial videos that cover processing of 3D rendering images in AP - check the video tutorials list, especially the HDR, OpenEXR and Color Management (OCIO) sections.

 

Just a note that assigning a linear profile to the image will only change its appearance, but it will not convert the numbers to a gamma-encoded form.  That is, the data remain linear but the assigning of the linear profile help with display.  This is one important role that OCIO plays in AP, as an adjustment layer.  Same goes for the 32-bit Preview panel.  Both approaches help visualize linear data in a gamma encoded manner while maintaining the linear nature of the data for compositing, etc., where data need to add linearly to preserve light physics.

 

It sounds like you CONVERT your linear files to sRGB in PS, which will change the data to sRGB gamma encoded numbers - are you sure this is what you want?  The data are no longer linear after conversion.  If that is what you want to do, you can use OCIO as an adjustment layer to do the transform and then flatten the result and assign sRGB as the color space to the document.

 

Anyway, I hope this helps.

 

kirk

Link to comment
Share on other sites

Thanks so much Kirk this has been a big help. I found the  utility-linear-sRGB OCIO file applied as an adjustment layer has brought me back to what I see in both the Render frame buffer and photoshop and I've saved it as a preset for future use. I have also done a jpeg export test an it fairs pretty well, not a massive shift in the greens which is good. This might mean I can stay in linear space whilst editing which as you say is better but I have had experiences in the past where its tripped me up on export with colour and contrast shifts compared to keeping everything non linear sRGB.

 

So the next Q is - can I make that adjustment layer permanent for the whole stack of render passes that I have below this adjustment layer without flattening the stack? I can see issues cropping up with a mixing of converted and non converted layers getting mixed up above and below the adjustment layer which could be avoided if I could make the adjustment layer permanent instead of live.

 

Thanks again, you have been a big help. 

Link to comment
Share on other sites

A couple of things:

 

1) Sort of related, at least an FYI - OCIO has been implemented as a Photoshop plug-in:

 

http://fnordware.blogspot.com/2017/02/opencolorio-for-photoshop.html

 

in case you want to apply a transform to a layer in PS (maybe to compare the results).  It is a destructive transform though, unlike AP's implementation as an adjustment layer.

 

2) If you keep the OCIO adjustment layer at the top of the layer stack and turn layers below it on and off, you can see the effect that the persistent OCIO layer has on the particular layer below it that you are visualizing.  However, AP does not have layer comps like PS does, so if you want to export a particular state of the layer stack, you need to do an export to a file (JPEG, TIFF, etc.) to burn the OCIO adjustment layer into the stack at its current state.  

 

Otherwise, you could create a "Macro" (AP's version of an action) to create an OCIO adjustment layer at any point in the stack you choose.  Then you could group the OCIO adjustment with the particular layer and turn the whole group on and off, giving each layer that needs the OICO transform its own instance of it (at least avoiding the chance that a layer that does not need it getting it mistakenly).  Unfortunately, AP does not permit grouping in a Macro, so you would have to group manually.  Bummer for sure.  I suppose you could create a Macro that does the following:

 

0) Select the layer you want to affect (i.e., transform with OCIO);

1) Run a Macro that does the following:

    a) create an OCIO layer above the current layer;

    b) select the preset transform that you want;

    c) select the OCIO layer and the layer you want to transform and merge the two.

End.

 

Repeat.

 

This will burn the OCIO transform into the selected layer.  This way you can apply (destructively) on a layer by layer basis the transform, skipping the layers that do not need it.

 

Maybe?

 

Kirk

Link to comment
Share on other sites

Thanks once again for your useful help Kirk.

 

Ive done a simple screen grab to compare to the native photoshop handling and it looks bang on to my eyes to be honest.

 

Yes bummer there is no option to blanket apply the OCIO to the whole document on opening for sure. Good tip on the macro though. I will need to investigate further on the most optimum way of handling this for 15 or so layers at once as it will be tiring doing it for each one. The grouping option could work but I often need to mix layer orders up so the process might break down.

 

On a separate note I've tried to import my photoshop brush collection that I use all the time but to be honest they dont play well with affinity which is a big stumbling block. Im sure I could recreate similar ones in affinity but its another time consuming process and some compromises might have to be made. I like the way you can create a full colour stamp brush in affinity though.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.