Creating Bloom Effects

General FreeBASIC programming questions.
Post Reply
Auios
Posts: 11
Joined: Jul 18, 2011 16:50
Location: USA
Contact:

Creating Bloom Effects

Post by Auios »

I've been challenging myself to create somewhat random programs using FB's built in graphics library and I wanted to get a bit more creative with things I am doing. I wanted to learn how to create a bloom effect and understand how they are generated at its core.
Personally I dislike using things other people have made unless I understand it down to the bones.

Here's an example of the bloom effect I'd like to produce.
Image
(Eufloria HD - http://www.eufloria-game.com/)

I had ideas about how to artificially create this - by using images I create in photoshop and just put those images behind the objects I want to give bloom to. However if my graphics were dynamic and generated randomly this wouldn't work.

I don't mind if I am given answers that are "inefficient" so much - I'd like to be able to have a basic foundation of generating bloom effects using FB's graphic library - ie: pset, circle, trans, line, etc...
Once I understand how to do it with those built in functions I will want to know how to make it more efficient using other methods.

Thanks!
dafhi
Posts: 1739
Joined: Jun 04, 2005 9:51

Re: Creating Bloom Effects

Post by dafhi »

relsoft wrote a gfx lib in fb, EasyGL2D which has a super nice bloom.
A lot of code to dig through, but here's a game of his with source
D.J.Peters
Posts: 8629
Joined: May 28, 2005 3:28
Contact:

Re: Creating Bloom Effects

Post by D.J.Peters »

Looks not so complicated as it shines/glows ;-)

Rendering Steps for Creating Real-Time Glow.

(1) The scene is rendered normally.
(in FBGFX render your sprites in an offscreen image)

(2) A rendering of glow sources is blurred to create a glow texture
(expand the blurring glow from lightsources in a second offscreen image)

(3) which is added to the ordinary scene to produce the final glow effect.
(combine both created offscreen images via custom blender or simple ALPHA per pixel)

from here: http://www.gamasutra.com/view/feature/2 ... e_glow.php

Joshy
Auios
Posts: 11
Joined: Jul 18, 2011 16:50
Location: USA
Contact:

Re: Creating Bloom Effects

Post by Auios »

Thanks for the quick feedback guys!
Post Reply