Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Screen Space 'Psuedo' Lens Flare


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 johnchapman   Members   -  Reputation: 548

Like
3Likes
Like

Posted 09 March 2012 - 03:56 PM

After posting in a recent topic on lens flare, I revisited my quicky implementation and made some improvements which I've outlined in a wee tutorial here. The technique is based on MJP's old blog post about Killzone 2, plus some inspiration from BF3. Here's a video of it in action:

http://www.youtube.com/watch?v=w164K5nuak8

The main issue is that the 'features' generated are just copies of the bright spots as sampled from the source image, not a function of the lens aperture as they should be. I'm interested in any cunning ideas for overcoming this problem; until then it's best kept as a subtle addition to sprite-based effects.

Sponsor:

#2 MJP   Moderators   -  Reputation: 11620

Like
1Likes
Like

Posted 09 March 2012 - 05:18 PM

I'm interested in any cunning ideas for overcoming this problem;


Frequency space Posted Image

#3 Styves   Members   -  Reputation: 1056

Like
1Likes
Like

Posted 11 March 2012 - 04:45 AM

As far as making it look more flare-like, you can do what RTHDRIBL does and use a much stronger brightpass for the flare generation. This gives you sharper flares without that "inverted bloom" look that several games suffer from and avoids over-flaring of bright sources on the image. Pop some streaks on top and you've got yourself a really nice flare. Maybe give some random scaling to each flare element and a color, that can help too.

On the note of RTHDRIBL, maybe read Masaki Kawase's papers if you haven't already, AFAIK he's the father of this technique and has plenty of awesome reading material (some of them are in English, others only in Japanese, but you can just translate or look at the pictures to get an idea. :D) that may help to improve your results. IMO his demo is still the most impressive demo I've seen using this technique.

Of course none of this really solves the lens aperture issue but it'll still help make it look better. Posted Image

PS: If you can't view the links, pop them into Google translate and set source language to Japanese and target to English. Should work. Posted Image

#4 mancubit   Members   -  Reputation: 518

Like
0Likes
Like

Posted 12 March 2012 - 08:30 AM

thanks for sharing your technique - will give it a try in the near future :)

#5 johnchapman   Members   -  Reputation: 548

Like
0Likes
Like

Posted 12 March 2012 - 10:03 AM

@Styves
Kawase's results are really amazing, thanks for pointing me there. I'm thinking I should make friends with someone who can read Japanese, though Posted Image.

@MJP
I've seen some very cool-looking post processing in the frequency domain in 3DMark11 - Fourier transforms frighten me, though Posted Image. I suppose we're in the age of the compute shader, now, so I should buck my ideas up! Also, thanks for your blog; very interesting and informative Posted Image.

#6 MJP   Moderators   -  Reputation: 11620

Like
0Likes
Like

Posted 12 March 2012 - 01:16 PM

@MJP
I've seen some very cool-looking post processing in the frequency domain in 3DMark11 - Fourier transforms frighten me, though Posted Image. I suppose we're in the age of the compute shader, now, so I should buck my ideas up! Also, thanks for your blog; very interesting and informative Posted Image.


Yeah the Futuremark stuff is a good starting point, and if you do it right you can get some really cool results. If you're using DX11 there's actually a FFT helper class in D3DX that you can use, which will save you from having to implement the FFT compute shader yourself. Otherwise there are some Nvidia samples you can look at both for D3D and for Cuda. Either way you'll probably want to do some background reading on image processing in frequency space, which is actually a very common technique outside of real-time graphics.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS