Adjust Filmic Dynamic Range

Hey there,

 I have been playing with the new filmic render in Blender 2.79.  I really love the change.  It is great for indoor and night scenes.  However, for outdoor daytime scenes, the dynamic range is simply too high.

 Is there a way to set a black point and white point in the compositor?  I have created a custom curve in Photoshop, to use on daylight renders.  Is there a way to do this in the compositor?  The RGBcurve node doesn't seem to work.  I can easily change the brightness with either the Color Management controls, or the Color Balance node.  But, I can't adjust the dynamic range.  Using "high contrast" will brighten the whites and darken the blacks.  But it comes at the expense of hideous contrast.

 Has anyone else found a workaround?   Thanks.

HI, I will repeat your message here so it is easier to read.

Can you explain a bit more by showing a render, and give some albedo-values you are using? Or if you have a .blend file that would be best.

I have the impression that there could be something wrong in your scene with:

  • Plausible albedo values
  • Light setup
  • Render settings

Etc.

3 Likes

Yeah, share a scene with a real groundplane with your ground material, a suzanne with subject material on it, and the lighting, camera, and exposure settings involved.

Still, you can activate use curves under color management and adjust black to negative and white to more than 1. This will obviously crush the midtones. I’ve never toyed with this for these reasons though, so I have no idea how it will work out.

Afaik filmic emulates film emulsion and how it reacts to exposure (compared to our “horrible” digital counterparts of today). That is no guarantee that you can’t overexpose.

Here is a Zone System test render that I made. There are 11 tiles, representing the the 11 zones typical of an outdoor/daylight scene. All tiles use emission shaders, with no other light source. The middle tile represents neutral gray, with the RGB values set to .177. Each previous tile has half the albedo of the one before, with the darkest having RGB values of .0055. The brightest has a value of 5.657.

Below are 3 histograms from the rendered images. The vertical lines show the brightness values of each of the 11 tiles.

The first histogram shows the render output with normal exposure and base contrast. The pink highlighted areas represent the difference between the darkest tile and pure black, and the lightest tile and pure white. For realistic outdoor scenes (with no deep shadows) I need to collapse the dynamic range to these 10 f-stops (eliminate the pink areas).

The second histogram shows the effect of using “Very High Contrast” in place of the base contrast. It does expand the brightness range of the output render—but, still not enough (note the pink areas still in the histogram). Also note how it bloats the differences in the midtones, while crushing the lighter and darker areas.

The final histogram shows the output corrected with curves in Photoshop (or, the same could be done in Gimp). Note how the tile lightness values are now evenly spaced, with only the deep shadows and specular highlights crushed.

Is there a way to achieve this same effect in the compositor? I have tried using the “Curves” option in the Color Management section. But, the numbers in Curves seem to have no relation to either albedo values or output render brightness. Curves can change the the rendered image. But, the results are totally unpredictable. Does someone know more about using this option?

Thanks.

1 Like

Hi @anachronon

As far as I know it is not possible in one Blender session. It would be an idea that there is a node in the compositor like “After Filmic Node” so that you can push some pixels after the Filmic view transform.

Afaik, Filmic is to ensure that we can see the high dynamic range as properly as possible on our screen. But when you render it will not be in a ready for production state. Meaning you want to push some pixels like what you are doing with adjusting the levels in an image editor. An alternative can be to save the picture, reload blender, turn the view transform to default and then finish the LATEST part of your work, pixel pushing.

Curious what @troy_s would say.

We shot night scenes on film for years.

The whole premise is goofy.

1 Like

haha ofcourse.
Not without reason I am curious what you would say.

By the way, what happend here?:
https://developer.blender.org/T63163

The general question has a very valid and interesting series of points to explore, but they don’t involve changing the underlying transform.

That is, grading is critical here. Treat the Filmic Base Log Encoding, or Base Log Encoding + Contrast as an entry point to a potential grade. They are designed for just that. You wouldn’t be asking Kodak to generate a different film emulsion, but rather how to get to a series of particular needs.

That is, if the goal, for whatever reason that I can’t fathom, is to stretch out the Filmic Base Log Encoding such that it only covered about 10 stops, you’d simply adjust a curve based off of the Base Log Encoding. Why Base Log? Because that’s the densest data format, and assures the best results, as well as the gamut compression being “baked in”. The easiest way to think about a curve in this regard, is to look at the x axis as the input code value, and the y axis as the output. The middle grey 0.18 value would be anchored to 0.60606060606 under Base Log, and Base Log offers 16.5 EVs / stops of data, uniformly distributed bit wise across the 0.0 to 1.0 range.

This means that, because it is a pure log2 compression, the stops are simple addition and subtraction from the Base Log code values! So 1.0/16.5 gives us the increment of 0.060606060606. So if you wanted to do a ridiculous curve that clipped off data, you’d take the number of stops your entry point clip wanted to be as UNDER_EV * 0.060606060606 and draw a straight line from the lower left to the upper right to OVER_EV * 0.060606060606. Apply an S curve after such a curve to move the new middle grey and that would be it.

Wiser is to simply grade the work appropriately, and adjust a custom S curve off of the Base Log Encoding. Oh wait, the developers at Blender have no real clue as to how pixel management works, so they decided that Filmic with no look is Filmic with Base Contrast, and didn’t include the Base Log Encoding. Oh and Blender can’t even encode files properly. Anyways, you get the idea… Blender is hot garbage.

Can you do this in the compositor? Blender’s design is so mangled up regarding pixels and grading and transforms that the short answer is “God no.” When will it get fixed? When enough folks start making pixel management a priority and get pissed off with the smashed up garbage.

That’s what happens when you are tired of the garbage and give up.

1 Like

I believe I didn’t propose to change the underlying transform? All I said was that after you your done with rendering, you might want to push pixels in the latest stage. That Blender is not suitable for that because there are things broken, ok. In another editor then.

That’s what I tried to say.

I will look for more info what that is.

Ok, ok or in another pixel pusher editor then.

Aw. Glad you are still answering questions here. Thanks!

I didn’t say you did. The original question was asking for that.

Ahw, yes, I realized that a few seconds ago. Got it.

Always.

Return the favour by helping others and spreading knowledge and information. That in turn helps out the overall water mark of comprehension, and it cascades upwards to expectations of the software.

1 Like

Thanks everyone for a great discussion. As I mentioned earlier, I have found Filmic to be great for night scenes and indoor shots (or any render where the light source is part of the scene). However, it seems to completely fall down on outdoor/sun-lit scenes.

I understand how a fix can only be done in post processing. The problem appears to be within the composite node itself (the final node). As for Blender being “mangled”, I quickly discovered that when I tried to use the “curves” option in the color management section. The results seemed totally random and unpredictable.

My reason for wanting to use the compositor, instead of resorting to an external image editor, was to get the greater bit depth. I might render as a 16-rit tiff. But, after tweaking, it might drop to only 14-bet, or even 12-bit. Perhaps, future iterations of Filmic might have a selection of different LUT’s, optimized for different types of scenes—like “Night”, “Interior”, “Daylight”, “High-Key”, etc. Each type of scene requires a different dynamic range.

It would be fabulous to have an OCIO node in the compositor, however from reading interactions with developers I think that will remain a happy fantasy for some time yet.

There’s no reason daylight and nightime images can’t have the same dynamic range. I don’t think there’s any universally accepted ‘range’ for day or night.

If you want to make images that look as if they are night or day then it’s the tonal relations you need to take care over.

Have a look at these photographs. I don’t think they show a distinctive night scene dynamic range.
http://7-themes.com/6954732-valley-moonlight.html


It seems a bit unusual to want to reduce the range of the render, when the point of colour management is to retain as much data as possible until outputting to a display format. It doesn’t make sense to throw away data at the start of the pipeline.

If you are interested in grading you can use the ASC CDL node instead of the Filmic contrast presets. It might be a better starting point to get your image to where you need it to be.

You have over a hundred years of film photography that you would need to refute to make that claim.

Remember, all of the various scenes will have specular highlights, direct emissions, and potentially direct reflections. Crunching dynamic range is a very backwards approach to illuminating different scene levels. Having the data room to roll those values off gracefully is crucial.

Well, I’m older, and learned the Ansel Adams system of photography. Ansel Adams used exposure and development times to control the dynamic range of each of his images. No two subjects were ever the same. It was one of the things that made his work so successful.

However, with color film, such manipulation became impractical—due to unwanted color shifts. Also, such tricks could only be done with large-format sheet film, where each negative could be processed separately. Blender Filmic though, has the potential to bring back that control.

Ansel Adams was also a master of patience, being able to wait forever for those perfect lighting conditions. If there is anything we can really do in CG, it is the ability to control light to our desire.

My point exactly. Controlling dynamic range is part of controlling lighting.

Having lower dynamic range LUTs out of the gate isn’t utilizing a zoning system, though. Filmic takes your scene referred values and compresses them down to a curve roughly analogous to real physical film. Trying to further crush this potential range isn’t the right way to go. As Troy pointed out, you wouldn’t ask the film manufacturer to change the physical properties of their film to suit your lighting conditions. You would adjust your lighting conditions, camera settings, and properly develop the film. You should be looking at your scene’s lighting/environment strength and exposure, then grade the work appropriately. :slight_smile:

1 Like

Whether a daylight or nightime image, Ansel’s prints all have much the same dynamic range, because they are all on paper, with the reflectance values of the printing paper. The tonal relations make it look as if it’s day, or as if it’s night.

I’m guessing you want to output images for display to sRGB, with a range of 0 to 1. So you want to control the tonal relations, and you want to control the grade. The best starting point for this is to gather as much rendered data as possible.

Ansel always stressed the importance of getting as much useful information as possible onto the negative, to make a good starting point to print from.