Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] HDR effect without shaders

Author
Message
Mr Tank
21
Years of Service
User Offline
Joined: 25th Nov 2002
Location: United Kingdom
Posted: 3rd Sep 2007 01:06
Don't think this will work in DB(C) but i haven't tried it.

I tried using Evolved's HDR shader, but my computer failed to make it work for some reason.
Using a similar method, i have made something which hopefully achieves a similar effect using ghosted objects.
I have made quite a few different methods, and could not get it running on a single camera without getting bizarre artifacts. The following method is possibly the most efficient method, although it requires there be a part of your game world dedicated to showing camera 0 the picture camera 1 takes, which is quite inelegant. Apparently this is how the proper shader does it anyways, which is surprising- i'd expected it to just modeify each pixel colour individually. This kind of thing keeps me up nights.

Anyways. Here's the code. You'll need a texture, so i'll attatch a zip with the code, an exe and the media on the bottom (1.83Mb)



SUPER BADASS SPACESHIP X: WEBSITE
FORUM TOPIC

Attachments

Login to view attachments
da power pwnerer
18
Years of Service
User Offline
Joined: 28th Jul 2006
Location: Pittsburgh, PA
Posted: 14th Sep 2007 03:56
heh, thats pretty cool


http://Freewebs.com/noobisoft
Come to Noobisoft's website today!
DarkAuron
18
Years of Service
User Offline
Joined: 24th Sep 2006
Location:
Posted: 21st Oct 2007 11:24
That's a really nice effect. Though, for some reason if I try to use it in my project it makes everything green, which makes no sense at all. Theres no object interference either, as I changed object numbers to be dependant on my fluid object control (so that every object is uniquely named apart from each other).
Mr Tank
21
Years of Service
User Offline
Joined: 25th Nov 2002
Location: United Kingdom
Posted: 21st Oct 2007 17:42
Green eh? I seem to remember green stuff happening with ghosting way back when.. think it might have been when using 16 bit colour depth. What are you using in your project?

SUPER BADASS SPACESHIP X: WEBSITE
FORUM TOPIC
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 22nd Oct 2007 14:06
Any new cameras will have a green backdrop by default.

Also I haven't tested the code but I assume it just ghosts a render target in front of the camera's view which if anything is fake bloom, HDR requires multiple exposure levels does it not?

Mr Tank
21
Years of Service
User Offline
Joined: 25th Nov 2002
Location: United Kingdom
Posted: 22nd Oct 2007 16:39
It's not bloom- that's (i think) when the light bleeds a bit- not noticible on ordinary stuff, but very bright points have visible light areas around them. You could use this with blur to get bloom i guess.

To make a HDR picture with ordinary film, you can take multiple exposures, but that's i guess due to the nature of the film. You could do the same with an ordinary rendering engine. Alternately you could use a special camera or engine i guess.

Basically the aim of an HDR process is to map the brightness and colour of a scene into the pixel value displayed on the screen/ photo. Instead of having the brightness of the image go linearly with the scene brightness*, it goes sublinearly. The process with the ghosting achieves this.

It also gets a limited overexposure type effect- because normally (in DBP) you can't light anything past 100%- ie the texture will never get "whited out".

(* ignoring the sRGB thing that DBP or directx or whatever seems to ignore anyways)

SUPER BADASS SPACESHIP X: WEBSITE
FORUM TOPIC
RedFlames
17
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 27th Oct 2007 20:09
thats really cool

i played around with it a bit ,made it medialess and found an other cool effect: if you offset the limbs on Z-Axis it gives a cool glowing effect



downside of the effect: the texture gets less detailed (don't know if its just with the gradient,didnt test with texture)

Mr Tank
21
Years of Service
User Offline
Joined: 25th Nov 2002
Location: United Kingdom
Posted: 28th Oct 2007 03:28
Nice one. I set the glow variable to about 0.5 - with it set to 10 it's not really visible to me.

SUPER BADASS SPACESHIP X: WEBSITE
FORUM TOPIC

Login to post a reply

Server time is: 2024-11-22 13:34:32
Your offset time is: 2024-11-22 13:34:32