gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS Misc > Demo - Fullscreen bloom/glow effect at 60fps

#65506 - bluescrn - Tue Jan 03, 2006 7:09 pm

The early version was discussed here (it's based on the display capture/dual pass demos discussed there):

http://forum.gbadev.org/viewtopic.php?t=7958

But as I've just uploaded an updated demo - which looks nicer and now runs at 60fps (although it's still C, and there's a few optimizations left) - I thought it deserved a thread of its own...

The demo (with source) is here: www.bluescrn.net/dsbloom.zip (It's still based on those previous examples, and using the ship model/rendering code from them)

And my hopeless attempt to take a screenshot: www.bluescrn.net/dsbloom.jpg

Anyone else got interesting ideas for postprocessing a capture of the 3D? - already suggested was antialiasing - you could do supersampled 2xAA at 30fps by rendering a buffer twice the size of the screen in 2 passes, then resampling it down with the CPU.

I suppose the capture system could be used for very constrained render-to-texture effects (shadows/reflection maps?) But in practice it would probably be better to have a software renderer for those things, to avoid the huge VRAM/framerate costs that could be involved?

#65511 - ecurtz - Tue Jan 03, 2006 7:17 pm

That screenshot looks great bluescrn.

I should mention that the spaceship model is from the free samples available from 3drt.com. They have some nice stuff at very reasonable prices if you're looking for game assets. Sorry to interrupt your thread, but I wanted to make sure they got credit.

#65583 - The 9th Sage - Wed Jan 04, 2006 3:20 am

Wow, that is even better than the old version...I showed a friend of mine at work this demo today, and he thought it was pretty cool...can't wait to show him this one then. :)

*edit*
By the way, how did you take that picture so clearly? I was trying to take a picture of the old demo with my digital camera and not being very successful.
_________________
Now with 20% More Old Man from Zelda 1 than ever before!


Last edited by The 9th Sage on Wed Jan 04, 2006 3:31 am; edited 1 time in total

#65584 - M3d10n - Wed Jan 04, 2006 3:24 am

With the NDS file all I get are White Screens Of Death on my EZ-Flash II. The ds.gba file works fine, though (holy God, it's awesome in motion, I'd love to see such thing applied to a scene or something).

Strange, I get these WSODs with the original two pass demo too, and the SnesDS and NESDS (but I can't get those to work not even in ds.gba format - they seem to have weird headers I can't fix).

Anyway, awesome demo. I love how it's only blurs the bright parts of the image, something only the corrent generation consoles were supposed to do.

This could be used to greatly enhance light effects, that often don't look as cool with plain alpha blending. I remember using ATI's smartShader stuff to run N64 emulators with an HDR-ish bloom shader on them, and it made some games look a LOT better, making shiny effects shine as they were supposed to.

#65598 - tssf - Wed Jan 04, 2006 8:28 am

The example looks great. Can you do a whole scene like that? Or would it be too much?

Sorry to go a little off topic too, but does Mario Kart use some form of anti-aliasing? I noticed the polygons are a lot less "jagged" than most other DS games that use 3D.
_________________
Mathew Valente [TSSF]
------
Chrono Resurrection Musician

#65600 - mntorankusu - Wed Jan 04, 2006 8:51 am

tssf wrote:
The example looks great. Can you do a whole scene like that? Or would it be too much?

Sorry to go a little off topic too, but does Mario Kart use some form of anti-aliasing? I noticed the polygons are a lot less "jagged" than most other DS games that use 3D.

Yes. The DS has hardware antialiasing. Check out Nintendogs, it's really easy to spot there.

Antialiasing using bluescrn's suggested method would (most likely) look a lot better, however.

#65609 - DekuTree64 - Wed Jan 04, 2006 10:53 am

Here's a fun little variation on your source, bluescrn: http://deku.gbadev.org/program/motionblur.zip.

Only uses one VRAM bank. Basically just blends the 3D output with the capture buffer for motion blur, and then during VBlank it mirrors the top half of the screen onto the bottom half, for a kaleidoscope-esque effect.


Tomorrow I'll try doing a distortion map effect. Could use it for water ripples, or maybe some nice explosion shockwaves :)
_________________
___________
The best optimization is to do nothing at all.
Therefore a fully optimized program doesn't exist.
-Deku

#65613 - M3d10n - Wed Jan 04, 2006 12:03 pm

Can the captured buffer be used as a texture? That would open all sorts of fancy stuff, like simple real time reflections/distortions.

#65670 - LunarCrisis - Wed Jan 04, 2006 10:28 pm

The only problem with that is that you would drop to 30fps. You would need another frame for each extra texture you want to render, unless your textures are 256x64 or something like that, in which case you could put them above each other.
_________________
If a tree falls in the forest and no one is there to hear it, why the heck do you care?

#65733 - cybereality - Thu Jan 05, 2006 10:06 am

That demo looks really cool man. I imagine it may eat too much resources to use for a whole game, but it could be used for effects. For instance, motion blur on a wip3out style racer when you hit turbo. Technically you could use that effect for real-time shadows / reflections but I seriously doubt you could use it in a game. I mean, most PS2/PC games dont use real reflections (they have pre-compiled cubic environmental maps with no character reflections). The best bet is using it to do full screen blurring similar to Metal Gear Solid on PS2. For some reason those full-screen filters seem to make the game look more real. Nice job.
_________________
// cybereality

#65782 - LiraNuna - Thu Jan 05, 2006 6:06 pm

Amazing! but isn't 2 BGs too much?

#65846 - LunarCrisis - Fri Jan 06, 2006 3:11 am

LiraNuna wrote:
Amazing! but isn't 2 BGs too much?
Why? For the main screen, a great many games just use the 3d BG with one BG on top for the GUI.
_________________
If a tree falls in the forest and no one is there to hear it, why the heck do you care?

#136826 - ChrisKnott - Sun Aug 05, 2007 6:28 pm

Hey, does anyone have this demo still? The site seems to have gone down... thanks!

#144806 - theli - Wed Nov 07, 2007 2:19 pm

ChrisKnott wrote:
Hey, does anyone have this demo still? The site seems to have gone down... thanks!

sorry for resurrecting ...
if anyone founds this and wants to see this very nice demo ...
i found today it here:
http://images.rawkstore.com/ds/Public%20Domain/

#144897 - __HBK__ - Fri Nov 09, 2007 12:28 am

This really looks amazing.
My only want is that this is included in a game. ANY GAME.
It just looks so cool ;_;
_________________
:/ what're you lookin' at?

#160739 - Payk - Mon Jul 21, 2008 10:58 am

bluescrn wrote:
I suppose the capture system could be used for very constrained render-to-texture effects (shadows/reflection maps?)


Yes, it can. I already did a realtime env mapping longer ago using that capture reg.

http://www.payk.drunkencoders.com/Pages/Projects.html