LUTCalc is a desktop app for generating, analysing and previewing 1D and 3D Lookup Tables (LUTs) for video cameras that shoot log gammas.
It started out as a simple spreadsheet for generating S-Log2 exposure shift LUTs for Sony's F5 and F55 cameras. What began as a hobby gradually became more of an obsession which has developed into a flexible tool for creating and then shooting with 'looks'.
My name is Ben Turley and I am a professional lighting cameraman and DoP in the UK. I have written LUTCalc from scratch to help me with my day to day work. I use it to create MLUTs for the Sony F cameras I currently most often use. If shooting log I also make grading versions so that post can start off working with 'my' look. The charts and exposure values have also helped me to understand the way that modern cameras handle wide exposure ranges giving me good, consistent results. Many of my clients do not currently want or need log, and I frequently bake-in my personalised looks developed with LUTCalc.
I have worked to make the tools familiar to me in my work with film and video cameras; for example colour temperature can be set directly but also with a CTO / CTB slider akin to lighting gels.
I have also come to realise that at present it is far too easy for LUTs to behave inconsistently between bits of software (or cameras). LUTCalc allows you to set all levels as you wish, but also offers simple presets to help consistency in various applications. This is an ongoing process and I am grateful for the help I have had in checking results and discovering when I have made mistakes!
More details about LUTCalc can be found in the 'Features' sectionBack To Top
LUTCalc v3.0 Update - 6th March 2017 - Gamut Limiter, Interpolation Code, 'Standard' Gammas, P3 White Point Options, Custom Colour Space.
Hi All. It's been rather a while since I last updated LUTCalc. I have been working on it in bursts, and in particular completely overhauling the 3D interpolation and extrapolation code behind LUTAnalyst and the LUT-based colourspaces such as LC709A.
First off though is 'Gamut Limiter'. I had a go at this in an earlier version, but this is a new approach and complete rewrite. It should be good now!
The problem is what to do with the left over colours when going from a wide gamut such as S-Gamut3.cine to a narrower one such as Rec709. The output gamma choice helps, as does hard clipping (though at the expense of potentially odd colours or harsh transitions). Gamut Limiter desaturates any colours which are out-of-bounds.
The result should be better looking, 'legal' LUTs. Just turn it on once all your other tweaks are done and leave it on the default settings. For more techie or postproduction types, there are a bunch of adjustments that can be made, but for most the default should be best!
Next to the interpolation and extrapolation code. Several of the more complex gamut options (LC709A, V709) are approximations of manufacturer's looks, stored as LUTs. I have completely rewritten the LUT processing code to be clearer, more maintainable and (hopefully) quicker.
I've also added the capability to perform three styles of 3D interpolation: tricubic, tetrahedral and trilinear.
* Tricubic is what LUTCalc has used to date, is the most complex and inherently produces smooth results. However, extreme differences between mesh point can lead to overshoots and the potential for odd results. Complex also means slowest.
* Tetrahedral is probably the most common approach in postproduction (including ACES), and I now use this as the default. It is computationally light, so quick, and as it is increasingly the standard approach should lead to good, consistent results. The downside is that it is less smooth than tricubic, but avoids the possibility of overshoots.
* Trilinear is a basic extension of linear interpolation to 3D. Very common and straightforward, it shares many of the advantages and disadvantages as tetrahedral. For extrapolation - estimating values beyond the LUT's range - trilinear gives much better results than tetrahedral and is the approach used alongside all the interpolation options.
Along with the LUT code itself, I have completely rewritten the LUTAnalyst code, which should give more faithful results.
After several long and careful sessions with cameras and charts, I have added approximations to the Sony STD and Canon EOS and Normal gamma curves.
Following suggestions from several people, there is now an 'Auto Title' button next to the LUT Title box, which fills in a title based on the input and output gamma and gamut settings, plus - if customised - the black and saturation level.
Besides some other tweaks and bugfixes, the other main updates are to the more 'techie' options in colourspaces. I've clarified the naming of the P3 options, so there are now D60, D65 and DCI white point options available.
For the even more techie, I've also done a substantial rewrite of the Custom Colour Space code. Matrix calculations from primaries and white points are now much more robust when changing working colourspace, and there is now a 'Set Primaries' button which will calculate primaries from a well-formed matrix.
Whilst the look of the app hasn't changed much, I have done a great deal of work under the hood. From my own testing all seems well, but as ever feedback is very welcome at firstname.lastname@example.org.
BenBack To Top
LUTCalc v2.90 Update - 18th October 2016 - Batch Generation, Gamut Limiter, New Gammas, RGB Sampler.
Last month I slipped out an update, v2.60, without mention here. It included a couple of useful features. The first was LUT batch generation, so that it is now possible to produce a full set of exposure-corrected LUTs with one click. The other main feature was 'Gamut Limiter', which aims to reduce the possibility of ugly colour clipping when going from a wide gamut to a narrow 'vanilla' Rec709. Please do let me know your thoughts on those.
I also changed the information pages a little. Tables now give the IRE/code values for the chosen camera's sensor clip (in place of the semi-arbitrary 1350%) and the list of general log values has been replaced by more detailed information about the current selection.
So, that was v2.60. v2.90 brings additional gamma choices, plus a tool for sampling RGB values from the preview window. Also, um, a couple of bugfixes.
The new gammas are BMDFilm4.6k, the BBC 0.4, 0.5 and 0.6 gammas and my interpretation of Canon's EOS Standard and Normal 1, 2, 3 and 4 curves.
I have derived the Canon curves from experimentation careful analysis and the use of the new 'RGB Sampler' tool. Previously LUTCalc has displayed 10-bit code values for the cursor on the preview window, and RGB Sampler extends this.
You can define a set of points on the preview window and then read the RGB values for these points. Load a different preview image in and you can then retake the same points, or redefine them for the new image. Once you have built up a set of samples, you can then save them to a text file for further use, such as in a spreadsheet.
RGB Sampler works in all versions of LUTCalc, but the online and Chrome versions are currently limited to the 8-bit image handling of web browsers.
The Mac App version is able to read 16-bit tiffs and pngs, which gives the RGB Sampler the potential to be a really useful analysis tool.
Lastly, v2.90 is a bit of a jump from v2.60. The reason is that whilst I have a few small additions planned for version 2, I am currently working on a few substantial changes under the hood. These should make LUTCalc easier to maintain and develop and add flexibility and speed. The downside is that on the Mac App the changes I would need to make to the wrapper would no longer support macOS 10.9 Mountain Lion. Considering all that, my intention is to call that v3.
I don't expect v3 to be ready for some time, and as I say there are a few more bits I'd like to add before I go there so please do let me know what you think at email@example.com.
BenBack To Top
LUTCalc v2.53 Update - 23rd August 2016 - Black Gamma, C-Log3, Log3G10 and bugfixes.
I haven't had much chance to work on LUTCalc lately, but having finished a big shoot a few weeks ago I've now had a chance to have a play. First off, I've added a 'Black Gamma' tool, for adjusting contrast in the shadows without altering the actual black level. I will likely refine the code (particularly the 'feather' option) so feedback would be welcome, but I'm happy that it is doing what I wanted it to, and fills the gap of a common in-camera adjustment that was missing from LUTCalc.
This version also fixes a bug which meant that the LUTAnalayst tool was not automatically updating the gamut in the preview window when it had read a LUT.
Just after I had submitted the v2.5 update to the App Store, I had a couple of emails, one asking about Canon C-Log3 and the other RED's REDWideGamutRGB and Log3G10. To be honest I wasn't aware of either, but having been filled in I have added them as options.
The response curves fit with available documentation, so I have included them in this update (hence v2.53), but as I am not a regular RED or these days Canon user, it would be great to hear from those who are. The correct range settings in particular would be really useful.
Lastly, I've added a couple more cameras to the list - Panasonic GH4 and Sony FS5. This doesn't affect the LUTs produced, but hopefully makes things easier and clearer for users of those cameras.
I still need to have a play with a PQ monitor - the code for PQ is correct, but as ever the ranges are a pain. As soon as I get a chance to properly play and confirm how things should be, I will put out another update.
As ever, feedback gratefully received at firstname.lastname@example.org.
BenBack To Top
LUTCalc v2.4 Update - 25th May 2016 - Print charts and levels, Alexa 709, DJI D-Log, UI improvements and bugfixes.
Things have been quiet for a while as I've been busy in the day job (phew!). During the gap I have also been adding to and adjusting LUTCalc, so have now released v2.4
A piece of feedback that I've had is that it would be handy to generate pdfs or printouts of charts and IRE / 10-bit values. Above the chart I have now added a 'Print Chart' button to do that.
I've done a fair bit of analysis of the Alexa Classic colour space (ALEXA-X-2 in the Amira), outlined in a white paper 'ALEXA LogC Curve - Usage In VFX' from Arri. Basically the matrix parameters (which Arri gives) are applied to a tone map (which they don't) rather than linear data. I'm happy that I've figured the tone map sufficiently accurately, so have now included the gamma and gamut to LUTCalc. Let me know what you think!
The Amira has a slightly different standard Rec709, which as far as I can tell is not a straightforward tonemapped matrix; I have included the gamma curve, but not the colourspace / gamut for that.
Recently I bought a DJI Osmo which includes a 'D-Log' option. I couldn't find any documentation about what D-Log actually is, so I carefully tried to figure it out through testing. The resulting gamma curve is now included.
When the LUTAnalyst tool has analysed a LUT, the resulting Gamma and Gamut output options will now automatically be selected. This now seems like something I should have thought of to do ages ago, but hopefully should clear some confusion I have had from a user or two!
Another user asked for ProPhoto / ROMM colourspace and gamma. Done.
Lastly, alongside some mathematical fine tuning, I have change the 'Linear / Rec709' submenu to now read 'Linear / γ'. It was strictly speaking inaccurate, my intention being to keep things understandable for dabblers as well as experts, but I have now had enough emails from the expert-y side asking where the linear and gamma options are to hope that this is clearer!
As ever, feedback gratefully received at email@example.com. Very sorry for being rather (really) slow to reply lately, excuses are heavy filming schedule and a wife and daughter keen to share some of my spare time ;-). I really do read all the feedback, it's just that anyone who has caught me on a forum will know that I tend to fall off the deep end in framing answers :-).
BenBack To Top
LUTCalc v2.3.7 Update - 9th February 2016 - Hypergammas, Hybrid-log, reverse Rec709(800%) and bugfixes.
For this one I've worked my way through all of Sony's Hypergamma curves, revisiting 7 and 8 and adding 1 through 6. As I have been told that CineGamma1 is another name for HG4, and CineGamma2 is HG2, I've added those as well!
Hybrid Log-Gamma is a High Dynamic Range display gamma developed by the BBC and NHK. It is an alternative to the Dolby PQ proposal. I believe that it is a development of the suggestions in the BBC white paper I used for earlier HDR display gammas
Rec709(800%) is now available as a 'Recorded Gamma' option. This is the default CineEI 1D LUT, so whilst it is not a particularly desirable workflow, if someone has a log workflow but at some point accidentally bakes-in Rec709(800%), this should make it possible to return to a decent approximation of log in order to drop in with the normal rushes.
There are small bugfixes to the look of the chart plotting and I've fixed a tiny but critical bug in the code for building SPI3D format files.
Lastly, I have added a provisional monitor LUT preset for SmallHD, based on information from the manufacturer. I haven't been able to directly confirm it yet, so please do feed back if you give it a go.
As ever, if you find something up with the new version, get in touch at firstname.lastname@example.org and set me straight. ;-)
BenBack To Top
LUTCalc v2.3.4 Update - 24th November 2015 - More gammas, gamuts, presets and bugfixes.
I've been looking into the range and clip settings which will work correctly on various bits of hardware and software, including FCPX LUT Utility, Scopebox and the AJA LUT-box. I've also added a 'generic' camera, for cameras which are not currently listed, plus a number of new gamma and gamut options.
On that note, the lists of options were getting rather long and unreadable, so I have now organised them into subcategories, plus an 'All' option which shows, well, all of them!
There are also several bugfixes, including the ability to save binary format files in the Chrome and Mac OSX App versions.
As ever, thanks to those who have provided feedback and helped me figure out presets. If you find something which seems awry with the new version, let me know at email@example.com and I'll see what I can do!
BenBack To Top
LUTCalc v2.1 Update - 28th September 2015 - I've uploaded my first v2 update to LUTCalc.
Included is a new adjustable knee tool, plus bug fixes to settings loading and the Resolve 'ilut' and 'olut' formats and an important fix which meant that the output range was not necessarily being set correctly for the chosen format preset. In those cases the output setting would have to be set manually.
The knee tool can quickly and easily produce smooth and accurate results with any output gamma, and the preset bug fix is important, so updating is a good idea.
Thanks to those who have helped me pick up on bugs so far. If you find something which seems awry with the new version, let me know at firstname.lastname@example.org and I'll see what I can do!
BenBack To Top
LUTCalc is currently available in three versions: as an online Web App, as a Mac OSX App and as a Google Chrome Desktop App.
LUTCalc For Mac - available from the Mac App Store. Runs like a native Mac App and has the advantages of quick starting from disk without needing an internet connection, flexible file saving and the ability to load 16-bit TIFFs and PNGs as preview images (the online version is limited to 8-bit images).
LUTCalc For Chrome - available from the Google Web Store. Runs in a window like a native app and has flexible file saving. As a Chrome app it works on both Macs and Windows PCs. It has most of the advantages of the Mac version, though preview images are currently limited to 8-bit as with the online version.
Instructions and information about all the options in LUTCalc can be found when running the app by clicking 'Instructions' on the right hand side of the main window.
Alongside the time spent in developing LUTCalc, there are ongoing costs involved in developing for the Mac App Store and Google Web Store. As such there is a small charge for these versions.
The offline versions offer significant conveniences and I've kept the cost less than a coffee. If you find the online version useful, I'd really appreciate anyone buying an App Store version!Back To Top
A two-part introductory screencast to using LUTCalc. Part one covers the basic operation of LUTCalc for generating LUTs and part two goes into the customisations and effects possible with LUTCalc.
Part One - Basic Operation
Part Two - Customisation
- LUTCalc understands almost all log flavours in use today, plus standard gammas such as Rec709 and manufacturer-tuned versions. Log and conventional gamma data has been taken from manufacturer-published documentation or standards papers.
- LUTCalc can produce accurate exposure adjustment LUTs for use in post where a simple tool is often not currently available, such as with Sony's CineEI.
- Convert between any of the included log and conventional gammas or to one of a number of creative looks modelled after those available in camera, either as a 1D tone curve only conversion, or as a full 3D colourspace conversion (such as S-Log3/S-Gamut3.cine to Rec709(800%).
- Change the input settings but not the output settings as a base when working with different camera models on a multi camera shoot.
- Customise looks to taste, from simple black level and saturation adjustments to more complex effects such as desaturating specific colour ranges.
- Adjust colour temperature either by CTO / CTB as with gels or by source and desired colour temperature.
- Plus Green / Minus Green slider to correct for fluorescent lighting.
- Take white balances from test images.
- Output to any of a number of common LUT formats, automatically adjusted for the intended use (MLUT or specific post software).
- Produces MLUTs suitable for loading directly into Sony's cameras (as User 3D MLUTs), with other in-camera options in development.
- LUTCalc provides detailed exposure information about any look it generates, such as the recorded levels for absolute black, a correctly exposed 18% grey card or 90% white card and others. It takes into account any adjustments and tweaks that have been made. The levels would ensure that when working to a monitor LUT the log recording would be correctly exposed as designed.
- Charts show the tone curves for the recording and the output, plus indicate the absolute dynamic range of the camera - black clip and white clip - where it is known.
- The 'LUTAnalyst' tool can read LUTs in a number of formats. Where the recorded log and colourspace flavours it is designed for are known it will attempt to convert it for use as with any of the built-in options, and provide the same exposure and tone curve information.
- A 'False Colour' option can be used to generate accurate, log-curve specific exposure assistance MLUTs where it is not available in camera. Just don't bake it in!
- Full instructions and details of all options are provided.
- LUTCalc includes a number of built-in test images with charts such as high contrast and low contrast, greyscale and full colour gamut along with the option to load a .png, .jpg or .bmp.
- Waveform, vectorscope and RGB parade scopes.
- xy / uv Chromacity preview image displays the recorded and output gamut triangles and white points, incorporating adjustments.
- Tone curve charts as stop in / recorded level out, linear in / linear out and LUT in / LUT out.
- Provides 10-bit RGB readings from the Preview image.
Q: What does 'log recording' mean?
A: Log recording is a method for efficiently storing the useful information across wide dynamic ranges within limited bit depths (typically 10-bit, though in the case of the Canon C300 mk I 8-bit). I was asked to write an article for the UK's Guild Of Television Cameramen which explains log in depth and they have let me include a pdf: 'A Bit More Than You Ever Wanted To Know About Shooting Log'. It was first published in their 'Zerb' magazine.
Q: What is a 'LUT'?
A: LUT is short for (L)ook(U)p (T)able and in computing is a very common way to replace complex calculations with a limited number of precaculated values and then use interpolation to approximate the values in between.
It is a very efficient technique in terms of processing and if done well can be very accurate.
The most common use in video applications is in converting the spread of a camera's recorded levels (generally linear, with a gamma value applied or log) to a more visually appealing tone curve. This is known as a 1D LUT as the colour channels are fed to the LUT independently with a given input value leading to consistent output value.
Increasingly common are 3D LUTs, where combinations of colour channel values lead to combinations of output values. This allows for complex colour adjustments as well as the contrast of 1D LUTs, but also potentially leads to very large LUTs. To help with this, 3D LUTs tend to have much smaller dimensions than 1D LUTs, and then use interpolation.
Q: What is interpolation?
A: Interpolation means estimating values in between points on a graph. There are a number of techniques available, the simplest of which is linear interpolation.
LUTCalc uses cubic interpolation for 1D calculations and tricubic for 3D calculations to give very smooth estimates and generally very accurate values.
Q: How do I install LUTs in a Sony FS7 / F5 / F55
A: On the top right hand side of LUTCalc check 'Camera LUT (MLUT)'. Make sure that 'Sony User 3D MLUT (.cube) is selected.
On an SD card formatted in the camera, there needs to be the following folder structure: PRIVATE\SONY\PRO\CAMERA\PMWF55_F5
This is the case whether the camera is an FS7, an F5 or an F55. Copy the cube file generated by LUTCalc to the 'PMWF55_F5' folder and then load the SD card into the camera. In the camera's 'Files' menu there should be an option for 'Monitor 3D LUT' and in that 'Load SD Card'.
Select one of the available memory banks and then the camera will show a list of the LUTs available on the card. If you see any filenames beginning '._', scroll past them; they are hidden files created by OSX which the camera displays even though it shouldn't and just cause confusion. The correct files will be shown without a preceding '._'. Once loaded, they should then be available for use.
An important note is that in the 'Video' menu under 'Monitor LUT', setting 'SDI(Main) & Internal Rec' will irreversibly bake-in the look to the recording.Back To Top