GH4 A fully logarithmic color space for Cinelike D and V-Log L

balazer

Well-known member
This work has been superseded by Logarist

The following old information is retained just for reference.


I have developed LUTs to transform Cinelike D footage and V-Log L footage into a fully logarithmic working color space optimized for color correction. In this color space, you can perform exposure compensation and white balance correction just as easily and accurately as you can with raw images. In fact, the color space is very similar to the one that Adobe Lightroom uses internally. The color space is implemented as Adobe Cube and DaVinci Cube LUT files, so you should be able to use it in many popular video applications.

These are technical LUTs for color space conversion, not generic .cube "look" LUTs. Not all applications can read these LUT formats. The LUT package includes test files and instructions to confirm that your video application maps video levels and loads the LUTs correctly.

I've made a great effort to interpret the Cinelike D color space properly, effectively inverting the GH4's internal color processing pipeline. Interpreted this way, Cinelike D's color accuracy appears to rival V-Log L. But please try it for yourself and let me know what you think. Cinelike D is not subject to severe 8-bit chroma banding like V-Log L is. Cinelike D is also easier to shoot with, because the camera's monitor shows a more natural image that you can use to judge exposure and white balance. See here how I'm able to achieve uniformity of color across a wide range of exposures in Cinelike D:

Starting in version 0.12 of my LUT package, the V-Log L transform is calibrated for the colors of the GH4's V-Log L output. With gamut calibration, color accuracy is now better than with the Panasonic V-Log/V-Gamut transform that I had used in previous versions. V-Log L can be matched fairly closely to Cinelike D using the respective camera-to-log LUTs.

The log space has approximately 14.5 stops of dynamic range between 0.0 and 1.0, with middle grey placed at 0.5. Exposure compensation is performed as equal offset operations on the R, G, and B channels, and white balance correction as differing offset operations on the individual R, G, and B channels. The color space is designed to minimize hue shifts when performing contrast adjustment. Contrast adjustment is made by altering the slope with a pivot at or around 0.5. You can also use curves in this color space, though precise control may be difficult because of the large dynamic range and perceptual non-uniformity of brightness in the space. Because the space is logarithmic, highlights are increasingly squished together towards 1.0, and shadows are increasingly spread out towards 0.0.

For working with curves, I've designed a second color space with the same gamut as the log space, but with a gamma encoding. Between 0.0 and 0.5 this space uses the Rec.709 gamma curve, scaled to 1/2 its normal value. The curve is extended from 0.5 to 1.0, to encode an extended range of highlights. So 0.5 in the gamma space is 100% Rec.709 (the white point; clipping), and 1.0 in the gamma space is 200% Rec.709. When using curves, you must keep this in mind and do most of your correction in the lower left quadrant of the curve, and work in the right half only when you want to bring highlights down into the Rec.709 range. Use of the gamma space is completely optional: you may choose to do all of your correction in the log space.

A set of LUTs transforms from the log or gamma space into Rec.709, for display and rendering.

Rec.709 LUTs:
  • input from log or gamma
  • with or without a highlight roll-off

Most users will want the Rec.709 LUTs *with* a highlight roll-off. The versions without a highlight roll-off are a strict interpretation of Rec.709, suitable only for controlled lighting without bright highlights, e.g., a studio environment, or for users who wish to add their own highlight compression using a curves filter. My highlight roll-off compresses highlight luminance, reducing contrast in the highlights while preserving hue and saturation. The Rec.709 output has reference black at 0.0 and reference white at 1.0.

There are two basic workflows using my LUTs:

camera -> log -> Rec.709
or
camera -> log -> gamma -> Rec.709


You must use two or three LUTs. Use of one LUT by itself will yield incorrect images.

GH4 Camera Settings:
  • Cinelike D:
    • Luminance range: 0-255, 16-235, or 16-255
    • Contrast: 0
    • Saturation: 0
    • Hue: 0
    • Highlight shadow: standard
    • i.Dynamic: off
    • Master pedestal level: 0
    • You must use the above settings, or else the video will not be transformed correctly into the log space!
    • Cinelike D maps output values lower than other photo styles do, and the exposure meter reads lower. So your tendency will be to overexpose. Use zebras and watch for overexposure.
  • V-Log L
    • No special settings are required.
    • V-Log L maps middle grey 2/3 of a stop lower than Standard does at the same ISO setting. To be consistent with Standard, ISO 400 in V-Log L should have been called ISO 250. (I measured 0.64 stops difference)
    • In V-Log L, the camera's built-in exposure meter reads 2/3 of a stop higher than it does for Standard if you want middle grey mapped the same way. When the meter reads +0.0, it should say -0.7. (confirmed in firmware v2.3)
    • A reliable way to set exposure in V-Log L is to first set exposure in Standard, and then switch to V-Log L with an ISO setting 2/3 of a stop higher.

General Software Instructions:
  • Please see the test instructions inside the LUT package. It includes instructions and test files for determining which LUTs you should use with your video application, and tests to ensure that video levels are mapped correctly and transformed correctly by the LUT.
  • Create a folder on your hard drive with the LUT package version number, and copy the LUT files to it. That way when I release a new version of the LUTs, you can still have the old version in a separate folder, so that any projects using the old LUTs can still use them.
  • Starting in v0.13 of the LUTs, I use custom domains in many of the LUT files. Several of the LUTs will *not* work correctly if your application does not support the domain keywords of either the Adobe Cube or DaVinci Cube format. The included test LUTs will help you determine which LUT formats your application can read correctly.
  • The LUT files themselves also contain comments indicating how the camera's black and white levels should be mapped by your video software for the LUT to interpret the levels correctly. Open the LUT files in a text editor to see the comments. You can use video scopes to confirm that the camera's black level and white level are mapped correctly. Levels must be mapped in the way that the LUT expects, or else the transformations will not be done properly and you will obtain incorrect results.

FCPX Instructions:
  • The free FCPX LUT Loader supports 3D DaVinci Cube LUTs. (but not 1D LUTs and not Adobe Cube LUTs)
  • Add a LUT Loader effect with a camera-to-log LUT, and another LUT Loader effect with a log-to-Rec.709 LUT.
  • Re-order the effects to put the Correction 1 effect between the two LUT Loader effects.
  • Click the right arrow on Correction 1 to open the color board.
  • Perform exposure compensation by dragging the global exposure control up or down.
  • Perform white balance correction by dragging the global color control. (I presume that this is doing offset operations on the individual R, G, and B channels, but I have yet to confirm that)
  • I think the contrast control built into LUT Loader should be a good one to use in the log space, and probably on the first LUT Loader instance, but I haven't confirmed that.
  • LUT Loader can't load 1D LUTs, so use the 3D version of my log-to-gamma LUT.
  • Color Finale 1.0.18 and earlier may or may not support 3D Adobe Cube LUTs, depending on your locale. A future version is supposed to fix that. Color Finale cannot read 1D LUTs or DaVinci Cube LUTs. Color Finale can't do any offset control or contrast control appropriate for a log space, so you will need to use other effects for exposure compensation, white balance correction, and contrast adjustment in the log space. Its curves should work well in the gamma space.
  • The motionVFX mLut plugin doesn't support Adobe Cube LUTs or DaVinci Cube LUTs.
  • LUT Utility doesn't support Adobe Cube LUTs or DaVinci Cube LUTs.

DaVinci Resolve Instructions:
  • Resolve needs the DaVinci Cube LUTs. It does not support Adobe Cube LUTs.
  • Create a folder named with the LUT package version number, in C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\LUT
    in Windows, or in /Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/ on a Mac, and copy the LUT files to the newly created folder. Keeping a separate folder with the version number will allow you to add new versions of my LUTs later while allowing projects to still reference the old LUT versions
  • Set the project color science to DaVinci YRGB.
  • In Resolve 11, sometimes upon loading a LUT, Resolve forgets which color science it's supposed to be working in, and the colors go crazy. Switch the color science to ACES and then back to DaVinci YRGB to fix this.
  • Set a camera-to-log 3D LUT on the media, or in the project settings as a 3D input LUT. Resolve does not need the [expanded] version of any input LUT.
  • Set a log-to-Rec.709 LUT on a corrector node, or in the project settings as a 3D output LUT.
  • Use the corrector node's offset control to perform exposure compensation and white balance correction.
  • Use the corrector node's contrast control with a pivot around 0.5 to perform contrast adjustment.
  • If you want to use the gamma space, you need two corrector nodes: set a log-to-gamma 3D LUT on the first node and a gamma-to-Rec.709 3D LUT on the second node. Make log-space corrections on the first node and gamma-space corrections on the second node.

Sony Vegas Pro 13 Instructions:
  • Download and install the free VisionColor LUT Plugin for Sony Vegas Pro 13. The plugin can load Adobe Cube LUTs.
  • In project properties, set the pixel format to 32-bit floating point full range, the gamma to video, and the View Transform to Off.
  • Add a VisionColor LUT Plugin with a camera-to-log LUT to your media effects, or video event effects at the beginning of the filter chain. Vegas needs the [expanded] version of each input LUT, if available.
  • At the end of the video event filter chain, or in the track or master video effects, add another LUT plugin with a log-to-Rec.709 LUT.
  • After the camera-to-log LUT, use the Brightness and Contrast filter for exposure compensation and contrast adjustment. Hold down the control key and drag the slider to make fine adjustments.
  • After the camera-to-log LUT, use a Channel Blend filter for white balance correction: adjust the R, G, and B channel offsets in the last column. Hold down the control key and click and drag between the arrows to make fine adjustments.

(download links removed)

IT IS VERY IMPORTANT to follow the test instructions included in the LUT package. Since these are not simple "look" LUTs, you must ensure that levels are mapped in the expected way and the LUTs' domains are interpreted properly. I have only tested them myself in Sony Vegas Pro 13 and DaVinci Resolve 11. If testing shows that your application does not interpret the LUTs' domains, you can try the v0.12 LUTs, which did not use custom domains, but do not support as many camera settings.

Change log:
  • v0.1: initial release with Cinelike D 0-255, and V-Log using Panasonic's V-Log/V-Gamut transform
  • v0.11: corrected a formatting problem in the .cube files
  • v0.12: added color calibration for the GH4's V-Log L output
  • v0.13: DaVinci Cube format added; support for Cinelike D 16-235 and 16-255 added; support for video applications that don't read the video_full_range flag added; xvYCC decoding of Cinelike D added; test images and test LUTs added
  • v0.14: 3D log-to-gamma LUT added; improved test procedure.


This is a work in progress, so I welcome your questions and comments. My plan is to settle on the color space specifications, and then add support for more cameras, and a linear space for photometric compositing. I don't use Adobe Premiere or any other video software, so I would welcome instructions and guides for other software in this thread.

v0.1 color space specifications:
  • Log space:
    • Gamut: ProPhoto RGB
    • Opto-elecronic transfer function: logarithmic, with middle grey at 0.5 and 0.069 units per stop
  • Gamma space:
    • Gamut: ProPhoto RGB
    • Opto-eletronic transfer function: ITU-R BT.709 transfer function, divided by two. Middle grey is at 0.192
  • Rec.709:
    • Gamut: ITU-R BT.709
    • Opto-electronic transfer function: ITU-R BT.709 transfer function, with middle grey mapped to 0.384

Big thanks to mash_gh4 for providing GH4 footage.
 
Last edited:
OH, that seems incredible! Do you know if they should work within FCPX? I'm trying but there's an error notification when I use them with LUT Utility..
 
@balazer and @mash_gh4

WOW!!!! Thank you so much... I tried this with Final Cut Pro X and it works perfectly for both the VLog LUT and also the CineD LUT. I normally use Film Convert for the CineD profile and I am able to get really good skin tones with it.
I also purchased Pauls LUT and although I appreciate his effort I actually get better results with Film Convert along with some other plugins. That is until now... IMO your CineD LUT is the best that I have seen thus far for skin tones using
the CineD profile. The VLog looks great as well and as you said they look almost identical. I guess everybody has different tastes for LUTS or LOOKS but for some reason the LUTS that you created hit the sweet spot for me.

I am stoked ;-) Now I have 2 really solid profiles.

Thanks again much appreciated.
 
Last edited:
thanks balazer for this great effort!

i'm not convinced that this kind of poor mans ACES workflow imitation is they way to go.
it reminds me of all this available incompatible proprietary commercial solutions. but it's a very interesting attempt -- perhaps the most advanced and accurate solution available to gh4 users currently.

i prefer to stay as close as possible to established standards and available tool chains. sure, i see the reason for this more simplified LUT centered approach. it looks like a simple solution at first glance, but it's getting very unhandy, incompatile , and error prone in the long run. i think, we should better improve our tools to use the real thing.

it makes sense to use narrow color spaces for more efficient tansport and file format compatibility, but 12bit ACES proxy looks more attractive for this purpose than arbitrary chosen other alternatives.

nevertheless i really like your tireless striving for more satisfying solutions!
 
Last edited:
Thank you, so far really good. Your thoughts on sharpening and NR? Using(in resolve) camera>log>.709, what advantages are there in Camera>log>gamma>709?
 
OH, that seems incredible! Do you know if they should work within FCPX? I'm trying but there's an error notification when I use them with LUT Utility..
I'm not getting an error, but nothing seems to happen at all when using FPXLUT Loader. I know they are packaged as .cube files, but are these 3D LUT's?
 
I don't know what was wrong but I got them to work by opening the LUTs in DaVinci Resolve 12 and then export them from there. They now work GREAT in FCPX using LUT Utility as well as Color Finale!
 
Thanks for the feedback, guys. I think my .cube files were not formatted correctly. I will fix the formatting and upload new versions soon.
 
I have corrected a formatting problem in the .cube files. I believe they will now work in FCP X. Please try and let me know.

In case it was not clear, my LUTs are not "look" LUTs. I did not sit in front of the computer and tweak the colors of an image until it looked good to me. They are technical LUTs for conversion between color spaces. They were made with a lot of measurements, math, and color space specifications.


Hi, mash_gh4. Yes, I know what you mean about sticking with established standards. I debated the pros and cons of just doing an ACEScc implementation, instead of brand new color spaces. Simply, ACES and I have different goals. I want to bring better color correction to video editors. ACES and ACEScc are standards for the film industry.

Though ACES and ACEScc can be used with regular video editing software, I've found that they have a lot of problems. Video editing software is just not designed for those kinds of color spaces. ACES has too large a range of color values, and ACEScc has too large a dynamic range. Also, video editing software color correction tools are designed assuming a perceptually uniform encoding, not a logarithmic encoding, which distributes values far differently. So while you can use ACES and ACEScc in regular video editing software, it's a struggle. Film-style color correction tools don't have those problems. They were designed for log spaces, years before ACEScc existed. I could have used ACEScc as my log space, but they made a lot of choices that I don't agree with. They chose a gamut that's very close to Rec.2020, but not exactly! They made the space very lopsided, with a huge highlight range and middle grey at 0.41. They set the white point close to D60, but not exactly! They chose a dynamic range that makes for a long repeating decimal number of units per stop.

My color spaces are strictly working spaces. They exist in memory: you never write files in those spaces. So it didn't make sense for me to chose color spaces based on standards for files. And it didn't make sense to choose color spaces for color tools that we don't have access to. It made sense for me to choose color spaces that would work well with the tools we have. Such spaces didn't exist, so I made my own. If anyone wants it, I can create transforms to go between my color spaces and ACES.

Don't get me wrong, I appreciate what ACES has done. I've been one of their few proponents for a while now. I learned everything I know about color using ACES and ACEScc. And what I'm doing now with my LUTs is possible in large part because of ACES and the IDTs that we now have access to. I just don't believe ACES is the best solution for the problems of regular video editors.
 
Wholeheartedly support this approach. I know mash is on a one man crusade regarding ACES ;-) but for all the reasons you state above, the ROI is too low. This approach is eminently practical, which is much appreciated.

I haven't had the time to play with these yet, but I have a preliminary question: I know this is slightly outside of your original goal, but for those times when minimal futzing is desired, could you make one LUT that bakes in the both transformations? i.e. Cine-D (per settings) to REC709 in one step?

The use case I am thinking about is for someone like my wife. She's newish to editing, and even newer to color correcting. Starting from the LOG transform is intimidating, but she would benefit from the work you've done. She could of course apply both LUT's, but since this is what she would do every time, it would be convenient to have it in one step. Just a thought.

I hope to get a chance to try these out this weekend, thanks again for the effort and for providing these to the community.
 
I'm working on a fix for FCPX LUT Utility and Color Finale. If you'd like to test something, please PM me.

Da Media Man, thanks for those test videos. I am surprised at how different the colors are between Cinelike D and V-Log L using my LUTs. I guess they are not so similar after all. I am not sure which one is better. A lot of the difference was just that V-Log L was more saturated. I can compensate by adjusting the saturation of either image. The samples below have just exposure compensation and color balancing, no saturation adjustment.

Cinelike D: (click for full size)


V-Log L:


joe12south, no, I am not planning on making an all-in-one LUT. The whole point of this approach is to make basic color correction very easy. At the very least, your wife should be able to put a brightness filter in between the LUTs to perform exposure compensation.
 
I am surprised at how different the colors are between Cinelike D and V-Log L using my LUTs. I guess they are not so similar after all. I am not sure which one is better. A lot of the difference was just that V-Log L was more saturated. I can compensate by adjusting the saturation of either image. The samples below have just exposure compensation and color balancing, no saturation adjustment.

I did a quick test and see significant differences, as well. My Cine-D settings were not exactly as proscribed, so I won't post the results here or make too much hay about it, but If your input data for each profile is correct, shouldn't the output after your LUT match to a fairly tight tolerance? How are you "profiling" each profile. ;-)
 
The camera settings really do matter for Cinelike D. The LUTs were made from a profiling of the camera with those settings. Any conclusions drawn with the incorrect settings may be misleading.

The Cinelike D LUT uses a profile of the camera's contrast curve, along with some other magic. But I assume a Rec.709 gamut. It may be that the colors are not really in that gamut. I am working on a way to profile the camera's gamut.

The V-Log LUT is exactly per Panasonic's V-Log/V-Gamut specification. I did not do any profiling of V-Log L. If the colors are wrong in V-Log L, it's Panasonic's fault.


So far it appears that Cinelike D has more accurate colors than V-Log L. So I would suggest using Cinelike D. There's not much other reason to use V-Log L anyway: it's dynamic range is practically the same, only about 1/3 of a stop greater, and V-Log L has all that nasty color banding. Delucio had told me he was getting really accurate color for Cinelike D, especially for skin tones, and that V-Log L was oversaturated and showing a magenta shift. I couldn't tell much from looking at Da Media Man's tests. Cinelike D and V-Log L were different, but I'm not sure which one is more correct. They might both have some problems.

For FCPX users: I am still narrowing down the problem with LUT Utility and Color Finale. The free FCPX LUT Loader has no problems loading the LUTs, so please use that for now.
 
The camera settings really do matter for Cinelike D. The LUTs were made from a profiling of the camera with those settings. Any conclusions drawn with the incorrect settings may be misleading.

The Cinelike D LUT uses a profile of the camera's contrast curve, along with some other magic. But I assume a Rec.709 gamut. It may be that the colors are not really in that gamut. I am working on a way to profile the camera's gamut.

The V-Log LUT is exactly per Panasonic's V-Log/V-Gamut specification. I did not do any profiling of V-Log L. If the colors are wrong in V-Log L, it's Panasonic's fault.


So far it appears that Cinelike D has more accurate colors than V-Log L. So I would suggest using Cinelike D. There's not much other reason to use V-Log L anyway: it's dynamic range is practically the same, only about 1/3 of a stop greater, and V-Log L has all that nasty color banding. Delucio had told me he was getting really accurate color for Cinelike D, especially for skin tones, and that V-Log L was oversaturated and showing a magenta shift. I couldn't tell much from looking at Da Media Man's tests. Cinelike D and V-Log L were different, but I'm not sure which one is more correct. They might both have some problems.

For FCPX users: I am still narrowing down the problem with LUT Utility and Color Finale. The free FCPX LUT Loader has no problems loading the LUTs, so please use that for now.
I'll be shooting some tests using the recommended settings tomorrow, including charts. I'll post results.
 
An update for FCPX users:

LUT Utility and Color Finale do not support the Iridas/Adobe Cube LUT format. They can load some stripped-down Cube files and perhaps other manufacturers' variants, but not the format as originally specified by Iridas or later updated by Adobe. You can contact the maker of LUT Utility and request that they support the Adobe Cube format. Refer them to the Adobe Cube LUT Specification Version 1.0.

The free FCPX LUT Loader works fine with Adobe Cube files.
 
An update for FCPX users:

LUT Utility and Color Finale do not support the Iridas/Adobe Cube LUT format. They can load some stripped-down Cube files and perhaps other manufacturers' variants, but not the format as originally specified by Iridas or later updated by Adobe. You can contact the maker of LUT Utility and request that they support the Adobe Cube format. Refer them to the Adobe Cube LUT Specification Version 1.0.

The free FCPX LUT Loader works fine with Adobe Cube files.

MLUT's from motionvfx also works with Balazer's LUTS.
 
Cine-D > LOG > 709
CINED)LOG)709.jpg

Cine-D > Leeming 126
CINED)Leeming126.jpg

Nothing done to either clip other than to apply the LUTS. Both luminance and saturation are significantly off.
 
Back
Top