I'm seeing stars...

Published March 06, 2006
Advertisement
Since asking about it the other day, I've been working on implementing a star filter into my dissertation's lens effects module. Based on the aforementioned thread, I've been using various resources for Kawase's Light Streak Filter.

I can't decide if my implementation is actually wrong, or if it just looks rubbish. What do you think:


Subtle star filter. You can just about see the blades, but they aren't very long.


Medium star filter. The blades are more pronounced, but the middle section is far too bright.


Crazy star filter! You can see the true length of the blades here, but the colour balance is just so wrong it's unusable.

For reference purposes, this is roughly what I'm hoping to achieve:



Kawase's Light Streak filter uses a slightly unintuitive set of sampling points across multiple passes (17 for the above images). It seems to make sense, but as shown by the last image, it samples a lot of pixels that don't actually contribute to the final image. The blades in the first image should by the same length as the 3rd image - but they're being attenuated out so as to disappear.

I think I'll just have to keep working on it - but given I now understand Kawase's approach I might just go and implement my own system...

Any thoughts?
Previous Entry Progress!!
0 likes 5 comments

Comments

Cypher19
It certainly looks fine to me. If anything, I'd blur the source image for the glare a bit more, and also darken the image used for the glare beyond what you had for the first shot.

Keep in mind though, your scene right now has a fairly small range of colours and you can easily get into >1 colour zones. If you throw in some specular highlights and balance the intensities a lot (e.g. I find that real life 'specular highlights' are up to two orders of magnitude brighter than diffuse reflections) I think you'll find that the effect will behave in a more visually appealing way. Also note that Kawase's blades attenuate just like yours do right now, so in that respect they are correct.
March 06, 2006 12:12 PM
evolutional
oooh pretty
March 06, 2006 12:54 PM
ApochPiQ
Something isn't summing contributions correctly. There shouldn't be any of those bright-white triangular regions outside the main geometry. Even if that's the edge of a "floor plane" (best guess I've got as to why they're there) the light shouldn't be highlighting those areas; they're basically black compared to the foreground, and the light-scatter filter should have the net effect of muting weaker background intensities, not highlighting them.

If I had to guess, I'd say something is missing an angle check. Perhaps the check between reflected light direction (assuming point light sources) and the camera direction is off?
March 06, 2006 04:02 PM
Telastyn
You mentioned that this sort of thing is a lens effect? What is it meant to model, or what sort of lens causes that sort of effect?

I get that sort of flaring with lights when out [driving] at night. It's hard to describe to people who don't seem to get the effect.
March 06, 2006 04:20 PM
Jason Z
I think there are two areas that coul help out here. It looks like you are implementing this on the entire color range of the image - not just the bright parts. Try to do a bright pass filter before you start doing the star filters.

The second thing I think you have to look into is how the 17 samples you mentioned are summing. After doing a bright pass filter, most of the image should be black, with a few bits of color here and there. When the 17 samples are taken in a line, use some type of gaussian weighting on the samples to make sure that the total weights for all 17 samples doesn't add up to more than 1.0.

It also looks like the staggered effect in the streaks is being caused by some type of sampling spacing error. Are you sure that the samples are approximately one pixel apart? Or are you trying a different width approach?
March 06, 2006 05:25 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement