Pages: [1]
  Print  
Author Topic: "Cascaded Blur 2" — Even More Natural Bloom Effect  (Read 11991 times)
tcpp
VIP
Nub


Cakes 4
Posts: 6



WWW
« on: September 11, 2012, 01:34:58 PM »

I wrote another bloom effect algorithm with improved quality. It uses a cascaded algorithm like my old bloom algorithm.

Some months ago, someone found the bug that Cascaded Blur bloom effect causes strange flashes on screen. On Sep 10, Gig reminded me of this bug and I fixed it now. The bug that caused strange flashes seemed to be fixed, but some small flickers remained — what we call "aliasing". I tried to remove the aliasing, but it turned out that the current Cascaded Blur algorithm is not capable of antialiasing. So I tried another approach, and finally wrote another bloom effect algorithm with much less aliasing.

Performance
Cascaded Blur 2 is slower than the original Cascaded Blur, but not as slow as the original OpenArena bloom algorithm (r_bloom_cascade=0). Tested on my Lenovo X121e (AMD E-300 1.3GHz with integrated Radeon HD 6310).

Variables
  • r_bloom_cascade 0=original algorithm, 1=original Cascaded Blur, 2=Cascaded Blur 2
  • r_bloom_cascade_blur shift distance of the intermediate image to approximate a gaussian kernel. Value higher than 0.5 does more harm than good. 0=no intermediate blur. 0.32 seems to be appropriate.
  • r_bloom_cascade_intensity brightness of the bloom effect. Bloom buffer is likely to saturate when r_bloom_cascade_intensity is high.
  • r_bloom_cascade_alpha amount of the wet(blurred) image
  • r_bloom_cascade_dry amount of the dry(not blurred) image
  • r_bloom_cascade2_lpf_level decides the quality of the input-stage antlialias filter. If the display resolution of your monitor is 2048x1536, the antialias filter would do sampling (2048/256)*(1536/256)=48 times, which is too much. r_bloom_cascade2_lpf_level limits the sampling count to r_bloom_cascade2_lpf_level^2 time(s). 
  • r_bloom_cascade2_darken count of the darken filters used prior to the bloom algorithm.
These still need tuning.

note: Attached tr_bloom.c is combined with fromhell's bloom reflection effect and the original Cascaded Blur bloom effect (with glitches fixed)


Sorry for my poor English skill (。>﹏<) (and I'm so sleepy when writing this)
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #1 on: September 12, 2012, 01:35:02 AM »

About bloom speed.... I just tried DO NOT LINK[/b]) h t t p s : / / openarena . wikia . com/wiki/Timedemo]timedemo with demo088-test1 on a mid-end machine (with integrated Intel video), in windowed mode.
With bloom off: 70.1 fps
with original bloom on: 30.1 fps
with cascaded blur 1: 36.2 fps...
I can't try with cascaded bloom 2 until someone creates updated win32 binaries inlcuding it.   Grin
« Last Edit: September 12, 2012, 01:50:37 AM by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
tcpp
VIP
Nub


Cakes 4
Posts: 6



WWW
« Reply #2 on: September 12, 2012, 06:41:27 AM »

I tried timedemo on my Lenovo X121e (AMD E-300 1.3GHz with integrated Radeon HD 6310, Ubuntu, open source AMD driver).

  • No bloom: 20.8 fps
  • Original bloom: 13.5 fps
  • Cascaded Blur: 14.3 fps
  • Cascaded Blur 2 (Case 1): 13.0 fps
  • Cascaded Blur 2 (Case 2): 13.3 fps
  • Cascaded Blur 2 (Case 3): 13.7 fps

Test Cases:
Case 1: r_bloom_cascade2_lpf_level=2, r_bloom_cascade_blur=0.32
Case 2: r_bloom_cascade2_lpf_level=0, r_bloom_cascade_blur=0.32
Case 3: r_bloom_cascade2_lpf_level=0, r_bloom_cascade_blur=0

Test Case 1 works a little bit slower than the original bloom effect, but it looks even better than Call of Duty: Modern Warfare 2's bloom effect.
In contrast, Test Case 3 works a little bit faster. This case involves some aliasing, but not as much as original Cascaded Blur.

Logged
fromhell
Administrator
GET A LIFE!
**********

Cakes 35
Posts: 14520



WWW
« Reply #3 on: September 12, 2012, 06:14:18 PM »

I should really benchmark this on a FX5200, because the performance difference of the old bloom and cascaded is huge there.
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
.Luke
Nub


Cakes 2
Posts: 38



WWW
« Reply #4 on: September 12, 2012, 06:34:44 PM »

I honestly had no idea this was included with the 8.8 version! Since the colors are dark on my Linux install, the maps looked a little washed out, and the frame rate takes a huge hit in more detailed areas because of my open source drivers. I'll have to try this on my Windows install later tonight and post the frame-rates, it might perform better on that, because I'm really liking how refreshing OA's lighting looks with this turned on. ^^
Logged

|
Pages: [1]
  Print  
 
Jump to: