-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better bloom blending / bloom rework #19361
Comments
Hi, I understand your concern and it's true that the way Bloom is done is not physically correct. In fact, the way you mention is how I approached it first, but later found it very difficult to tweak and adjust for a specific look, or control cases of excessive bleeding. However, the decision to do it like this is more for artistic reasons than being physically correct. Current implementation is easier for artists to tweak, which is what the aim of most of Godot rendering is. |
Ah, thanks for the softlight link, that will be definitely useful |
That said, doing it linear space should be easy to add as an extra option, if there is a good use case for it. |
Thanks for all the info, I'd love to see an optional linear approach. I'm actually glad you understood what I was rambling about... I wasn't sure if anyone would get it as it's a pretty low-level thing most devs don't get it touch with directly. I once made a dirty implementation of what I suggested along with one or two additional fixes and it worked pretty much as I wanted it to. That being said I'm also kind of biased since this is the way I've implemented it in applications outside of Godot recently. The soft light algorithm I posted is based on one that I've written a while ago. It looked pretty much exactly like the one used in GIMP as far as I can tell. I adjusted it a bit so it's not too different from what's currently used. Anyway, if you/anyone needs a hand with what I suggested I'm happy to help with shader source code or something. Implementing it into Godot is another thing... I feel like I'd break everything I touch. |
It seems I misunderstood this issue when I first read it, but maybe it answers a nagging question I had when I looked at the TPS demo: The demo has plenty of lights which glow in this unrealistic saturated way. Making the color whiter would loose the point of coloring it in the first place. For example, from a render by @CptPotato, this is what I would have expected: Now I understand that having one or the other would be an artistic choice, but I'd like the possibility for Godot to offer ways to achieve both (currently I have no idea how to do the latter...) |
Yeah, so the second screenshot Zylann posted is from my own deferred & forward hybrid renderer. The bloom is done in HDR (Godot should use a similar approach) and blended in the way I described in the original post. Notice how it looks a lot softer and has a nicer saturation and color falloff. Additionally there is a little saturation trick I'm using to make sure even highly saturated colors "fade to white" when bright enough. I made a fork and will be trying to implement this (along with fixing #19163, as it's related and in the same shader file) somewhere in the upcoming weeks. |
As an artist, I would like to have as precise control about the bloom color mixing as possible. If there are defaults that look good and/or realistic, that's a big plus. |
I'm fine without having a tint option for the bloom effect but I guess that's just personal preference. To get the most realistic look, use |
I also find the actual Glow hard to setup. It's good to have control but it's even better when the render help you to go in the right direction. Why not get the inspiration from Eevee's Bloom? It give realistic results and the "Color" parameter can really help to change the mood of a scene. Maybe that is for an another topic but, Other stuff would be good to have like Curve for color management that is use a lot to punch the highlights and the shadows in post prod. |
@RonanZe Glow has been reworked in the |
Nice to hear that! I have build the master yesterday under linux but it's difficult to test it because I can import an old demo scene (everything is black) and I can't assign the color atlas texture by drag and drop in the editor. I'll give an other try today with an Eevee scene I'm working on to see the differecences and the improvements in Godot |
I've played with the master branch, Godot 3.2 and Eevee today. Maybe it's better that the old one because everything is compute in the right order. It's difficult the know which Levels to put on or off to get a good result, what is the difference between Strengh and Intensity and what the HDR stuffs are meaning here. And it's buggy atm --> you have a lot of flickering. it's like you dont have the right upscale and that you can see the low res image that is used to create the effect. I'll do more accurate comparisons between Godot 3.2 and master when I will be able to load again an hdr image in the settings. |
Did you enable Bicubic Upscale? |
I can't find the option in a fresh master build. Is it in the same place has in 3.2 ? |
@RonanZe It was moved to the Project Settings as it's a quality setting. (Godot 4.0 will centralize quality settings there to make them easier to adjust at the same time.) That said, bicubic upscale is already the default. Can you upload a minimal project with the glow configured? Also, could you record a video and upload it somewhere? |
The upscale is on. Here is a video + the project: Can you see the flickerings? |
Yes, but I don't know how to solve them exactly. |
That's not an issue with the upscale, it seems the glow is really sensitive to changes in brightness in the original scene. The flickering is caused (from what I could tell when running it) from the little bumps on the battlement combined with the glow being sensitive to changes. I believe this issue what |
This should be fixed in the Please create a new bug report for the issues related to oversensitivity to brightness changes in glow. If there are other tonemapping/bloom changes that should be made, please create a new proposal on the Godot proposals repository after searching for possible duplicates. Edit: For reference, this has been addressed by #52476 in Godot 3.4 and later. Use the ACES Fitted tonemap mode in Godot 3.x, or the ACES tonemap mode in Godot 4.x. |
Godot version: 3.0.2
This one might be a bit nit-picky but I think it's still worth mentioning:
At the moment, bloom is blended after tonemapping & gamma correction, loosing a lot of its impact (because it's not blended in HDR). On top of that it's mixed using modes that you might find in image editing software (soft light, screen, etc.) but which I consider unfit for the job. One of the downsides is that bloom looks pretty dull and/or causes a lot of overexposure depending on which mode you choose.
The usual, more physically correct (and in my opinion best) approach is using a mix or add operation in linear space before the tonemapping, utilizing the full range of colors.
In pseudo-code, this is what's currently done in the shader:
And this is what I'd suggest (being done in pretty much all current gen titles)
And lastly, if the current blending modes are going to stay in the long run, I'd like to suggest some improvements for the "soft light" algorithm which seems unnecessarily complex right now:
It uses a lot of branching which is generally considered bad practise in shaders (see the following link) especialy since it's the default mode. I'd suggest an alternate algorithm which looks similar but doesn't use any branching.
The text was updated successfully, but these errors were encountered: