Search Unity

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

Discussion in 'Assets and Asset Store' started by G-Mika, Apr 2, 2015.

  1. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    @TTTTTa
    The toe strength is inverted in the ui code to make it more intuitive and consistent with the shoulder strength (In c#, the value is -0.99 instead of 0.99).

    You need to replace:
    toneMapper.m_MainCurve.m_ToeStrength = -0.99f;
    by:
    toneMapper.m_MainCurve.m_ToeStrength = -0.99f * -1.0f;
     
  2. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,815
    OK, thanks.
     
  3. Jenkaro

    Jenkaro

    Joined:
    Nov 12, 2014
    Posts:
    5
    Where eye adaptation must be stationed in stack?
     

    Attached Files:

    • eye.png
      eye.png
      File size:
      61.5 KB
      Views:
      791
  4. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    It should be placed before tonemapping:
    ...
    eye adaptation
    bloom
    tonemapping
    color grading
    ...
     
  5. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    This looks great. Just one quick question before I hit the buy button. I assume this will work nicely with Alloy Shaders?
     
  6. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    Yes
     
    Zaddo67 likes this.
  7. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    143
    Hi,
    Got black screen when building with Oculus sdk.
    Building with a simple camera is OK.
    Any idea ?
     
  8. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    I expect FTD to works well in a multi-camera setup like VR, but I haven't tested yet and It's the first report I get of FTD not working with the oculus SDK. I'm going to try the latest SDK to see how it goes, expect to get some news of a fix before the end of the week.
     
  9. toxtronyx

    toxtronyx

    Joined:
    Aug 21, 2014
    Posts:
    114
    I could use a little help with the eye adaption. I want to keep the darkening and the overshoots when looking at bright spots but after the adaption process is complete I want my standard look back, just like disabling the eye adaption. After playing around with the values I get only a way too less effect or the overall brightness is way too high after adaption. Could you give me please a little hint?

    TIA
     
  10. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    You could try to calibrate when not looking at the bright spot first using the offset parameter. Then if you find that when looking at the bright spot the rest the scene looks overexposed you can either set the max exposure to something lower or you can lower the brightness of your bright spot in your scene(if it's a light, you would need to lower the intensity of the light). Then you could calibrate the contrast with the filmic tonemapper by using the bright/dark intensity parameters, and you could also extend your HDR range (make more colors visible) by setting the maximum intensity to something higher.

    Hope this helps.
     
    toxtronyx likes this.
  11. toxtronyx

    toxtronyx

    Joined:
    Aug 21, 2014
    Posts:
    114
    Thanks! I give it a try. I would hate to ditch the eye adaption but I had a quite neat looking setup before using it and want it back :)

    Cheers!
     
  12. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,815
    Hello,
    I was wondering if it was possible to have the tonemapper to ""ignore"" certain objects on the screen. Like if you had objects on a certain layer, and you wanted the object to appear as though it is not affected by the tonemapper. Is this possible?
    Thanks.

    Ok, never mind. I figured it out. I added a seperate camera for the objects to not be affected by the tonemapper, then merged the camera outputs together.
     
    Last edited: Aug 12, 2015
  13. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,815
    Hello,
    I was wondering what you would recommend for the placement of the Unity's Noise and Grain FX camera effects.
    Currently I have it placed after the Deluxe Tonemapper and find the grain looks better than when placed before the Deluxe tonemapping.

    Also, for now I'm using the following effects: Crease Shading and SSAO. Do you recommend placing these before or after the tonemapper?
    Thank You.
     
  14. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    To be physically correct:

    1- Scene lighting post process (SSR, SSAO, ....)
    2- Camera/lens/eye Perception post process (Depth of field, motion blur, Bloom, Grain/Noise...)
    3- Color Correction/ Color grading (Tonemapping, Crease, LUT...)

    Globally, something like this:
    -SSR
    -SSAO
    -DoF
    -Motion Blur
    -Bloom
    - Noise/Grain
    -Tonemapping
    -Crease (This should work here, since it's pure color manipulation, might also be before tonemapping or after LUT)
    -LUT/color grading
     
  15. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,815
    Ok, thanks. This is very helpful.
     
  16. Tinovdk

    Tinovdk

    Joined:
    Nov 28, 2013
    Posts:
    83
    Hi!

    I'm contemplating on purchasing this asset in order to replace the Unity tonemapping post-processing effect that we are currently using. In our case it seems that the Unity tonemapping effect seems to be the root cause of occasionally producing a black screen. This bug has been reported to Unity although we don't know when this will be fixed. In the meanwhile we need an alternative considering that this feature does a lot for the look of our project and that black screens would render our work useless.

    So my question is: Do you know if Filmic Tonemapping plugin has proven to be stable for you or someone else when building for Xbox One?

    Thanks in advance. :)
     
  17. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    I helped a team to make it work on Xbox One and I uploaded the fix with the latest version. From what I know, it's working fine on Xbox One. If you run into problems, just let me know.
     
  18. Tinovdk

    Tinovdk

    Joined:
    Nov 28, 2013
    Posts:
    83
    Hi G.Mika

    Thank you for your swift response. Further investigation is telling us that Unity's tonemapping might not be at fault for our graphical issue on our target platform. We are first trying to get to the root cause of this problem before deciding on switching our tonemapping solution. I hope to be able to purchase and implement your asset in due time.

    Cordially,
     
  19. Tinovdk

    Tinovdk

    Joined:
    Nov 28, 2013
    Posts:
    83
    After some further testing we went ahead and purchased your tonemapping solution. It's a very nice tool with a lot of features and control and I would definitely recommend this to anyone that finds Unity's stock solution limiting or problematic.

    In our project however, it revealed that the black screen problem was not solely due to Unity's tonemapping but was also related to a bloom plugin we used. We noticed that you also have an Asset Store package that provides a solution to bloom that we are now contemplating on purchasing.

    Thanks for the great work. :)
     
  20. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    was the bloom plugin sonic ethers?
    i have that but i am also interested in filmic tonemapping
     
  21. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,409
  22. Tinovdk

    Tinovdk

    Joined:
    Nov 28, 2013
    Posts:
    83
    Indeed SE Natural Bloom & Dirty Lens was the culprit in our case. It's a shame really as its results are really beautiful. Sadly it turns out that in very rare cases it makes our upcoming title display a black screen causing it to be unplayable.
     
  23. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    That's not something that might be SE's fault though (you may get it with other post too) because it indicates you've hit a wall with the range of HDR... so be sure to test those rare cases with other assets too (just a heads up)!
     
    Arganth likes this.
  24. duplexius

    duplexius

    Joined:
    Apr 24, 2015
    Posts:
    44
    I think the Eye Adaption part is designed in a very unintuitive way. By default it always gets way too bright when not looking into the light and when you turn the maximum exposure down, there is almost no recognizable effect left.
    As a result you will have to adjust your entire scene lighting and tone mapping to be darker by default. In the end it would depend too much on the Eye Adaption. If you disable it (in the game's user options for example), all lighting breaks.

    Did you get to making this tutorial mentioned half a year ago?

    I also think that the example screenshots you provide don't always show a great improvement over what the "before" was. It often just looks way over-saturated in my opinion. It's really hard to find a good compromise with the existing presets and no further guidance.
     
  25. akangGG

    akangGG

    Joined:
    Dec 25, 2014
    Posts:
    1
    SAMPLE SCENE please
     
  26. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    I know I'm a bit late on this one, we have been more than overloaded with contracted work recently giving us very little time to develop furthermore some of our assets based on users feedbacks.

    However, I decided to update FTD and the update will come very soon with some new interesting stuff.

    What will help you to configure the effect:
    - I have been working on a Quickstart guide that explain step by step how to calibrate the tonemapper/eye adaptation for your scene/game. This will help more than the documentation.
    - The histogram debug window have been upgraded with more details, you will be able to see in real time how the change you make to the parameter affect the exposure computation.
    - I simplified the tonemapper

    Features I added:
    - 3D and 2D LUT support for color grading
    - HDR sharpness tool --> this will make your game look more HD
    - I upgraded the tonemapper with some new functionality

    The next update will also fix a problem that happens with most eye adaptation/auto exposure algorithms used in game engines. Your exposure is always based on an offset from the average luminance of the image (or the average luminance of the brightest pixels when using an histogram). As a consequence, if you look at a part of the scene where there are very little contrast, the eye adaptation/auto-exposure will compute the exposure as if there are contrast and this will make the scene too bright or too dark. The next FTD update will fix this common problem by detecting how wide is the pixel distribution (only doable via an histogram) and this should provide the optimal exposure in every situations.

    I expect to submit the package to Unity next week.
     
    toxtronyx likes this.
  27. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    This looks very promising. I'm currently just using the Unity Tonemapping and it does what it's supposed to do, but obviously has no eye adaptation, which I really would like. I'm developing for the Wii U, which has shader model 4. Any reason to think this may have a problem with Wii U? Also, compared to standard Unity Tonemapper, what kind of performance can I expect with this?
     
  28. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    Performances should be similar. I helped some teams to make it work on the Xbox One and PS4 in the past, my guess is that it should work well on Wii U. If you have any problems on Wii U you can always contact me.
     
  29. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I took a chance and got this last night, but with tonemapping and eye adaptation I was seeing huge performance hits on my PC. I would say about 60-80 fps drop. So, I'm a bit concerned. Having seen that, I didn't even try on the Wii U yet.
     
  30. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    Have you tried the low resolution optimization option? This has minimal hit on quality and should optimize the effect a lot.

    I still have room for improvements (at the cost of very minimal loss of quality) but never bothered doing it since I had good performances on my low performance hardware (mac book 2012, intel hd 4000) and no user had issue with performance before. I know Wii U is a different beast however.

    Bottom line, if you have performances issue on the Wii U even with the optimization flag, you can contact me via private message to see what I can do.
     
  31. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I haven't tried on Wii U yet. Those performance hits were just on my PC. I will try soon and make the optimization change you suggest to see how it works.
     
  32. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    A big update have been submitted to the Unity Asset store!

    The biggest change is the new core tonemapping algorithm. It's now using a true H&D sensitometry curve which emulate more efficiently how the human eye see colors. It's something that took months of research and fine tuning to make, and it will allow a new level of realism in your scene lighting.

    Other tonemappers are doing an approximation by applying a different variation of the same polynomial curve (ACES approximation, Hable, photographic, ...) and they miss essential points on how color should be distributed for optimal lighting realism and minimization of color distortion. Color grading won't be able to fix this.

    Complete list of updates:
    * New more physically accurate core tonemapper
    * Added LUT support
    * Eye adaptation won't render anymore when the game is stopped
    * Added hdr filters (HDR Saturation and HDR Sharpness)
    * Added narrow distribution fix for over-exposure calibration
    * Added a lot of visualization features to the histogram
    * New simplified documentation
    * Added Eye Adaptation Calibration Guide
    * Exposure offset is now done in linear space for easier calibration

    It should be published this week or early next week.

    You can follow us on twitter or facebook to keep updated with filmic tonemapping DELUXE, other products and more:
    Facebook
    Twitter
     
  33. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    will you update the video with the system? would like to see that in action :)
     
  34. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    Except for some fine tuning, the eye adaptation part haven't changed much. Here are some pictures I made to compare the upcoming FTD with the Unity ACES tonemapper:

    Unity (new default) ACES polynomial approximation:


    FTD with the new H&D sensitometry curve (note that with FTD you can adjust the bright/mid/dark values if needed, instead of being limited to the exposure):
     
    Arganth, magique and hopeful like this.
  35. cowtrix

    cowtrix

    Joined:
    Oct 23, 2012
    Posts:
    322
    Hey @G.Mika. We're having some issues with this plugin on Mac in 5.3.2p4 - would you be able to take a look?
     
    Last edited: Mar 10, 2016
  36. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
  37. cowtrix

    cowtrix

    Joined:
    Oct 23, 2012
    Posts:
    322
    Yep, I think that might be the case.
     
  38. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,815
    Hello,
    I download the latest update. Im using the eye adaption. When I click on Viusalize Histogram, suddenly everything in the game window becomes mirrored horizontally. And I dont see any histogram located anywhere. I am using Unity 5.2.3. If I then unselect Visualize Histogram, everything returns to normal.

    eyeadaption.png
    Setup: Forward, Linear, non-HDR, Unity 5.2.3, Windows 8.1
    Thank you
    j
     
    Last edited: Mar 15, 2016
  39. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    I haven't been able to reproduce the issue and I tested on multiple hardwares, what is your graphic card? It might be a driver/vendor issue. It might also be something else in your project affecting the histogram visualization, you might wan't test to test in an empty project to see if it's the case.
     
  40. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,815
    Edit: post deleted. See below post for the details.
    j
     

    Attached Files:

    Last edited: Mar 16, 2016
    hopeful likes this.
  41. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,815
    The issue only seems to occur with the use of other unity camera effects, and depending on their order. For example, when using Unity's bloom optimized and Vignette, it causes the issue I posted above.
    I was able to create a blank project with the following camera effects order: Bloom Optimized, Eye Adaption, Vignette and Chromatic Aberration. The problem consistently occurs. If I quit playmode, start disabling the Unity effects or change the order, and then re-start the game, the issue is resolved.
    I have the repo. Let me know if you want me to send it to you. For now, I'll just change the order of the effects to avoid the issue.
    Repo camera effects order snapshot:
    repro.png


    System hw: AMD Radeon R7 260X
    AMD A6-5400K CPU
    I attached the editor log too.
    j
     

    Attached Files:

    Last edited: Mar 16, 2016
  42. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,815
    After upgrading the filmic tonemapping, I noticed the the Tint color control is not showing up in the inspector. Was the tint control functionality removed? We have numerous scripts that dynamically set the tint during gameplay to fade the camera in and out but it is no longer working.
    Thanks
    j
     
  43. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    @TTTTTa

    I'm going to take a look at it today, I have a good idea of what might cause this, expect to receive a fix soon.

    I removed to Tint because FTD is not primary a color grading effect and it was something that could be done with the LUT color grading. I'm going to add it back for legacy reasons. It's still very cheap to compute anyway.
     
  44. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,815
    Ok, thanks for looking into it. For now , Ill roll back to previous version. It is not urguent for me right now.
     
  45. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    I have been able to fix the issue. It was only happening with MSAA enabled, it's a classic issue with unity, since it causes the image to get flipped randomly in the image effects pipeline.

    You should have received the updated package in your private messages. I already have an update waiting for approval (2.0.1), the fix will be in the next update (2.0.2).
     
    ArachnidAnimal likes this.
  46. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,815
    Ok, I downloaded and installed the updated package. Everything is working great now. The histogram and tint is working.
    Thank you for the very fast support!
     
  47. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    116
    Hello, I am wondering...
    does the deluxe tone mapper support zones?
    (Different settings for different areas)
    or can be adjusted with some code and a box trigger?
    Thanks!
    --Joshua
     
  48. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    I don't think that an image effect should be responsible for dealing with zones (if every image effects had their own zone system it would become a mess somehow).

    There is a generic zone system available on the store, it might be compatible with it but I haven't tested:
    https://www.assetstore.unity3d.com/en/#!/content/55453

    Otherwise, the variables are available from script and the editor classes (DeluxeTonemapperEditor.cs & DeluxeEyeAdaptationEditor.cs) can be used as an example on how to use them.
     
    jammer42777 likes this.
  49. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,815
    For some reason whenever I exit playmode, the Filmic Tonemapper automatically resets itself to the following values:
    tonemapping.png

    The settings were custom set before playmode, but is allways reset to theese values upon exiting playmode.

    Edit: I commented out the following line of code in the Initialize() routine for now to prevent the issue from happeining
    SetCurveParameters(0.8f, 0.2f, 0.0f);

    j
     
  50. G-Mika

    G-Mika

    Joined:
    Jul 17, 2012
    Posts:
    99
    Hi thanks for the report, I wonder how I managed to miss this one.

    The true fix would be to replace line 52 in DeluxeTonemapper.cs by:

    Code (CSharp):
    1. [SerializeField]
    2. private bool m_IsInitialized = false;
    This will be fixed in version 2.0.2
     
    ArachnidAnimal likes this.