what is the difference between glow and bloom?

Started by
6 comments, last by eq 15 years, 3 months ago
I think bloom is to blur the scene horizontally and vertically then add to the original scene. Is that any difference with glow?
Advertisement
The difference is that bloom is a more specialized version, because it uses another target.
Both bloom and glow use a vertical and horizontal blur over some source render target, and blend over with the original scenery.

Bloom however usually uses a darkened scenery (to only blur the bright parts, as our eye perceives it), blurs that and blends it over the original one, whereas glow uses anything (my "engine" renders every object to another rendertarget, either black or colored if the the object should glow, and then applies a blur to it).
Thanks for your reply.
An other question.

I wanna know if Glow and bloom must be added to the original scene( entier scene ), or be added to the original object.

I mean glow or boom is kind of an effect applied to entire scene or single object.
Well, you should render your entire scene first, then render everything to your glow rendertarget. You will need to render objects that don't glow in black as well, or glowing objects will "glow" through object between them and the camera (which is propably not what you intended).
After that is done, you apply the blur to the glow rendertarget and blend the target over the original colored scene.

A tipp to improve performance: If you make the rendertarget 1/2th or 1/4th of the original scene, you will save some speed when rendering all objects to the glow rendertarget, but most importantly, you can blur the rendertarget really quick, because you don't need that much iterations, to make the blur visible.

As an example: I added blured the glow rendertarget over 20 pixels and it wasn't barely visible on a 500x500 pixel image, however I then reduced the glow rendertarget to 1/4th the original size and voila, the glow is visible with a blur that only needs to blur 10 pixels or so.
If you have GIMP or Photoshop, copy an image as two layers and set the top layer as "add". Basically its simply adding two photos. (Multiplying will make it blurry instead of glowing and keeping its sharpness).

Bloom/Glow as stated though, you usually blur the image and then do added blending. As stated, you will have a final image, and an image of just the glowing parts. These will then be added.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

Is that mean glowed object must be sorted first?
No, they don't need to (unless you use transparency).
When you render a mesh, DX calculates the distance for each pixel from the camera and then looks up the exact same pixel in the z-buffer. If that pixel is farther away, the new pixel will replace the old one on the rendertarget / backbuffer and the one from the z-buffer. If the new pixel is farther away though, the old one will stay.

This approach works for solid meshes, so they can even intersect without producing visual errors.
Alpha blending however is more difficult, since the z-buffer can only store the distance for one visible pixel at a given position. The z-buffer approach doesn't work then, since several pixels could overlap and produce one final coloured pixel on the backbuffer, although they're several pixels with different distances to the camera. In case you would need to use alpha blended meshes to render glow, you will need to sort your objects from front to back in order to prevent visual errors.

I hope this is not too confusing.

[Edited by - SiS-Shadowman on January 21, 2009 3:57:36 AM]
Quote:Is that mean glowed object must be sorted first?

This question leads me to believe that you're really asking for a different physical phenomena than bloom/glow.

In real world, what you call bloom/glow happens because you don't have perfect lenses (or eyes).
It also happens because the cones in your eye "saturate" when hit with to much energy, when this happens the energy bleeds to nearby cones (that's why a blur simulates this very well).
In other words these effects are only imaginary, there isn't really any "light" outside the glowing object.

The second physical effect is when light from a glowing object interacts with particles in the atmosphere (for instance a street light on a rainy day).
The more particles in the atmosphere the more visible this becomes.
In empty space this effect can't be visible (but you would still "see" glow).

I.e a light emitting object totally behind a non light emitting object would still produce a visual "glow" in real life (light bouncing off particles in the atmosphere), this effect can't be captured with the simple bloom effects discussed above.

One way to capture these effect would be to render billions of small particles and light them using the light emitting objects (light sources), something that is non trivial.

If you search for "volumetric lights", "light shafts" etc you'll see methods to visualize this effect, they are however most likely limited to few very specific light sources (point-, spot-light etc) and not easily generalized to objects with any texture.

To sum it up, there's really two types of "glow" that need to be simulated to capture these effect, one that is simple to simulate and one that is very hard imo.

Edit: Spelling

This topic is closed to new replies.

Advertisement