Forum

Bloom hack fun

Discuss programming topics that involve the OpenGL API.

Moderator: InsideQC Admins

Bloom hack fun

Postby leileilol » Fri Oct 21, 2011 10:29 pm

So I coded this crappy effect yesterday. It's supposed to simulate lens flare but by abusing the bloom texture, though i'd really want to only have the flares and skyboxes rendered in it instead of everything
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Bloom hack fun

Postby mh » Fri Oct 21, 2011 11:10 pm

That's actually really neat. I always think bloom is overdone (when even bricks have bloom on them you know something is wrong) but this looks like it could evolve into something cool.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2289
Joined: Sat Jan 12, 2008 1:38 am

Re: Bloom hack fun

Postby Chip » Sat Oct 22, 2011 6:03 pm

Wow, that looks really cool and not at all crappy.

How did you do it? Changed the bloom plane angles and orientation?

I'm really interested in this because that's what I am working on, but I was doing it with tracelines and view-oriented sprites. That's crappy. Yours looks like it has real volume.
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays

Fear not the dark, but what the dark hides.
User avatar
Chip
 
Posts: 575
Joined: Wed Jan 21, 2009 9:12 am
Location: Dublin, Ireland

Re: Bloom hack fun

Postby leileilol » Sat Oct 22, 2011 9:28 pm

here it is so far - comments marked with LEILEI are where around my changes should be.

A bug currently is the aspect ratio inconsistency :(


it's a 'bag of tricks' effect:

- Take bloom texture
- Inverse coordinates
- Render it 16 more times with scaling offsets raised gradually
- Cross the rainbow gradually

It could be worked in a loop and maybe with more versatility. I calculated the colors by hand.
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Bloom hack fun

Postby toneddu2000 » Sun Oct 23, 2011 8:45 am

I think it's very good. When the player is outdoor, is great. In indoor IMO it should be disabled
toneddu2000
 
Posts: 1315
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Re: Bloom hack fun

Postby Chip » Sun Oct 23, 2011 1:11 pm

Thanks @leilei, let me see if I can integrate it in my engine. And maybe enhance it.
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays

Fear not the dark, but what the dark hides.
User avatar
Chip
 
Posts: 575
Joined: Wed Jan 21, 2009 9:12 am
Location: Dublin, Ireland

Re: Bloom hack fun

Postby qbism » Mon Oct 24, 2011 3:10 am

Suggest limit to looking-outside-through-window, looking-into-bright-light, looking-into-sun .... somehow. Maybe simple as checking current lightpoint.
IRL this effect occurs when viewer is in a dim room and suddenly looks into a bright light or outdoors.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: Bloom hack fun

Postby leileilol » Mon Oct 24, 2011 8:35 am

you mean like combine it with HDR!?

haha, hdr .......... that buzzword died so fast.
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Bloom hack fun

Postby qbism » Mon Oct 24, 2011 5:04 pm

HDR is same result as hardware gamma? I was always confused. HDR makes sense IRL with cheap digital cameras.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: Bloom hack fun

Postby Spike » Mon Oct 24, 2011 6:56 pm

hdr is to make bright stuff dark and dark stuff bright.
or something.

you could just update lightstyle values based upon which room you're in, note that you'll want some overbrighting stuff... the eye adjusts to different light levels over time anyway so map-based triggers could do it without any real issue.
Spike
 
Posts: 2883
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Bloom hack fun

Postby mh » Mon Oct 24, 2011 7:17 pm

You could probably R_LightPoint the weapon model early in the frame (before drawing the world) and use that value. Might be some weirdness if you're standing in a dark spot in an otherwise bright room (or vice-versa) but otherwise it should work. You'd probably need to coarsen the scale a little so that you're not updating lightmaps every frame for miniscule/unnoticeable changes too (an alternative might be to pass a lightscaling value to your shader as a uniform, but of course you need shaders for that...) - and don't forget to be consistent and apply it to MDLs as well as brushes...

It's worth noting by the way that Rage does this (also blending in different colours and bloom levels). The first time you see it, it looks AWESOME, but after a short while (say, 5 seconds) it just becomes a pain in the ass and you wish there was a way of turning it off.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2289
Joined: Sat Jan 12, 2008 1:38 am


Return to OpenGL Programming

Who is online

Users browsing this forum: No registered users and 1 guest