Jump to content
The Dark Mod Forums

Heads up: New (HDR) Bloom effect in 2.08 for bright light sources


cabalistic
 Share

Recommended Posts

So there's an inverted fps finding:
with NO soft shadows or ambient occlusion
48xlight&emitter  71fps
bloom shader      59fps

with YES soft shadows and ambient occlusion
48xlight&emitter  16fps
bloom shader      22fps

(Ambient occlusion doesn't seem to have much of a fps impact - esp compared to soft shadows.  Soft shadows in TDM brings my pc to its knees.)

Note that the hdr bloom shaders at the yellow end of the spectrum look different in photoshop and DR than they do in game.  At the top end of the spectrum, red-magenta-blue-cyan-green are more true to photoshop.
The soft yellow bloom most resembling my light/emitter panel is actually a yellow-green, rgb=43,78,9 and emits a greenish glow, which isn't too bad.  

FYI the colors in the panel array are:
yellow-green   43,78,9
orange         94,30,0
yellow         255,242,0
red            255.0.0
magenta        236,0,140
blue           0,0,255
cyan           0,255,255
green          0,255,0
dark-yellow    100,94,0

  • Confused 1
Link to comment
Share on other sites

8 minutes ago, geegee said:

(Ambient occlusion doesn't seem to have much of a fps impact - esp compared to soft shadows.  Soft shadows in TDM brings my pc to its knees.)

Soft shadows are definitely the number 1 frame killer, especially if you set the quality too high. However, AO is *far* from being free, it has a very significant impact even on strong GPUs. It does depend on your render resolution and AO quality level, though.

  • Like 1
Link to comment
Share on other sites

As for the frame rates, something doesn't add up. Bloom has a constant and fairly cheap cost (depending on render resolution), and there is no way that adding many lights could possibly be cheaper.

However, looking at your screenshots, your first shot without bloom (setup_e_8_noss_bloom_on.jpg) shows NO SHADOWS from the panels, whereas your direct comparison (setup_hdr_8_noss_bloom_on.jpg) does. Most likely, something went wrong when you took that first shot, and shadows were not rendering. That easily explains the framerate difference.

  • Like 2
Link to comment
Share on other sites

Thanks.  I need a minder... 

I left noshadows=1 on the original panels with the lights and emitters, then forgot about that when setting up the panels as grouped worldspawn so I could easily change colors on the light shaders.

The new numbers are (I didn't turn on ambient occlusion):

e_noss_bloom_on        57

e_ss_bloom_on            15

hdr_noss_bloom_on    54

hdr_ss_bloom_on        25

So with soft shadows disabled the panel setup with 48-lights + 48-emitters is 57fps, the hdr setup is 54, only causing a slight hit.  But with soft shadows enabled the lights and emitters cause a huge hit, the hdr setup much less so.

Visually, I find using mixing translucent and alpha shaders with lights and emitters gives a huge range of subtlety, conformable to every mapping situation, whereas the hdr bloom shaders seem flat and overpowering.  In the time allotted I couldn't make a hdr-bloom shader that gave both a nice amber glow as well as showing a translucent (or opaque) amber diffuse.  

eta:  the particles are a slightly altered ea001_bloom_focused

Edited by geegee
Link to comment
Share on other sites

I can't really help you with art design, I'm not an artist. But if the effect is overpowering, then your material is too bright, or you have set the Bloom effect slider too high - or both.

Link to comment
Share on other sites

That still looks odd, and the difference between 54 and 57 fps might be coincidental, especially with in-game fps meter, which isn't super accurate. MSI Afterburner tools are better for that (both the fps meter and the hardware load percentage indicators).

Also, console commands like r_showprimitives and r_glprofiling should give you some more insight. With lights and emitters for every luminescent surface you will generate more drawcalls and texture calls, than with just one material that has emissive stage.

Also, it would be interesting to see several light + emitter combinations in one line, with player looking at the first one, and all the other lining up behind it. That will should you the overview of the impact that particles transparency overdraw might have.

Edited by peter_spy
Link to comment
Share on other sites

Okay, so the initial setup is 64-bit color on, bloom on, there's one light in the center of the room, noshadows.

3 objects with bloom material (nevermind the weird shape):

001.jpg.722c2aaa1f734754cfebeb5b5b9d4691.jpg

15 objects:

002.jpg.a9fcee3ffc31e5fd33f83f97e3ce4c4f.jpg

As you see, the GPU cost is the same, CPU should be as well, maybe there was some fluctuation while I was taking screenshots. The GPU used is nvidia GTX 1060.

Edit: Out of curiosity I packed 30 objects here, and that gave me some slightly CPU/GPU utilisation, but I think we can assume that this isn't the most viable scenario ;)

003.jpg.95d4a3a6a1a4dc6234d9fba1518728ee.jpg

Edited by peter_spy
Link to comment
Share on other sites

@cabalistic

Yes, there's some room to move re. shader transparency, color, rgb factor and the bloom slider.  

I do these tests to try to learn these different things.  Perhaps I shouldn't have delivered a judgement "visually ...." or artistically, since at root I just wanted to show my test setup, the numbers (now corrected), and bit of what I found so far about how rgb turboboost hdr works with the spectrum, as on the array pic showing colors rgb 8 and all the same bloom factor. 

Thanks again for helping me correct the numbers, and get more accurate info.

Strangely enough, this diversion has heightened my focus on learning more about how to control the particle system.   

 

Link to comment
Share on other sites

Here's another example of this blend/add shader.  The lamp on the wall is done with translucent, alpha, emitter, light.

The weird globe has a translucent 19 frame animated plasma shader, and there's a smaller translucent globe inside it with the same plasma shader bumped with a blend/add stage rgb 4.  There's a grayscale-75 light at center size 50x50x50.  This helps when bloom is off.

The first 2 pics are with everything maxed but bloom off.  The next 2 pics are the same but with bloom on, slider med-high. 

It's hard or impossible to see in the low rez still pics, but with bloom off the inner globe is transparent, and the anim effect bounces along with the outer, but the two globes are sharply distinguished.  With bloom on the translucencies of the two globes merge quite well and the in game effect is quite nice. 

Note how the bloom on/off effects the lamp on the wall.  It effects every lamp I put in my WIP the same way.  I prefer the lamp with bloom off.  ...  

(I didn't see any difference between blend/add 1 and 20 - all seem to produce the same effect.  Am I going crazy???)

off4_3.jpg

off4_5.jpg

mh4_1.jpg

mh4_2.jpg

  • Like 1
Link to comment
Share on other sites

6 hours ago, geegee said:

(I didn't see any difference between blend/add 1 and 20 - all seem to produce the same effect.  Am I going crazy???)

Did you enable 64 bit color buffers? Otherwise, there is no difference.

Link to comment
Share on other sites

It seems like you've moved the bloom slider from the default position, first values from the left shouldn't give such weak effect. Either that, or it's the matter of color value for the blend add texture. Anyway, it will always be a relative effect to some extent.

Edited by peter_spy
Link to comment
Share on other sites

3 hours ago, peter_spy said:

Either that, or it's the matter of color value for the blend add texture.

Look at the pic of the array, above.   It shows the spectrum (a bit off.  ... but hey, who's nitpicking??? hmm), in a fairly equally lighted room with shadows at rgb=8.  Yes, there's a different effect with different colors.  That's what my post was about.

Link to comment
Share on other sites

Bloom effect depends on the brightness or luminance of the observed color. The green component contributes the most to the luminance, blue the least. Therefore the bloom effect should always be stronger for green color vs. blue color (for example), but white will obviously give the strongest effect.

Aside from that, there are a couple of cvars r_bloom_* that control the effect. If you ever messed with them in the past, you may want to delete them from your Darkmod.cfg to reset them to their default state.

Other than that, I'm not sure I see anything wrong with your initial green presentation? It shows a clear increase in the effect depending on the color strength. If the first one on the left is already with a factor of 2, then your initial color simply isn't that bright to begin with, so the strength doesn't look wrong to me.

Link to comment
Share on other sites

@cabalistic

Yes.  

I haven't played around with cvars.   At any rate, I now know something about how to go about tweaking an effect along these lines.

p.s. I mentioned how enabling bloom effected all my lights, so the general look - said something negative.  In fact I went through my entire WIP checking out bloom=on/off and the difference seems small, and tends to look better with bloom on.  

Link to comment
Share on other sites

Yes, Bloom is a screen space effect. It does not work per light or anything. Instead, it looks at the final rendered image and determines bright spots on it, which are then "amplified" in a sense. As a consequence, it effects everything that is over a certain brightness threshold.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recent Status Updates

    • duzenko

      CPU benchmark time - compiling DarkRadiant (2nd run)
      i5 8600K 6C/6T@4.4GHz DDR4 2x2133MHz 9MB cache
      Parallel builds: 1. 3:57 Parallel builds: 6 (default). 2:28 r5 1600AF 6C/12T@3.3GHz DDR4 1x2666MHz 16 MB cache, temp folder on HDD
      Parallel builds: 1. 5:05 Parallel builds: 4. 2:47 Parallel builds: 6. 2:55 Parallel builds: 12 (default). 2:57
      · 2 replies
    • nbohr1more

      Status updates are back so it is also a good time to return to contests!
      https://forums.thedarkmod.com/index.php?/topic/21095-christmas-connections-contest-2021
       
      · 0 replies
    • freyk

      Having seen the new scifi stuff from bladeghost/scythwraith, want to continue the cyberpunk project. Only one problem, can't map.
      · 1 reply
    • jaxa

      Behold, the brand new RTX 2060!
      NVIDIA ponders GeForce RTX 2060 re-release with 12 GB VRAM to paper over RTX 30 scarcity
      · 1 reply
    • thebigh

      There are those who are afraid of greatness
      · 2 replies
×
×
  • Create New...