Announcement

Collapse
No announcement yet.

Another way to disable tonemapping

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    I would like to know why its called "Replace Tonemap" when in fact it is replacing the entire post process feature set.
    https://www.artstation.com/o2car

    Comment


      #17
      Originally posted by rosegoldslugs View Post

      Hmm, if you need Luma only, you should be able to just do a dot product of your tonemapped image with 0.2126, 0.751, 0.0722 in a Post-Process Material set to "After Tonemapping." If you need Luminance, do it "Before Tonemapping," unless I'm also not understanding what you want to do correctly
      Thank you, that is actually already a part of the custom tonemap. It wont matter if I would set it to run before or after the tonemap though as it is the tonemap in itself that is ruining my chroma. (Hence my desire to replace it altogether)
      Last edited by 2car; 09-13-2019, 09:03 AM.
      https://www.artstation.com/o2car

      Comment


        #18
        I only mentioned the before/after because Luma/Luminance are separate and based on gamma correction. There are 2 issues here affecting your color, one being the tone curve of the ACES RRT having a very soft rolloff into highlights, so any value >= 1 will be desaturated(to the point where true 1.0/white is hard to reach without over-exposure), and the other being the multiple color spaces ACES steps through to work in the proprietary color space AP1 before you get back to your final display-referred image.

        If you like the contrast, and the curve parameters available in the Post-Process, you could remove the color space transforms in TonemapCommon.ush in the FilmToneMap() function to only work in the RGB color space, so the primaries won't shift but you'll still get the highlight desaturation. A little easier said than done though, or you could replace it all with an approximation of ACES from Krzysztof Narkowicz or Stephen Hill.

        If you don't like ACES at all, you could add in your own tonemapping operator in that same function. This was just a quick test but it looks like everything in the PostProcess stack still works as expected. You may want to comment out the rest of the ACES above it, but you might get issues if you're outputting to other display spaces. Definitely comment out the "return max(0, ToneColor)" since that's returning ACES.

        Click image for larger version  Name:	Capture.JPG Views:	1 Size:	32.2 KB ID:	1664378

        You may also want to disable the Blue Correction(fixes ACES color space issue with saturated blues) and Expand Gamut in the Misc section of Color Grading in the Post-Process Volume.

        Edit: Ironic that I used the wrong term in my code, since I'm getting Luminance of the linear color, not Luma.
        Last edited by rosegoldslugs; 09-13-2019, 11:29 AM.
        Lighting Artist II @ Crystal Dynamics
        ArtStation
        Twitter

        Comment


          #19
          Originally posted by rosegoldslugs View Post
          I only mentioned the before/after because Luma/Luminance are separate and based on gamma correction. There are 2 issues here affecting your color, one being the tone curve of the ACES RRT having a very soft rolloff into highlights, so any value >= 1 will be desaturated(to the point where true 1.0/white is hard to reach without over-exposure), and the other being the multiple color spaces ACES steps through to work in the proprietary color space AP1 before you get back to your final display-referred image.

          If you like the contrast, and the curve parameters available in the Post-Process, you could remove the color space transforms in TonemapCommon.ush in the FilmToneMap() function to only work in the RGB color space, so the primaries won't shift but you'll still get the highlight desaturation. A little easier said than done though, or you could replace it all with an approximation of ACES from Krzysztof Narkowicz or Stephen Hill.

          If you don't like ACES at all, you could add in your own tonemapping operator in that same function. This was just a quick test but it looks like everything in the PostProcess stack still works as expected. You may want to comment out the rest of the ACES above it, but you might get issues if you're outputting to other display spaces. Definitely comment out the "return max(0, ToneColor)" since that's returning ACES.

          Click image for larger version Name:	Capture.JPG Views:	1 Size:	32.2 KB ID:	1664378

          You may also want to disable the Blue Correction(fixes ACES color space issue with saturated blues) and Expand Gamut in the Misc section of Color Grading in the Post-Process Volume.

          Edit: Ironic that I used the wrong term in my code, since I'm getting Luminance of the linear color, not Luma.
          Wow! Thanks!
          This was just the kind of information I was looking for. I have a tonemap that I know works and that I like so I´ll try to replace it in the TonemapCommon.ush next week.
          Have a nice weekend!
          https://www.artstation.com/o2car

          Comment


            #20
            Very informational thread, subscribing

            Btw In theory the EyeAdaptation node in the postprocess material should help with controlling the auto exposure, but for me it doesnt do anything. Any thoughts?
            Follow me on Twitter!
            Developer of Elium - Prison Escape
            Local Image-Based Lighting for UE4

            Comment


              #21
              Originally posted by Chosker View Post
              Very informational thread, subscribing

              Btw In theory the EyeAdaptation node in the postprocess material should help with controlling the auto exposure, but for me it doesnt do anything. Any thoughts?
              I've used it in the past in non-Post Process materials to have an emissive material that adjusts with the auto-exposure. Super useful for gameplay FX that should be visible at all times. But yeah, it's not working for me in a Post-Process Material and I haven't looked into it too much.

              Exposure is usually done before tonemapping, so it's possible when replacing the tonemapper that it's not available? I haven't tried it in a "Before Tonemapping" material yet, but that could be a start to know for sure. Or maybe it's just not available in the Post-Process shader.
              Lighting Artist II @ Crystal Dynamics
              ArtStation
              Twitter

              Comment


                #22
                Well the documentation itself states to use it in a PP material set to replace the tonemapper, exactly to do that - your own tonemapper
                Follow me on Twitter!
                Developer of Elium - Prison Escape
                Local Image-Based Lighting for UE4

                Comment

                Working...
                X