Lut Support in Blender - OpenColorIO

Hi,
Blender is missing color management workflow which is very essential. For grading an HD footage to printing it on film really needs a lut based workflow support. Sony imageworks has released Open source solution for this kind of work. Is it so impossible to implement this feature in blender?

http://sites.google.com/site/opencolorio/

hey thanks for the link, currently using yCMS + avisynth for colour space conversions although yCMS is free to use and a documented open spec for creating 3D LUTs which are 96bit precision it supports good selection of video colorspaces it’s not open source app.

Interested to try this out for comparison

Hi yellow,
Had you tried grading and printing to film with this workflow? I am using Canon 7d / 550d footages. The lab guy told to use Rec.709 color space while start grading to get possible wysiwyg.

No such luck with opportunity to print to film or digital cinema projection for that matter. :frowning: I use a 3D LUT in a simple way to do video space to RGB conversions and back again, they are far more useful than that of coarse :-).

Hopefully Blenders next implementation of Colour Management will be 3D LUT based and choice in which to use for read and write exposed in the nodes / VSE, but I think also need a wider gamut than sRGB for getting the most out of export to digital cinema / film print.

I have a 550D too and you can get more out of it than Rec709. I see about 30% more colour information shooting full range levels 1 - 254 and using a 3D LUT for the RGB conversion but a monitor or LCD/LED Display capable of xv.color / xvYCC for getting the most out of that.

ffmpeg -i input -sws_flags lanczos+full_chroma_int+full_chroma_inp+accurate_rnd -f image2 output%05d.png

this command extracts to 550d footage to using full range levels 1-254.

yes, been using those SWScale flags in blender for sometime there are some tests I did on HDV on the blog in the sig. If you go to anim.c in blenders imbuf folder of the source code you can amend the existing fast_bilinear entry + add the extra swscale flags and have the advantage of that within blender.

Improved interpolation over fast_bilinear helps greenscreen keying a bit too :slight_smile:

I use Bicubic though haven’t gone as far as lanczos due I find it tends to sharpen and prefer to leave sharpening to last op before encode.

But to get xvycc ie the 1 - 254 range a wider gamut than sRGB is required.

The ‘correct’ conversion of YCbCr to sRGB is the 16 - 235/240 range mapped to 0 255 RGB. Using range outside of 16 235 in sRGB can result in gamut clipping of ‘illegal’ colors leading to artifacts unless a wider gamut is used. But blender is sRGB.

When the 16 - 235 range that’s been mapped to 0 - 255 and operated on as 0 & 1 in a 32bit workspace the 1 to 15 and 241 to 255 should be handled as negative and values over 1 in float operations, I think blender clips values outside of 0 1 so don’t think we’re getting the best with video conversion in Blender for grading if it’s not mapping the levels or dealing with the ‘out of gamut’ (for sRGB not AdobeRGB say) processing colour values other than clipping them off.

I think this is why so many NLE’s / codecs when they say they handle the full range just map the full range YCbCr into 16 - 235 then into RGB at 0 - 255. It can been seen when transcoding to an intermediate like huffy the full range gets mapped 16 - 235 by ffmpeg and that’s not lossless. :slight_smile:

Tone mapping would be a good way of gamut mapping wider xvYCC source into sRGB I think.

Be good to see blender use a wider gamut workspace especially with regard to digital cinema or film print DC being P3 colorspace. Using 3D LUTs allows more control and gamut mapping ops so would be good to see them implemented.

But thats great your getting more color info than 16 235. :slight_smile:

Yellow,
see my private message

This is still a very rough first impression, but there is work being done on this. Perhaps currently only localized in the compositor. but it could grow.

Greetings,
Jeroen.

Great to see OpenColorIO being implemented for 1D LUT color space conversions. :slight_smile:

I couldn’t see from your demo but are there any 3D LUT color model conversions included? For example going from YCbCr to RGB or is this still handled by ffmpeg swscale?

As someone with an eye in the code, a few queries I wonder if you could clarify if you have touched the code in following area.

With regard to YCbCr video import into Blender, I understand that Blender processing is RGB and that it can’t color process YCbCr natively? Do you envisage your OpenColorIO implementation handling that color model conversion, at high ‘quality’, which is currently done (not so well) with ffmpeg’s swscale?

With regard to that conversion, is the whole YCbCr data transferred to RGB, as Blender is 32bit float processing? or is it strictly 8bit out of ffmpeg and then into nodes?

With regard to the YCbCr channel splitting nodes, do they recieve RGB input or native YCbCr? If RGB then assume a reverse conversion done to YCbCr data for the purpose of those channel splitting functions?

I imagine you’ve already seen this, but just in case, blender is moving towards open color io https://github.com/thmxv/blender-ocio. Just in case new viewers did not know this information is from the July 31, 2011 developers meeting notes

Blender Developers Meeting Notes July 31, 2011/

Xaview Thomas started a project to get OpenColorIO in Blender. Give him feedback on the mail he sent today!

Yes and Xat’s first investigations are an interesting read.

Also interesting I think is OCIO’s addition of ACES IIF.

@niverik2k : This is really a great news… can’t wait to try the build

I am finishing up a program which will convert 3D LUTS like the .mga format into 3d objects which can be imported. This allows you to view the 3D LUT in the viewer of blender. I am also writing an export program which allows you to manipulate the LUT in the 3D viewer and export it as a LUT file. More info to come…

Attachments



1 Like

some progress :slight_smile: wondering how this could be useful for DI

This is like 10 years ago and I haven’t seen anything like this. Do you still have the codes to this? Any way I can test this addon out … perhaps on an older version of Blender? It will be great if I can load a LUT freely into Blender the way you are showing here.