Outdated Fixed Bloom and Auto Exposure postFX

Discussion in 'Utilities and programming' started by kirbyguy22, Jul 18, 2022.

  1. kirbyguy22

    kirbyguy22
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    90
    This is a set of HLSL shader replacements that fixes a few issues with the bloom and auto exposure postFx.



    Firstly, this fixes the "blocky" bloom appearance - the new shader uses higher sampling, a larger bloom radius, and a higher bright pass threshold so that only really bright things get "bloomed".

    Secondly, this fixes an issue with the auto-exposure shader adjusting the exposure too quickly due to a programming error, which led to strobing during constant exposure changes. The new shader now adjusts exposure smoothly, with large changes in exposure taking a couple of seconds. Additionally, this now works in conjunction with the bloom shader, so that bloom intensity is affected by auto exposure.

    Optionally, I have a new tonemap shader (based on Travarmojsije's GT Sport Tonemap Shader), although these shader fixes work fine with BeamNG's new ACES tonemapper.

    Installation
    1. Download kg22_postfx_026_hotfix.zip from this post.
    2. Extract the "shaders" folder into your BeamNG.UserData\0.26 folder. Read https://documentation.beamng.com/support/userfolder/ if you don't know where your user data folder is. DO NOT EXTRACT INTO THE GAME INSTALL FOLDER! ONLY EXTRACT INTO YOUR USER FOLDER
    3. In BeamNG.UserData\0.26\temp, delete the "shaders" folder. These are only cached shaders and will be rebuilt with the new shaders upon loading into a map. This will increase your loading times temporarily.
    4. To install the optional tonemapper, download kg22_postFx_026_optional_tonemap_lightbar_fix.zip and follow step 2.
    Uninstallation
    In the case of a new major update or if you just want to uninstall the shaders:
    1. Delete the "shaders" folder in your BeamNG.UserData\0.26 folder.
    2. Delete the "shaders" folder in your BeamNG.UserData\0.26\temp folder.
    In-game Setup

    Or

    1. Load into a map and press F11 to open the World Editor
    2. On the top menu bar, go to Window -> Renderer Components
    3. In the Renderer Components window, switch to the HDR tab and use these settings:
    • Bloom Scale: 0.20 to 0.50 for maps with good dynamic range lighting, or adjust to taste
    • Max Adapted Lum Value: 2.0 to 4.0
    • Middle Grey: Start with these values, adjust to taste
      • Default Tonemap - 0.25
      • Optional Tonemap - 0.18
    These settings don't get saved when you close the game, so you will have to input these values again if you restart your game.

    Screenshots (Unedited from Photo mode using Optional Tonemap, no ReShade. "Fake" head/taillight sprites from cars removed)
    screenshot_2022-07-21_22-08-37.jpg screenshot_2022-07-24_20-01-24.jpg screenshot_2022-07-18_20-53-37.jpg


    Changelog
    Optional Tonemap Light Bar Fix (2022-10-23)
    • Fixed optional tonemap's handling of negative color values. Should prevent light bars from appearing black due to negative emissive material values.

    0.26 Hotfix

    • Fixed header references for 0.26
    Version 2
    • Fixed tonemapper not using ACES when optional tonemap is not installed
     

    Attached Files:

    #1 kirbyguy22, Jul 18, 2022
    Last edited: Oct 23, 2022
    • Like Like x 21
  2. Nazu

    Nazu
    Expand Collapse

    Joined:
    Dec 22, 2021
    Messages:
    1,296
    holy shit this is amazing
    does this work on modded maps?
     
    • Like Like x 1
  3. Ax50

    Ax50
    Expand Collapse

    Joined:
    Aug 12, 2019
    Messages:
    330
    I hope the devs can make this part of the base game, doesn't even have to be part of a big update in fact
     
  4. kirbyguy22

    kirbyguy22
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    90
    This works on all maps, but the effectiveness of the bloom and auto exposure will depend on the map lighting's dynamic range (the difference between the lightest and darkest areas). Most BeamNG maps have low dynamic range because without auto exposure, it would make bright areas blindingly bright and dark areas too dark.

    For map creators, as long as they're using PBR materials with the correct albedo/reflectance, they can easily increase the dynamic range by changing the sunSky brightness value to above 2.0. In my AC map ports, I use values between 4.0 and 7.0.
     
    • Like Like x 1
  5. Nazu

    Nazu
    Expand Collapse

    Joined:
    Dec 22, 2021
    Messages:
    1,296
    alright im gonna install this whenever i can ;)
     
  6. Car_Killer

    Car_Killer
    Expand Collapse
    QA / Mod Support
    BeamNG Team

    Joined:
    Sep 24, 2013
    Messages:
    1,534
    Looks really interesting, nice work! :)
     
    • Agree Agree x 11
  7. robert357

    robert357
    Expand Collapse

    Joined:
    Mar 15, 2016
    Messages:
    573
    Woah, such a small change can make such a big difference! Great work.
     
  8. LucasBE

    LucasBE
    Expand Collapse

    Joined:
    Mar 22, 2015
    Messages:
    2,481
    awesome
     
  9. TempGreenWolf

    TempGreenWolf
    Expand Collapse

    Joined:
    Jan 23, 2022
    Messages:
    5
    Is it just me but i followed the instructions and it didnt work, atleast i think it didnt work bc the map in the video looks compleatly different compared to mine
     
  10. el_ferrito

    el_ferrito
    Expand Collapse

    Joined:
    Sep 30, 2020
    Messages:
    414
    It sort of works for me. It doesn't look much different to normal though, so not really working properly. One thing I notice is that I get no bloom. I have it turned on, but nothing...
     
  11. bluehawk360

    bluehawk360
    Expand Collapse

    Joined:
    Sep 28, 2014
    Messages:
    201
  12. kirbyguy22

    kirbyguy22
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    90
    Probably not related to your issue, but that looks like an old version of the map. The spawn was moved from the fan shop to the actual Touristenfahrten entrance next to Devil's Diner, and the clouds were changed to a different texture. Check the description of the map, the latest version should be 2021.07.22 which has higher dynamic range lighting and better materials.

    When using Max Lum >1.0 and Middle Grey 0.18, does the exposure adaption change gradually when you move between shadows and light like in the setup video or is it instant?
     
  13. bluehawk360

    bluehawk360
    Expand Collapse

    Joined:
    Sep 28, 2014
    Messages:
    201
    When changing middle grey, it changes gradually
     
  14. Travarmojsije

    Travarmojsije
    Expand Collapse

    Joined:
    Sep 10, 2013
    Messages:
    14
    Awesome work! :)
     
  15. SuperAgentAlex

    SuperAgentAlex
    Expand Collapse

    Joined:
    Apr 23, 2020
    Messages:
    518
    upload_2022-8-2_20-11-30.png
    Hey, is this where it goes?
    Sorry, I'm stupid
     
  16. kirbyguy22

    kirbyguy22
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    90
    Yes, that's correct. Simply drop the "shaders" folder from the .zips in there. If installed correctly, the path with all of the mod files should look like this:
    0.25\shaders\common\postFx\hdr\
     
  17. Brother_Dave

    Brother_Dave
    Expand Collapse

    Joined:
    Aug 16, 2012
    Messages:
    1,662
    So glad someone else got into this, i just dont have the time anymore (AL gfx mod)! Been wanting a slower/smoother autoexposure for a good while and now youve modde that, great! I miss the old bloom settings (a few beam updates back), would like more adjustability. More something like low brightness=lower and larger bloom, high brightness=more spot like bloom. I do like the flares in GT7 where white spots gets a small, bright, sharp flare. Much like bloom is out the box now.

    I received the answer from the devs that they will get more gfx running when Vulkan is stable, which im looking forward too.

    Meanwhile, can i recommend my SSAO mod, it lets you keep the ssao settings you use in Photo Mode. I usually go something like contrast 1.0 - 1.5 and radius 1.25 - 1
     
    • Like Like x 2
  18. Kubbo

    Kubbo
    Expand Collapse

    Joined:
    Jul 10, 2022
    Messages:
    3
    first, i am stupid, second, awesome mod, third, how do i disable the "Fake" head/taillight sprites, because my headlights/tailights dont look like the ones in the vivace photo
     
    • Like Like x 1
  19. cheems_samurai

    cheems_samurai
    Expand Collapse

    Joined:
    Sep 28, 2020
    Messages:
    147
    Hey, I extracted the shaders content into the 0.25 user folder, but haven't noticed a difference on any map. Do I have to use all 4 folders or just one?
     
  20. Lovehorizon

    Lovehorizon
    Expand Collapse

    Joined:
    Nov 17, 2020
    Messages:
    149
    This and your Nordschlife map is perfection.

    The graphics are insane and it runs great.
     

    Attached Files:

    • screenshot_2022-08-12_18-28-24.jpg
    • screenshot_2022-08-13_00-35-52.jpg
    • Like Like x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice