Project Declension 2008 (Yes! Crepuscular rays)

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
lostclimategames
Posts: 331
Joined: Sat Sep 02, 2006 4:11 am
Location: Michigan
Contact:

Post by lostclimategames »

not bloom still but at least now it just looks a little more like antialiasing :)
___________________________
For all of your 3D/2D resource needs:
Image
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

No you should blur based on luminance, not everything at once! Right now you are lerping everything no matter how bright it is.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
jingquan
Posts: 222
Joined: Sun Aug 20, 2006 4:10 am
Contact:

Post by jingquan »

Check this out again. Bloom + tonemap.

my formular:

Code: Select all

float4 color = sharp * 0.6 + blur * (0.5 * luminance(blur));
texCoord -= 0.5;
float vignette = 1 - dot(texCoord, texCoord);
color *= pow( vignette, 1.0 );
color *= expo;
return pow(color, 1.05);
Image
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Does your RTT match the screen resolution? There appears to be some major aliasing...
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
jingquan
Posts: 222
Joined: Sun Aug 20, 2006 4:10 am
Contact:

Post by jingquan »

No, I used 1024x512 instead instead of 1024x768 so it'll take less memory.
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

It shows atrociously. Use 1024*1024. If you need memory that badly, bloom isn't for you anyway.
jingquan
Posts: 222
Joined: Sun Aug 20, 2006 4:10 am
Contact:

Post by jingquan »

Obviously, Irrlicht doesn't allow me to render at 1024x1024 when my testing resolution is at 1024x768. I could up it to suit my desktop's or tv's and use unlimited shader instructions, but that isn't widely supported by many people.

Oh well, maybe I should render at 1280x1024.

http://www.orandysoftware.com/user_file ... clarge.jpg
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

With OpenGL it should allow for that, the DX driver will get an update to make this possible, too. The patch is already available (if you want to try it, it's at the SF patch tracker). Will be in the next release.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Infact, the patch is only needed for creation of a bigger (Z buffer? I think), so in this case it is irrelevant as he needs the size to be the same as the device resolution, and there is already a backbuffer big enough for that. All he needs to do is remove the pow2 check from RTT texture creation in the DX9 drivers, its a 2 second procedure.

(Or you could just use OpenGL)
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
lostclimategames
Posts: 331
Joined: Sat Sep 02, 2006 4:11 am
Location: Michigan
Contact:

Post by lostclimategames »

what I dont understand is why you insist on bluring the whole thing, thats not how bloom works at all.
___________________________
For all of your 3D/2D resource needs:
Image
Saturn
Posts: 418
Joined: Mon Sep 25, 2006 5:58 pm

Post by Saturn »

Indeed. Don't blur the resulting image. Blur the (downscaled) luminance map before application to the final image. Single pass blur effects always look like this. Instead use a multipass technique with separate thresholded luminance map and image
jingquan
Posts: 222
Joined: Sun Aug 20, 2006 4:10 am
Contact:

Post by jingquan »

I would like to try the patch, but I'm using IrrCP. :(

Anyway, if this next one isn't bloom, then it's ugly bloom. I did bloom+blur+tonemap+highpass and downsampled to 512x512. I think the color bleed is a little too much. BTW, I'll work on calculating the scene luminance, realtime. Right now, too much of the bright areas are 'bloomed', and if I reduce it, the contrast isn't right.

http://www.orandysoftware.com/user_file ... _bloom.jpg

Thanks for your help.

EDIT*

A little tweak, and I didn't downsample anything.

http://www.orandysoftware.com/user_file ... om1024.jpg

Probably the best I think. EDIT** Not!
Last edited by jingquan on Wed Dec 19, 2007 10:51 am, edited 1 time in total.
jingquan
Posts: 222
Joined: Sun Aug 20, 2006 4:10 am
Contact:

Post by jingquan »

Yeah! Got the final bloom done. No more unnecessary blurring except at bright areas. I reduced the bloomed textures to 1/4 of my orginal for color bleeding.

Now I see unblurred images are alot nicer. I had them posting in my website (below). Check them out!

Now, I'll work on sampling the luminance for the brightpass.
lostclimategames
Posts: 331
Joined: Sat Sep 02, 2006 4:11 am
Location: Michigan
Contact:

Post by lostclimategames »

much better. :)
___________________________
For all of your 3D/2D resource needs:
Image
jingquan
Posts: 222
Joined: Sun Aug 20, 2006 4:10 am
Contact:

Post by jingquan »

:D :D :D

I know why my bloom looks ugly now. The texel alignments are all wrong, which the rtt texture will shift towards the lower right corner. I've a luminance sample to adjust the brightness. Not yet HDR but it's getting close. Here's two screendumps, the first looking from a dark area will have any lightsource brighter. Moving towards it will lower the luminance.

Image

Image

OK. I'm wondering how I can go about doing the eye adaption, which is just smoothing out the transition of brightening/darkening.

THanks.
Post Reply