Game Engine Update - Bloom Post Process

Published July 22, 2015
Advertisement
Finally today I've added bloom - I know not every object has bloom in the real world. It bugs when when I'm playing a game and I see a shirt giving off bloom effect.

Originally I was rendering normal scene and bloom scene to different render targets. Then I was applied the blur to bloom texture using a UI Bitmap Element. I figured it out it wasn't working the way it should.

So, I had to make multiple render targets:

1) Normal Scene with lights rendered.
2) Bloom Scene with threshold of 0.3
3) Blurred horizontal of the bloom scene
4) Blurred verticle of the bloom scene from previous horizontal blur.
5) Output the bloomed and blurred to final render target.
6) Render 2D Quad and disable depth buffer outputting the final bloom effect with combination of normal scene and bloomed scene together.

Viola we get this:

ScreenCaptured_nossao00000297.jpg

I rendered the scene with it's original size. The bloom scene and the blurred horizontal and vertical were both rendered as 256.0f then upsized to the original size of rendering window.

I believe if I step it up from 256.0 to 512.0 then full rendering window size - there should be a very nice gradual looking bloom effect.

Next ambitious step is to work with light shafts and head back to SSAO like I was working on earlier.
1 likes 4 comments

Comments

Spidi

I know not every object has bloom in the real world. It bugs when when I'm playing a game and I see a shirt giving off bloom effect.

Hi there!

First of all, take my words with a grain of salt, because I'm only a hobbyist when it comes to rendering and shaders, but maybe this could help you out:

I don't know if you are using something similar, but check out how Monolith fine-control the glow effect in TRON 2.0:
http://http.developer.nvidia.com/GPUGems/gpugems_ch21.html

Instead of simply using a scalar threshold for a full-screen post-process, you could also use a texture for individual meshes, or a value per mesh, so that you can fully cancel out objects or parts of an object, and when needed "enhance" or "colorize" the glow effect.

Unreal engine also has some configurations and a so-called "Bloom Dirt Mask" to control the bloom effect:
https://docs.unrealengine.com/latest/INT/Engine/Rendering/PostProcessEffects/Bloom/index.html

Again, sorry if this is not really useful or if it leads to artifacts / bad quality, as I said I'm not an expert in the topic...

Br, cool pic!

July 22, 2015 06:37 PM
Paul C Skertich

I'll check out those links in a bit I may be working on deferred post processor that can work easily with making a post process tree.

I'll be working on more on enhancing the bloom abilities and material value would be necesarry in order to create what gets bloomed and what does not. That is on the to do list as well :D

July 23, 2015 12:18 AM
Eck
I had some post processing working for bloom/glow effects in my XNA Engine that I worked on. I was focusing on 2D so I'm not sure how easily you can adapt this to 3D, but it might give you some ideas.

I didn't want every single white surface to glow, so I had a flag on my sprites shouldGlow. Things like ships and asteroids didn't glow, while things like laser bolts and engine trails did. I rendered only the shouldGlow sprites into a RenderTarget and applied my glow effect there. Then I rendered the whole scene with ALL the objects and combined the two.
July 23, 2015 12:29 AM
Paul C Skertich

Eck I'm starting to think you're a mind reader - that's exactly what I had in mind. A boolean to let the engine know whether or not to apply the bloom shader or not. When the engine reads the material file - it would be able to say, "Okay this is bloomable" and place it inside the rendering query of objects to allow to be bloomed. Should be a blooming success! :D

I'll show you guys a update later on - not sure when but eventually.

July 23, 2015 12:52 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement