Hi,
Simple question - how to make a anamorphic lens flare? Any HLSL/GLSL tutorial or theory?
Regards,
MK
Anamorphic lens flare
hm im not sure about this, but as far as i know , its still done the old fashioned way, i.e. by drawing quads (sprites).
you might want to check out this pdf. havent read it myself yet, so im not sure if its any good, but the flares look cool
also i think the abstract mentioned a scalable quality/speed tradeoff.
let me know if its worth the read
you might want to check out this pdf. havent read it myself yet, so im not sure if its any good, but the flares look cool
also i think the abstract mentioned a scalable quality/speed tradeoff.
let me know if its worth the read
The DXSDK HDRLighting sample has a jumping-off point you may find interesting, there are 'cinema horizontal/vertical' bloom filters that provide a similar effect. In practice I think you'd want to enhance these with some extra, 'rounder' glare near the source of the flare, but that's really just a question of adjusting sample positions/weights for different blur passes. Depending on art needs, however, you may also have some luck with the billboard method Tasche suggests above, or even a hybrid method.
Disclaimer: I have no practical experience implementing this type of thing, so what I am about to say might be useless. If we have an image of the lens flare given a single very bright pixel, one could compute the lens flare for a whole HDR image by convolution. Convolution with an arbitrary image can be implemented using a 2D FFT transform, but I don't know if there is code to do that on a GPU that is fast enough that this would be practical.
Has anyone tried something like this before?
Has anyone tried something like this before?
Disclaimer: I have no practical experience implementing this type of thing, so what I am about to say might be useless. If we have an image of the lens flare given a single very bright pixel, one could compute the lens flare for a whole HDR image by convolution. Convolution with an arbitrary image can be implemented using a 2D FFT transform, but I don't know if there is code to do that on a GPU that is fast enough that this would be practical.
Has anyone tried something like this before?
Yes, and it definitely works.
You can do a 512x512 FFT in a fraction of a millisecond on a modern high-end GPU if you do it with a compute shader.
I made it by doing bright pass first and then blurring the outcome along the horizontal axis (x coordinate). Effect below (done with Oblivion Graphics Extender).
Can you elaborate more on the technique used? There isn't a ton of info on the web dealing with this!
Thanks,
-Jon
Thanks,
-Jon
It's not really that complicated...just create a downscaled buffer that's had a threshold or lower exposure applied to it (exactly as if you were going to do bloom), then blur only horizontally instead of both horizontally and vertically. Do it at a really low res with a wide kernel (or multiple passes) to get a really wide flare effect.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement