Filmic Tonemapping DELUXE - Now with Eye Adaptation (High Quality)

Filmic Tonemapping DELUXE
—>Asset Store Link<—

Overview
In my quest to create a full lighting post process pipeline for Unity I developed a highly customizable Filmic Tonemapping effect to fix the “foggy” look issue of 3D Unity games developped with linear space.

Filmic Tonemapping is used to map HDR values to visible range while making colors more interesting and sharper. Your screen is limited by the 256 possible values for each channel of each pixels (8 bits) and by remapping those values where it matters (in mid color range of your scene) you can produce a more High Definition look while creating interesting lighting contrast. It is at the core of most modern AAA video games graphics engine.

Filmic Tonemapping is an addition to color correction. It will upgrade colors in a way that can’t be achieved with most color correction tools.

Since version 1.2, a high quality histogram based eye adaptation effect have been added. This effect is able to simulate how human eyes adapt to lighting while keeping an optimal contrast and white point.

Filmic Tonemapping DELUXE features
Filmic Tonemappping

  • Combinable color and luminance mapping

  • Highly Customizable Contrast (dark and bright features)

  • Map HDR values to LDR (visible range)

  • Will not desaturate dark colors

  • Works with or without HDR

  • Optimized GPU code

Eye adaptation

  • Natural feeling
  • Keep an optimal contrast between colors
  • Optimized GPU code with two performance profiles
  • Stable exposure (no bad “flickering”)
  • Real-time histogram visualization
  • Highly customizable (esposure offset/multiplier, speed up, speed down, histogram analysis settings, and more)

Examples
Filmic Tonemapping DELUXE is highly customizable and those examples only show one possible settings of what this tonemapper can do.

You can look at the high resolution pictures here


This first scene is an indoor scene. You can see that with filmic tonemapping dark colors and bright colors pops out more while making mid-range value more clear and defined.


This second scene is an outdoor scene. With Filmic Tonemapping DELUXE, the sunlight actually look intense making the scene more vibrant (this kind of contrast cannot be done by simply tweaking the Unity light settings).

Future Versions
Now that the eye adaptation update is done, I plan on adding small features and refinements based on users feedbacks.

3 Likes

Hey, great asset, it really does his job. But, after updating to 1.1, i get just black image in build. In editor everything is OK, but in build - black screen.

UPD: I am getting this error in build : “Graphics.Blit: material is null”
UPD: Fixed by placing shaders into “Resources” folder. Otherwise, they are not included in build bacause nothing is referencing them.

Also, i was having a problem in previous version - using Deluxe Tonemapping kills DOF effect in build. When tonemapping is used, dof is just not there. Again, this problem was in build version only, everything ok in editor…

Hi Stalker,

Unity for some reasons, won’t automatically include all shaders in builds. If you want to make it works in builds, you need to go to “Edit/Project Settings/Graphics” and add all Filmic Tonemapping DELUXE shaders to the always included shaders. This should fix it. =)

I also submitted an update (shoud be available soon) and with this version you won’t need to do this anymore.

The new version 1.1ff is now available on the store. It works in builds without any problems now. I tested with DoF and it works fine now, it was probably linked to missing shaders when generating the exe too.

Great stuff!
What’s the progress on the Eye Adaption feature?

Hi DennG,

It’s almost done. I had to find a couple of workarounds to build a multiplatform GPU based histogram with Unity and it was trickier than I thought. It’s now working and I am in the optimization phase.

Good to hear.
Sounds complicated though… what’s the estimated release?

I plan on submitting the eye adaptation feature this weekend if everything goes well. It should be available on the store next week.

1 Like

Hi I bought this. Bug: using the cog to reset values on the hdr version results in bad settings.

I had no idea you could force a reset on the component since I never used this feature before (right click/reset ?) . The HDR values are set when the component is added to the camera and it won’t reset to hdr default values as a consequence. I it should be fix in the next update =)

I like it so far. I welcome the eye adaptation thing and any speed increases. A fast tone mapping is a good tone mapping! :slight_smile:

1 Like

Nice! Is there a video or better a webplayer demo where we can check it out?

You can watch a preview here:

https://www.youtube.com/watch?v=6uZ1RUYmhgQ

Everything is customizable (adaptation speed up/down, exposure, exposure range, and more). The Eye adaptation is a different component so that you can use it before other effects like bloom, or use it without tonemapping.

I need to refine a couple of things and I’m done.

1 Like

already in -to-be-bought list :smile:

So excited for this update.

Looks nice, bit worried that it’s not combined actually due to the fact it’s going to be slower in 2 passes.

I’m not disappointed. It looks very natural.
I’ll buy it definitely.

The eye adaptation update have been accepted and published =)

I’m happy with the results and performances and I’m pretty sure there is no comparable eye adaptation algorithm done in Unity since computing a multiplatform histogram on the GPU with Unity is a big hack (with the others engines like unreal engine it requires Dx11/compute shaders. It’s working with Dx9, Dx11 and OpenGL with Filmic Tonemapping DELUXE).

With the optimization flag, on my old 2012 macbook air with intel hd 4000, it was running at about 0.3ms in-editor.

It’s currently being used with success in the game the forest.

2 Likes

I am so excited to try this. I have been getting decent results with the last version, but the documentation still refers to seperate components for hdr/ non hdr setup. Took me a while to find values that worked in HDR. Hopefully the new update’s eye adaptation solves this.

In this new update, there is only one way to add the tonemapping component, and I added some HDR and non-HDR (LDR) presets to get started instead (you can select them inside the component presets box). It should be more intuitive that way.

In the old version, it was really just the same component with different default values (notably, the non-hdr default values had the white point (maximum color value) set to 1 since LDR image buffers can’t handle values over 1).