Exploring Temperature and Tint

temperature-feature

When dealing with footage which was shot at improper white balance, and trying to correct it, I sometimes wished that Premiere had the temperature slider present in Camera Raw or in SpeedGrade. When a friend expressed similar concern, I decided to take my shot at it. After all, it should be relatively simple, right? It’s only moving the pixels towards blue or orange, and in the case of tint, towards magenta or green.

I even found a sample approximate algorithm to calculate the white point at a given temperature, and almost ended up using it. However, after reading on how the proper mixing requires conversion to HSL colorspace due to change in luma value of each pixel, I decided to explore the issue in more detail. It turns out, like with many other issues, that there are differences on what “temperature” exactly means in various software packages. Consider the following images:

original

Original image.

camera-raw-temperature

Camera Raw/Lightroom temperature adjustment set to -100. The image is brighter, and the tint is much stronger, washing out the shadows.

speedgrade-temperature

SpeedGrade’s temperature adjustment at -1.0 (equivalent of -100). The shadows are not washed out, although the image is darker due to clipped blue channel.

Clearly, Camera Raw is brightening the image, and almost looks like it is trying to mix the blue or orange solids with the picture. Perhaps similarly to what Tanner Helland described in the comments to his algorithm, but without the attempt to retain luminance. I find this adjustment not so great, especially for images with rich shadows that get washed out in the process.

On the other hand, the blacks in SpeedGrade are untouched, and it seems that the temperature/tint sliders operate only as gain adjustments, multiplying red and blue (temperature) or all three (tint) channels at the same time by roughly the same amount, and leaving the luma mostly intact except for the places, where the blue channel is clipped.

I even explored playing with gamma on the a and b channels in Photoshop L*ab color space, which directly code the interesting information (a is the tint scale, b is the temperature scale), but these were also not as satisfying as SpeedGrade’s. In the end, I decided to stick with the color correction software.

I experimented for a moment with the formulas and values, but in the end, I turned to Nuke to find how it resolves the issue, because it does provide an immediate numerical output. Finding out the exact adjustments was quite easy. Using grade and expression nodes I was able to mimic what Nuke was doing during temperature or tint adjustments, and came up with very simple formulas.

nuke

A very simple setup in Nuke allows to find the proper formula for handling temperature and tint adjustments to mimic SpeedGrade’s controls.

Implementing them as a plug-in for Premiere was relatively uncomplicated, and took me less time than writing the documentation for it. In fact, I was also able to successfully tackle OpenCL acceleration as well, but this will be incoming in the paid version some time in August.

A Storm Or A Spoon

luma-curve

Update: The 7.1 version due out in October is going to fix the issue altogether. Great job, Adobe!

Being the one to spoil the party is no fun, especially if you like the host, or enjoy the meals. But when your favourite dish was rotten and received only a little ketchup treatment, well… sometimes you have to be vocal about it.

Let me at first say that I love the party. To have an update within a month of the release, that fixes a major multicam bug (which for some reason I have not fallen prey to) and adds plethora of new features that will make life and editing easier is awesome. This is the power of Creative Cloud that a lot of people were talking about. There’s no denying, that the party is well deserved.

If you want to learn of all the new features and improvements to Premiere Pro which come with version 7.0.1 update, take a look at the official Premiere Pro blog or reTooled.net tutorial. They will show you the goodies, and these are plenty.

But unfortunately for me, one issue is not completely resolved. And it’s not for the lack of trying.

I wrote before about a nasty curves issue, and for some reason my post was not received with enthusiasm at the home of Premiere Pro. I really, really hoped it would be resolved in this update, and that I will be able to join the happy fest. Well… it is, and it isn’t.

The good news is that the curves no longer clip superwhites and superblacks on input. Depending on how you use the curves it might or it might not be the solution. If you never move the starting and ending points of the curves from their places, you’re good to go. Also, if you only move them up or down, to reduce the dynamic range, you should rejoice, because it works as it used to as well.

But if you ever move these points to the inside, namely the point on the left to the right, or the point on the right to the left, to add contrast, and you hoped to later recover the clipping, your troubles did not go away. Sometimes they might even be compounded.

Unfortunately the curves still not work as they used to. This example of course is exaggerated to the extreme to make a point.

Unfortunately the curves still do not work as they used to. This example of course is exaggerated to the extreme to make the point.

Because the curves will flatten everything what is beyond the leftmost or the rightmost curve points up until the left or right border. Then they will resume their 45 degree slope. To many it might be a non-issue. To me it is. To me it means that most of my old projects will still have to be rendered out in CS6, and I will have to be careful with the new ones, especially when using Jarle’s grading presets.

I am not happy. Depending on where you sit, this is either a storm in a teacup or a spoonful of tar that spoils the barrel of honey. Unfortunately, I belong to the second group, and it’s no fun at all.