Bloom and Tonemap

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

User avatar
Rachael
Developer
Developer
Posts: 3618
Joined: Sat May 13, 2006 10:30

Re: Bloom and Tonemap

Post by Rachael » Fri Sep 23, 2016 1:07

If a mapper can control them, tonemaps can indeed be useful. I think a perfect example of a game that really used tonemaps well - at least, as you described them - was Saints Row 3. When you step inside a shop, the tonemap adjusts the brightness of your screen to compensate for the clearly really dark shop. But you step outside and the sun is glaring so bright it's full #FFFFFF pixels all over your monitor - until you see enough of it that the tonemap automatically balances and darkens your monitor so that you can see the details through the overbright.

I've actually tried the tonemap modes adjusting the sector colors down at least to #A0A0A0 and could already see how they have potential. It would be awesome to try this with HDR textures, as you suggested. That is also someplace where bloom could really shine. (Pun not intended ...)
Spoiler: Zen Sarcasm

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Bloom and Tonemap

Post by dpJudas » Fri Sep 23, 2016 4:21

Yes, it is exactly made for stuff like that. :) What you're describing there from Saints Row is the bloom pass, exposure pass and tonemap working in concert.

If you use what is in master right now, you can create the same effect as you had in Saints Row by adjusting the values of gl_exposure_scale, gl_exposure_speed, gl_exposure_base and gl_exposure_min:

gl_exposure_speed - this controls how fast the eye reacts to brightness changes. The lower value, the slower it reacts.
gl_exposure_scale - how much brighter than the average light value something must be for it to start blooming.
gl_exposure_base - the base exposure for light level zero
gl_exposure_min - minimum exposure value allowed. Must be larger than zero. Usually just set it to the same value as base, unless you want some kind of clamping effect for low light levels.

For example, if you use gl_exposure_speed 0.002 the change when moving from a dark to a very bright room will happen much slower, making it easier to see the kind of effect you were describing. Lowering the scale or base will cause the scene to generally become more bloomy, while increasing them means you must have even brighter pixels in a scene for them to bloom.

User avatar
Rachael
Developer
Developer
Posts: 3618
Joined: Sat May 13, 2006 10:30

Re: Bloom and Tonemap

Post by Rachael » Fri Sep 23, 2016 8:19

Ah, I see. :) The only thing I can think, though, is how this kind of thing would be really useful for mappers. XD It would allow for a much easier creation of indoor/outdoor area mixes, since indoor areas are a relatively small fraction (at most about 30%) of the sun's brightness outdoors.
Spoiler: Zen Sarcasm

Major Cooke
Developer
Developer
Posts: 240
Joined: Wed Mar 04, 2009 19:25

Re: Bloom and Tonemap

Post by Major Cooke » Fri Sep 23, 2016 14:54

How about a menu for Bloom itself? Sliders to control Bloom adjustment rates and brightness min/maximum would be appreciated. Sometimes I feel it gets a little too dark or a little too bright.

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Bloom and Tonemap

Post by dpJudas » Sat Sep 24, 2016 9:47

Not sure if its a good idea to let the user adjust those values or not. Like the light settings Graf recently removed, the level designer might rely on the bloom and exposure working in a certain way. The main reason it doesn't even save those cvars right now is because I'm unsure if this should be a map or a user configuration (beyond the bloom on/off switch).

Major Cooke
Developer
Developer
Posts: 240
Joined: Wed Mar 04, 2009 19:25

Re: Bloom and Tonemap

Post by Major Cooke » Sun Sep 25, 2016 15:22

The thing is I'm not exactly happy with how much darker it gets. Now, I know of the cvars but I also don't like having to look them up.

I must still suggest that a client's ability to control it themselves be used, or perhaps a multiplier that stacks with the map?

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Bloom and Tonemap

Post by dpJudas » Sun Sep 25, 2016 18:14

Adding two sliders controlling it to the menus should be simple enough. But as I said, the catch is that if a mapper then designs his map around what he himself put it to, then it might not look the same for other players.

Out of curiosity, which values would you use? It could be that the values I picked are just crap and yours are better. :)

Major Cooke
Developer
Developer
Posts: 240
Joined: Wed Mar 04, 2009 19:25

Re: Bloom and Tonemap

Post by Major Cooke » Sun Oct 02, 2016 20:48

All four of them just to screw with it.

And yeah, Graf said make it user-controlled.

User avatar
Rachael
Developer
Developer
Posts: 3618
Joined: Sat May 13, 2006 10:30

Re: Bloom and Tonemap

Post by Rachael » Sun Oct 02, 2016 20:54

I think it could be helpful for mappers to at least have multiplicative control over the exposure settings. (Within sane boundaries, of course)

That way, user preferences are still respected, and a mapper still has the ability to fine-tune the intended bloom/tonemap settings (in case they want a user to be able to explore really really dark areas and providing some outdoor contrast, as I had described about with Saints Row 3).
Spoiler: Zen Sarcasm

Major Cooke
Developer
Developer
Posts: 240
Joined: Wed Mar 04, 2009 19:25

Re: Bloom and Tonemap

Post by Major Cooke » Sun Oct 02, 2016 21:16

Please Include a kill switch though in case if the user doesn't like it, so it forces just the user's preferences instead.

User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Bloom and Tonemap

Post by Graf Zahl » Sun Oct 02, 2016 23:23

I have said previously, that this is such a highly subjective matter that allowing a modder to have any influence over the bloom setting is basically a no-go. This is a typical case of working against the end user.

Major Cooke
Developer
Developer
Posts: 240
Joined: Wed Mar 04, 2009 19:25

Re: Bloom and Tonemap

Post by Major Cooke » Wed Nov 30, 2016 3:29

The hell with it, I'll make a pull request that allows users to change it to how they see fit via menudef. I'm tired of having to look up these cvars.

Only problem is, what are the minimum and maximums of each?

User avatar
Rachael
Developer
Developer
Posts: 3618
Joined: Sat May 13, 2006 10:30

Re: Bloom and Tonemap

Post by Rachael » Wed Nov 30, 2016 3:48

I haven't noticed any. I'd keep it between 0.0f and 1.0f, but feel free to experiment out of range and see what happens. Your computer may catch fire, or suddenly grow mechanical limbs and bright red eyes, and scream "I am Megatron!" while it destroys your suburb. Don't say I didn't warn you. :twisted:
Spoiler: Zen Sarcasm

Major Cooke
Developer
Developer
Posts: 240
Joined: Wed Mar 04, 2009 19:25

Re: Bloom and Tonemap

Post by Major Cooke » Wed Nov 30, 2016 5:00

Good thing I have a six blocks of C4 ready to detonate inside it should it try. :twisted:

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Bloom and Tonemap

Post by dpJudas » Wed Nov 30, 2016 5:55

You get the megatron effect if you set gl_exposure_min or gl_exposure_speed to zero! I would use a 0.1 to 2.0 range or something like that for them (with a 0.1 stepping or something). Only exception is gl_exposure_speed, which needs a very small value.

Locked

Return to “GZDoom”