Bug? Problems tweaking bloom, won't show up at all

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Chl
Posts: 219
Joined: Sat Dec 05, 2015 2:18 pm

Bug? Problems tweaking bloom, won't show up at all

Post by Chl »

It's not that it's now working, it does, but not in my map. I don't know what is required for bloom to be drawn on screen but I've tried altering brightnesses and contrasts in the map and fiddled the the bloom settings, yet it won't show at all. The only change I could produce was a screen darkening.

The layout is this; I'm using a 3rd person camera at pretty far away with low FOV. The textures and sprites are higher res (around 256) and scaled 2 to 4 times down. In this setting the bloom does not exist at all. Not a single pixel. What I want is to have bloom create is a soft hazy look to the scene so I'm looking for some insight here.
Last edited by Chl on Sat May 20, 2017 9:06 am, edited 1 time in total.
User avatar
Rachael
Posts: 13575
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Problems tweaking bloom, won't show up at all

Post by Rachael »

Bloom requires fairly pronounced extremes in order to work correctly. Are your light levels pretty flat? Have you tried darkening the map itself, a bit, to a point where gl_tonemap 3 produces a very noticeable brightening effect on it?
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Problems tweaking bloom, won't show up at all

Post by Nash »

The "whiter" / brighter a pixel is, the more likely chance for it to bloom is what I find. Also things will bloom more if there is a huge contrast between bright and dark. An overall bright scene won't bloom as much, but a dark room with little spots of brightness will bloom more.

Chl, what about playing vanilla Doom 2? Can you not see the player's fists glow orange at the starting steps where the zombiemen are, looking back at the player entrance?

Also, just in case: someone should probably correct me if I'm wrong but if you are viewing a scene through a camera texture, it won't bloom... IIRC post processing isn't applied to camera textures. Not implying that you're using CTs but if you are, that's one thing to take note of.
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: Problems tweaking bloom, won't show up at all

Post by Nevander »

Make sure gl_renderbuffers is set to 1. If it's false, all post processing effects get disabled. Unfortunately for me, with renderbuffers being true, I get very noticeable lag in GZDoom even without any mods loaded. Turning it to false immediately makes all the lag go away, so I choose smooth performance over fancy effects. What I wonder is why the old way of using QEffects to do bloom and other things had to stop working, and why they seemed to have no impact on my performance and the built-in way does.
dpJudas
 
 
Posts: 3044
Joined: Sat May 28, 2016 1:01 pm

Re: Problems tweaking bloom, won't show up at all

Post by dpJudas »

What card are you using?

I have been noticing micro stutters in GZDoom of late, although I'm not entirely what is causing it or when it began. When you say lag, are you talking about low frame rates or that it feels not to be running smooth at times? If it is the latter it could be the micro stutters I've been experiencing.

It is my plan to add some more debugging to GZDoom to help me figure out exactly what is stalling the pipeline, assuming it is even GZDoom's fault. So far I haven't been able to find the time for it though.
Nevander
Posts: 2254
Joined: Mon Jan 06, 2014 11:32 pm

Re: Problems tweaking bloom, won't show up at all

Post by Nevander »

My card is an AMD Radeon R9 270X 2GB. When I say lag, I mean visible "jerkiness" or lack of smoothness. As far as I can tell, I am not losing frames. Sometimes I see it drop to 59 and go up to 61 and back to 60 but I think it's normal and it does that regardless. So yea, it's just that it doesn't feel smooth in comparison to renderbuffers being off (the same way GZDoom felt before the post processing effects were added). One specific version I used before going to 2.2.0 was 2.0.05 and it did not have the options nor the lack of smoothness.
User avatar
Chl
Posts: 219
Joined: Sat Dec 05, 2015 2:18 pm

Re: Problems tweaking bloom, won't show up at all

Post by Chl »

Ok, here is the scene. On the left is how it looks and on the right is kinda how I want it to look. The bloom works, HOWEVER, it's soooooooo faint you can only see it if you press your nose on the screen. I have tried with extreme contrasts but it does nothing. I've tried with tonemaps and that only distorts the brightness/colours, it does not add any bloom.

Like I said, bloom works in regular low res maps, but not here. What I want is to adjust its sensitivity, size and strength.
Attachments
Screenshot_Doom_20170519_211613.jpg
User avatar
Chl
Posts: 219
Joined: Sat Dec 05, 2015 2:18 pm

Re: Bug? Problems tweaking bloom, won't show up at all

Post by Chl »

I have now fiddled around with this and have found out a couple of odd things. I've change the value of all the gl_exposure settings but it did nothing. I then added a white fullbright sprite to the scene, and this happened. Suddenly the gl_exposure settings changed the visuals. I then deleted the white spot, the exposure remained like in the pic but the gl_exposure stopped doing anything. I restarted GZD and then the scene became dull again plus the gl_exposure settings still did not do anything. I added the white spot back, and everything went back to working.

What's going on here?
Attachments
Screenshot_Doom_20170520_170104.jpg
dpJudas
 
 
Posts: 3044
Joined: Sat May 28, 2016 1:01 pm

Re: Bug? Problems tweaking bloom, won't show up at all

Post by dpJudas »

Hmm, based on your description it sounds like the automatic scene brightness adjustment code is failing.

Each time a scene is rendered the average light level of the scene is calculated. This is then used to adjust how long the camera exposure should be. Any pixel color brighter than 1 after exposure has been taken into account begins to bloom. If the calculated camera exposure time ends up too low then nothing will bloom, and if it is too high then everything will bloom.

The exposure cvars controls how fast it transitions and what exposure duration the average light level translates to. Either you gave them really odd values, or the light level feedback loop isn't working.

Can you create a small wad file that demonstrates the problem? I.e. something like on that screenshot and then a way for me to toggle the white sprite on and off? I can then try and debug it on my computer. Please note that my editor skills are pretty much non-existent, so it has to be something where I only load mods or paste commands into the console. :)
User avatar
Chl
Posts: 219
Joined: Sat Dec 05, 2015 2:18 pm

Re: Bug? Problems tweaking bloom, won't show up at all

Post by Chl »

What you see in the screenshot is a bit enhanced yes, if you use default settings it will be way less for you. But, until I added the white spot nothing changed no matter how extreme I set the values. In fact nothing changes unless it's in view and most of the time until I restarted GZD. I want to add that the changes I make to the settings seem get different visuals every time GZD is restarted. But if I do no changes it stays the same between restarts

I think it's best you get the map as is, it's just this room anyway. Just extract the files to same folder and then open the wad in the editor. Add the pk3(and doom2.wad if it's not there by default) as an extra resource when you select the level (it's just one). The spot is just a thing with a lamp on it, so if you need to hide it just select those 2 and move them out of view.

https://www.dropbox.com/s/ueuk9dljgzxwt ... 0.zip?dl=0
dpJudas
 
 
Posts: 3044
Joined: Sat May 28, 2016 1:01 pm

Re: Bug? Problems tweaking bloom, won't show up at all

Post by dpJudas »

Okay, so I tried playing a bit with this map and as far as I can tell the bloom pass is technically working. For the 'needs restart' thing, I am assuming that is because gl_exposure_speed is set to some other value than 0.05 - in particular the closer to zero the more likely you could end up in a situation where it becomes stuck. Its only safe values are between about 0.01 and 1.

The real problem with the bloom pass is that the math deciding the exposure is kinda crap and the cvars that go along with it are extremely unintuitive. The math is as follows:

bloom amount for white pixel: 1 / max(gl_exposure_base + average_scene_light * gl_exposure_scale, gl_exposure_min) - 1

in a completely black scene (min average light) = 1 / max(0.35 + 0 * 1.3, 0.35) - 1 = 1.85 bloom
in a completely white scene (max average light) 1 / max(0.35 + 1 * 1.3, 0.35) - 1 = 0.65 bloom

What is interesting here is that it requires setting gl_exposure_base and gl_exposure_min to a lower value to black scenes to bloom more, and gl_exposure_scale lowered to make white scenes bloom. Not exactly what you'd expect.

I'll try see if I can come up with an equation that's a little bit better from an end users point of view. Not sure exactly how to express it, though.
User avatar
Chl
Posts: 219
Joined: Sat Dec 05, 2015 2:18 pm

Re: Bug? Problems tweaking bloom, won't show up at all

Post by Chl »

dpJudas wrote:Okay, so I tried playing a bit with this map and as far as I can tell the bloom pass is technically working. For the 'needs restart' thing, I am assuming that is because gl_exposure_speed is set to some other value than 0.05 - in particular the closer to zero the more likely you could end up in a situation where it becomes stuck. Its only safe values are between about 0.01 and 1.
That would explain my inconsistencies when fiddling with it. I would not say that lower values are unintuitive, just add a clamp to the values so you can't enter numbers that break stuff. I happened to do stuff that made the whole screen strobe for example. :mrgreen: One thing though, is that the min value seems to make stuff glow more the closer they are to the edge of screen, and that is not I thought a min value would do.
Locked

Return to “Editing (Archive)”