Bloom (free source)

Posted By: Rhuarc

Bloom (free source) - 09/21/06 19:50

A little playing with A6 today, dusting it off... no idea why.

Download (I'm not sharing my models though! )

No claims that this is even considered real bloom in my book, but it does enhance the look of things a bit

Bloom with shadows affected:

No shadow affect:

Bloom:


No bloom (normal A6 rendering)

No bloom (normal A6 rendering)

No bloom (normal A6 rendering)


Kills the FPS too. but hey...
Posted By: Grimber

Re: Bloom (free source) - 09/21/06 20:05

it looks pretty intresting. for the demo is is suppost to already be on or do I have to toggle the effects on? ( mabey its just my video card isn't up to scratch)

this is what I get when running it


Posted By: Rhuarc

Re: Bloom (free source) - 09/21/06 20:12

Forgot to mention that it uses VS/PS 2.0 and requires pro for render to texture....
Posted By: Grimber

Re: Bloom (free source) - 09/21/06 20:55

ok down on 2 counts.
Posted By: FeiHongJr

Re: Bloom (free source) - 09/21/06 21:46

Dang it looks really nice too. I think I got VS/PS 2.0 but know I aint got no Pro Anyway this can be used with out render to texture?
Posted By: Rhuarc

Re: Bloom (free source) - 09/21/06 21:51

Quote:

Dang it looks really nice too. I think I got VS/PS 2.0 but know I aint got no Pro Anyway this can be used with out render to texture?




If you can find that old dll to grab the back buffer, that would work. Otherwise... nope

Rhuarc
Posted By: FeiHongJr

Re: Bloom (free source) - 09/21/06 21:55

You mean render_view.dll?

If so thats pretty funny cause I just downloaded it yesterday for some reason
Posted By: Rhuarc

Re: Bloom (free source) - 09/21/06 21:56

Quote:

You mean render_view.dll?

If so thats pretty funny cause I just downloaded it yesterday for some reason




Haha. yep
Posted By: Lion_Ts

Re: Bloom (free source) - 09/21/06 23:58

Awesome!
If seriously, i had some experiments with bloom using XeXes sylex, but with more ordinary results... going to download - i shall peep a source at the guru
Posted By: Bright

Re: Bloom (free source) - 09/22/06 03:19

It looks really nice but it doesnt seem to like my computer. I get a lot of framerate droppage. I'll try it on our 'good' computer sometime though. Great job!
Posted By: Rhuarc

Re: Bloom (free source) - 09/22/06 03:22

Yeah... the FPS bombs, I just made it mostly for the fun of it, not too much effort spent on optimizing it. It's pretty raw.

(EDIT: I'm surprised... this thread is just asking for Matt to jump in and tell everyone it sucks and that they should buy sphere )
Posted By: TheExpert

Re: Bloom (free source) - 09/22/06 07:03

Yes Bloom if not optimised can kills FPS on some engines.
Some blooms do not require pixel shaders like in Blitz3D (DX7 engine) demos.
I think you could have a faster bloom if you would use BLitz3D trick.
Posted By: DavidLancaster

Re: Bloom (free source) - 09/22/06 11:58

Dude Rhuarc, this is very cool, I'm impressed to see you achieve this so simply
Posted By: Rhuarc

Re: Bloom (free source) - 09/22/06 18:07

Quote:

Yes Bloom if not optimised can kills FPS on some engines.
Some blooms do not require pixel shaders like in Blitz3D (DX7 engine) demos.
I think you could have a faster bloom if you would use BLitz3D trick.




You're right, there are a lot of great tricks to get bloom without pixelshaders... A6 just isn't well set up to do a lot of them without additional render code in a DLL....

And this is why I'm writing my own renderer now .
Posted By: Stansmedia

Re: Bloom (free source) - 09/22/06 19:01

For A6? Meaning we get more fancy shmancy effects??
Btw I like the bloom, but its a little hard to get the effect to blossom more.
Posted By: Rhuarc

Re: Bloom (free source) - 09/22/06 19:21

Quote:

For A6? Meaning we get more fancy shmancy effects??
Btw I like the bloom, but its a little hard to get the effect to blossom more.




No, Ben (Wizrealms) and I are developing a new engine, called CRUTCH3D. Pretty early in development yet.

I tinkered some with it in the WACAI "dust" style demo, and added a tinting ability to it to make it so it can be tinted red when you get injured, it looks bloody awesome (literally ). Reminds me some of the hit effect in Call of Duty 2. The demo still runs at 60fps on my system too.

Might post a demo and screens sometime.
Posted By: Ambassador

Re: Bloom (free source) - 09/22/06 21:02

Humm ya using box blur for bloom or gaussian blur? Your blur look pretty different compared to our blur. (check the Rabbit Engine thread at Tools forum) When we use bloom in our engine the fps goes down almost by half. Our bloom is pretty simple:
Render to texture (with FBO)
Down sample 1/4 of the screen
Horizonal blur pass
Vertical blur pass
Combine

Creates pretty nice and strong bloom... Though box blur aint the best for bloom...
Posted By: Rhuarc

Re: Bloom (free source) - 09/22/06 21:54

Quote:

Humm ya using box blur for bloom or gaussian blur? Your blur look pretty different compared to our blur. (check the Rabbit Engine thread at Tools forum) When we use bloom in our engine the fps goes down almost by half. Our bloom is pretty simple:
Render to texture (with FBO)
Down sample 1/4 of the screen
Horizonal blur pass
Vertical blur pass
Combine

Creates pretty nice and strong bloom... Though box blur aint the best for bloom...



This uses a variant of a Poisson blur, with some number tweaking. It definitely doesn't cut the framerate in half. 4 pass shader with 8 samples each, two passes for horizontal and two for vertical. The render to texture is done to a full-screen sized quad, A6 has some serious issues with square textures for RTT since a 6.31. I'd normally use a 256x256 or 512x512 texture. This bloom here has nothing to do with our engine. Our engine is still in the structural phase, so we aren't even rendering anything yet. Lots of work goes into designing an efficient and well designed framework. And I work a fulltime job in game design, so I definitely don't have the most time in the world.

-Rhuarc
Posted By: Ambassador

Re: Bloom (free source) - 09/23/06 11:36

@Rhuarc
Okay . Humm the reason for the big fps cut in our bloom is probably because the scene is very simple so even the littlest additions affect the fps pretty much. If it would be bigger, then the fps would be more stable I guess. But good luck on your engine .
Posted By: Rhuarc

Re: Bloom (free source) - 09/24/06 05:10

Quote:

@Rhuarc
Okay . Humm the reason for the big fps cut in our bloom is probably because the scene is very simple so even the littlest additions affect the fps pretty much. If it would be bigger, then the fps would be more stable I guess. But good luck on your engine .




Yeah. that will do it .

It helps to use a per-poly/textel framerate calculation in your framerate "performance" factoring to figure what your actual performance hit is. Usually more work than it's worth though . It does make for an "ok" benchmark though.
Posted By: EX Citer

Re: Bloom (free source) - 09/24/06 16:48

Very cool and useful. Could be softer. Looks a little squary/strange. Is it screen size independent?

In anyway very good contribution. I would even buy a fast tool which alternates the screen, like gaussian blur, niedrigbandfilter (donīt know what that is in english, but it's a mix of a transparent gaussian blurred image over the real image which then get together as one image some contrast added) and negative screen render over a certain area (via mask or x,y coordinates) and more fast filters are good ether. And they should work on many computers So it looks everywhere the same. Man, that would be cooool.

regards, EX Citer
Posted By: Machinery_Frank

Re: Bloom (free source) - 09/25/06 06:27

I also would like to buy a good post processing shader package. I would like to have Bloom, Motion Blur, Depth of Field and some kind of heat vision, night vision.
Posted By: Excessus

Re: Bloom (free source) - 09/25/06 15:09

Hi Rhuarc,

I've been looking at the code and I have a question about how it's setup in C-Script:
You render a secondary view (GlowCamera) into the bitmap of a view entity. This view entity is visible in the primary view (camera). The view entity has the blur shader applied so it will apear blurred in the primary view. Did I get it right so far? My question is: won't the primary view ALSO render all objects in the scene? How should the camera know that only the view entity will be visible? If it also renders the whole scene, that would explain the massive framerate drop. You could point the camera to the sky (so nothing is visible in the camera) but then it would still have to do frustum culling and draw all the pixels of the skycube AND do the blur shader..
Posted By: PHeMoX

Re: Bloom (free source) - 09/25/06 15:20

Yes, that's definately the problem, speedwise, with A6's views, they are fully rendered views. If only we could do stuff with the resolution for each view individually and stretch it out or stuff like that. In combination with the no_render flag or whatever it's called, it's possible to get higher speeds. Still, at the moment only full screen post processing done by a shader on a entity in front of the screen have low frame rate impacts, but off course I could be doing all kinds of things totally wrong here ...

Cheers
Posted By: Rhuarc

Re: Bloom (free source) - 09/25/06 17:09

Quote:

Hi Rhuarc,

I've been looking at the code and I have a question about how it's setup in C-Script:
You render a secondary view (GlowCamera) into the bitmap of a view entity. This view entity is visible in the primary view (camera). The view entity has the blur shader applied so it will apear blurred in the primary view. Did I get it right so far? My question is: won't the primary view ALSO render all objects in the scene? How should the camera know that only the view entity will be visible? If it also renders the whole scene, that would explain the massive framerate drop. You could point the camera to the sky (so nothing is visible in the camera) but then it would still have to do frustum culling and draw all the pixels of the skycube AND do the blur shader..




Actually, both views need to be rendered fully.

The BlurCamera renders the entire scene to a texture, that of the screen quad. Then, Camera is rendered with the screen quad overlaying the entire scene with transparency- this makes a nice blending result that makes the bloom.

-Rhuarc
Posted By: Rhuarc

Re: Bloom (free source) - 09/25/06 17:12

Quote:

Yes, that's definately the problem, speedwise, with A6's views, they are fully rendered views. If only we could do stuff with the resolution for each view individually and stretch it out or stuff like that. In combination with the no_render flag or whatever it's called, it's possible to get higher speeds. Still, at the moment only full screen post processing done by a shader on a entity in front of the screen have low frame rate impacts, but off course I could be doing all kinds of things totally wrong here ...

Cheers




You're right here about using an entity in front of the screen. The only other option is to render a true screen quad in screen space using a DLL. This would actually work pretty well, and would possibly allow the entire process to be done without GlowCamera (point Camera to render to the texture instead, nuke the screen entity that would obstruct it, then render the quad after all of this happens, overlaying what was rendered by the camera).

Would be a fun process...

-Rhuarc
Posted By: Excessus

Re: Bloom (free source) - 09/25/06 21:17

Quote:

and would possibly allow the entire process to be done without GlowCamerap



Yes that's exactly my point. The original scene is already rendered, so it should not be necessary to re-render it just to blend it with the post-processed texture.

Not having to render the scene twice sounds like it would improve performance quite significantly. I have no experience in writting plugins (or C++ at all, although I have read some tutorials here and there). Would this be a suitable first project or would it be too complicated? Not that I have time for it soon anyway..
Posted By: EX Citer

Re: Bloom (free source) - 09/26/06 17:21

well, use a screen shot. Thats a allready rendered screen, maybe with one frame delay... but who cares Even better that adds a light motion blur
© 2024 lite-C Forums