Results 1 to 9 of 9

Thread: bloom filter

  1. #1
    Member Contributor
    Join Date
    Apr 2005
    Posts
    85

    bloom filter

    hi i got some ideas of how to make a bloom filter but they all seem like it will end up being a very fake and slow bloom effect

    i thought about render to texture and this texture would be pretty much small (64x64 maybe?) so then i blend at the screen and that would give me a bloom like effect perhaps but how to only ''bloom'' the lightest parts only? is there any good blending mode for this?

    i dont really know if it would work
    thanks in advance

  2. #2
    Senior Member Regular Contributor
    Join Date
    Aug 2004
    Location
    Angers, France
    Posts
    245

    Re: bloom filter

    i thought about render to texture and this texture would be pretty much small (64x64 maybe?) so then i blend at the screen and that would give me a bloom like effect perhaps but how to only ''bloom'' the lightest parts only? is there any good blending mode for this?
    Hm if i understand, you want to apply a bloom filter only in lightest part, the render to texture is not a bad idea, but the first word in my mind is 'RNL' for Rendering with Natural Light, presented at Siggraph 98 by Paul Debevec, i don't know if this technique is exactly what you want...

    But this is not a beginner technique
    The .Product will make you .Believe

  3. #3
    Member Contributor
    Join Date
    Apr 2005
    Posts
    85

    Re: bloom filter

    what i want is to have bloom for example when you watch a window you can see a glare / bloom all arround it i can make this with quads but the idea is to have it dynamic not just static

    dynamic bloom would be nice to have

  4. #4
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,102

    Re: bloom filter

    For a really dynamic bloom effect, you propably have to use HDR rendering, that is, render to a float texture without clamping the values to [0,1].

    Then you have your "normal" scene in the range [0,1], and the "overbright" surfaces with higher values should produce a bloom. Then you can tone-map these values down to [0,1] range, so the normal range is mapped to something really small like [0,0.1] and the brightest surface is at 1.

    Then you apply a blur filter to this texture and render it over the scene, and you get a bloom only on really bright surfaces.

    It's propably possible to fake this effect without float buffers, perhaps with a cutoff treshold based on brightness in the bloom texture. But that would not really look good. And you won't get around using fragment programs either way.

  5. #5
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: bloom filter

    Or you can do it the Half Life 2 way : fake it !
    render only bright elements (windows, sun, lamps, fire...) to the bloom texture, so a standard RGBA8 texture is enough.

    For blending I think the best would be a GL_ONE,GL_ONE type additive blending.

  6. #6
    Member Contributor
    Join Date
    Apr 2005
    Posts
    85

    Re: bloom filter

    you guys giving me a headacke
    how can i just fake it by rendering a low resolution image textured to a quad over everything and blended so bright parts looks like bloom only ?

    the most cheap way please i dont even support real hdr by hardware here

  7. #7
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,102

    Re: bloom filter

    Then do as ZbuffeR said, in your low res texture, draw the bright parts only... There is no way to "automatically" filter out the bright parts only without using fragment programs and HDR...

  8. #8
    Member Contributor
    Join Date
    Apr 2005
    Posts
    85

    Re: bloom filter

    how do i generate a high dynamic range image then?
    maybe youre just using stereotypes ... ive seen it done with out any fragment any shader anything fancy just blending and it worked

  9. #9
    Senior Member OpenGL Pro
    Join Date
    May 2000
    Location
    Naarn, Austria
    Posts
    1,102

    Re: bloom filter

    Of course it works without HDR and fragment programs. Either you just draw the bloom with polygons, or you use the method of HL2 like ZbuffeR proposed. Neither will be truly dynamic...

    HDR really just means you render to a float texture, and then post-process this texture before rendering it to the screen. This way you can get resulting brightness that is not clamped by 1.0, and this additional range can be used to perform various effects in the post-processing stage, like bloom or different exposure and so on...

Similar Threads

  1. Bad quality bloom
    By Kdeon0 in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 05-07-2014, 12:22 PM
  2. bloom/blur, rendering to FBO, clearing FBO
    By Oradon in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-26-2011, 04:31 AM
  3. Bloom effect
    By prisoner52 in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 02-17-2011, 03:48 PM
  4. Problem with HDR + bloom
    By imported_JoshKlint in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 10-26-2009, 05:42 PM
  5. faking glow or speedup bloom ?
    By martin0815 in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 08-12-2004, 02:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean