pouët.net

programming question

category: general [glöplog]
 
Can somebody explain the technique to achieve the glow that we can see in many demos like FR-025, Fr-036: zeitmaschine, Outracks:blockbuster, etc.

Is it something like rendering the whole seen in a smaller target and blending it with the original?
Thanks
added on the 2006-03-06 20:57:29 by duffman duffman
I don't know the "academic way" of doing it but I basically do it that way if that can be of any help:
- small version of the scene in a texture
- bright-pass to keep only what will glow
- gaussian blur on the result (2 passes with separable filters)
- apply the result on your scene

You can also directly render the hilights only in a small rendertarget but I prefer the brightpass method on a complete scene using a glow threshold (mandatory if you want to support High Dynamic Range for instance)
added on the 2006-03-06 21:16:06 by keops keops
You can give a look @ ATI Render Monkey example shaders.
added on the 2006-03-06 21:22:13 by bdk bdk
The best description of this effect is found in gamasutra / GPU Gems. http://www.gamasutra.com/features/20040526/james_01.shtml
It explains how they did it in the game Tron 2.0.
added on the 2006-03-06 21:42:04 by Xetick Xetick
Is the bright-pass something like an alpha test?
When you apply the result on the scene, you use bilinear filtering right?
added on the 2006-03-06 21:47:25 by duffman duffman
if you dont you get mosaik effect..

just write the base code for it and play around and it will all become very clear.

or test some in photoshop first..
added on the 2006-03-06 21:49:34 by Hatikvah Hatikvah
Ok thank you all for the advice.
added on the 2006-03-06 21:51:12 by duffman duffman
The bright pass allows you to keep only the pixels with a given luminance (direct lights, specular highlights, etc).
It does not work exactly like that but to make it simple, it's like keeping the pixels for which R, G and B are above 128 for instance.

and yes you need filtering or else it will look really bad
added on the 2006-03-06 21:54:27 by keops keops
if you render separately to the smaller render target you're going to get a lot of aliasing. better to render the full scene then downsample that to smaller render target. if you're small RT is a quarter res then you'll want to average the 16 pixels from the full size rt for each pixel of the small rt. you can do this fast with 4 bilinear samples.
added on the 2006-03-06 22:20:08 by blackpawn blackpawn
If memory serves me correctly, chaos himself describes how this is accomplished in some assembly seminar. (Available on video somewhere near you...)
You could check out the tool Werkkzeug and load the example file of FR-025. Have a look on the operators how they are stacked. The ops should show your how the algorithm works in general.
added on the 2006-03-07 15:48:52 by Cj Cj

login