Sunday, March 2, 2014

Woah, Back to action! All about the bloom!

Hey guys!

Sorry ive been so disconnected lately I had a lot going on while my reading week was ongoing. Therefore I missed about 3 blogs :(.

Now that ive gotten through the apologies through, I would like to continue on to the topic for today! HDR Bloom. For those of you who have no idea what Bloom is, I can explain using some easy terminology.

Bloom is the effect that you get when its raining and the light from a light source, almost blurs off the side of geometry bleeding onto other objects that would normally not have that kind of lighting affect it.

For example, if it is night where you are, go ahead turn off the lights and then go to your desk, turn your desk lamp on, then go ahead and squint while you look at the light. You will notice that the light blends and bleeds off the actual lamp light. That in essence is what we are hoping to achieve with bloom.

Bloom makes the entire scene look almost richer, and gives some games a nice dynamic and realistic look. This gives game developers the ability to make their games look nice while still providing game play with almost no cost. Bloom above everything else does allow a nice effect on lighting while still having the efficiency that they need to make other effects happen.

Before I go any further I am going to actually show you what Bloom is! Then what we will do is go over what exactly post processing is, and how do we do it. Then after that I will get some light explanation on how to make bloom happen in a game!

Here is a nice picture of what bloom will look like in a game. Source

If you look at that image, you will see that it looks a bit foggy and rich, especially around the light sources. This effect is not terribly expensive, however it does give a rich look.

So a bit of information on Post Processed effects, this technique is relatively new to the industry and has not been around for all that long. The ability to apply these effects to an entire scene is very innovative moving forward towards a new gaming industry where we can pull out more effects by filtering and applying those filters. 

Post processing by definition is: The term post-processing (or postproc for short) is used in the video/film business for quality-improvement image processing(specifically digital image processing) methods used in video playback devices, (such as stand-alone DVD-Video players), and video players software and transcoding software. It is also commonly used in real-time 3D rendering (such as in video games) to add additional effects. As depicted by Wikipedia : Source

So to get an effect like bloom you have to take four steps. That is it four steps to get an amazing effect like bloom! 

Step 1: You need to render the entire frame to a FBO (Frame buffer object) rather than the back buffer/screen like normal. We will call this SceneFBO

Step 2: You need to do something called tone mapping which is the process by which you can map the specific tones of an image. For example you can map the white out of an image using tone mapping because white is a specific tone. In this case we will be using tone mapping to find the white/brighter areas of the image so that we can do effects on only the light elements of the scene. So we take these light areas ONLY and print them to another FBO (Frame Buffer Object) we will call this ToneFBO

Step 3: Take the ToneFBO, and we will use a KERNEL or a CONVOLUTION filter to blur the image, what this will do is give us the blured foggy effect that we saw in the original image. Once that is done we will take the ToneFBO and send it to one last FBO, we will call this one BlurFBO.

Step 4: This last step is really easy, we will take our SceneFBO and add the BlurFBO to it, what this will do is blend the colors in both of them, remember that the BlurFBO only has the blurred light elements in it, so when we add and blend these together we will get much brighter lights, along with the burred edges along everything that is lit. Giving us that foggy effect that really enriches the elements of the scene.

That is my friends FBO's and BLOOM. If you have any questions please do feel free to leave comments on this blog, I will be posting more as we move forward! Look forward to the next blog tomorrow!

Have a good one guys!
Regards,
Stephen Krieg




No comments:

Post a Comment