Post Process directional blur

Hi everyone,

I’ve been toying around with post process materials, trying to get an anamorphic lens flare working, similar to the more recent J.j.Abrahams movies and Destiny.

I was able to isolate the lights and play with luminance but now I need to be able to blur the image before I multiply it back onto the scene texture. Is there a way to do that?

Any help would be greatly appreciated.

Cheers

Hello NomadSoul2501,

You could use a post process volume and keep the bounds of the volume fixed around what you are attempting to render. This volume has all sort of settings, including the Lens Flare and Motion Blur effect you are talking about.

As for editing it as a post process material, this is possible and will just take a bit of research on how to do so. A bit of nudge in the right direction however, the engine processes motion blur by taking a low resolution image of the texture and applies that to the object when in motion. So essentially you would need to find a way to do this within the material editor to the textures you are viewing. I imagine this not being an easy process, but check out the forums to see if there is any additional information or others attempting to achieve your same look and feel.

https://forums.unrealengine.com/forumdisplay.php?33-Rendering

Thanks,

OMG, yes!!!
How did you do that?
Christmas miracle, lol

Are you looking for something like this?

I’ve modified the engine to give me an option to either use normal lens flares or the anamorphic version, although i’m not completely satisfied with the way i have implemented it (yeah i still lack an understanding of the underlying pipeline).

First i added another property to the PostProcessVolume, in the section lens flares. Now there’s a dropdown that lets you choose between Classic and Anamorphic. When Anamorphic is chosen, the entire classic lens flare code is skipped and i’m calling my own shader instead (which, i might add, is really a super simple HLSL shader).

Like i said, i still lack enough of an understanding how that stuff is tied together to implement this “properly”. Right now i’m literally at the “Christmas miracle” point, because i somehow got it to look EXACTLY how it’s supposed to look, and i’m trying to understand how and why i managed to get it to work.

Nevertheless, my engine version can now render Anamorphic LF, so i got that going for me, which is nice.

Once i have understood what the hell i’ve been doing there, i’m gonna try branching the 4.7 and implement that feature there in a cleaner way.

Here’s a few more pictures of different light scenarios and how the flare behaves.

This is when looking at a light object (just a tube with yellowish emissive material

This is a relatively dim emissive material, which still causes the effect when close enough with the camera

Looking straight into two strong emissive materials (white 20,20,20)

The side edge of the screen fades the flare as it should

The bottom edge of the screen fades the flare slightly differently, which i find looks quite nice

Since all of the flares are in post processing (as it should be imho), the effect shows for everything that’s bright enough on screen. So yeah, if i can make this into something distributable, that’d be nice. Right now, i don’t really have an idea of how to do it though :wink:

That looks really nice.
Will you submit it to github or try getting it onto the asset store?
I’ve seen enough posts similar to mine to know that you’d have a market :wink:

Well i think i’ll try to put this in Github. Not yet sure how to do this properly (i’m new to git and Github as well).

Looks great Lal.

Would really love to get my hands on this also. I’m making a small trailer that includes JBaldwin’s ‘FX Star Starter Kit’. A nice space… that Sun… and your lens flare… I’ll be makin’ moooovies. :slight_smile:

I just finished wiring some parameters into my anamorphic shader, and it works like a charm. Now the big question is how to get this out there…

Maybe there’s some patching support in TortoiseGit that lets me create something i can hand out for the time being. But ultimately i’ll try to do a pull request on the main repo, lets see if we can get this in there.

Wow, looks like i successfully made my very first pull request. Not sure if anyone using a fork of 4.7 can already get this now, but at least the request has been made. Lets see how this goes…

I think the pull request can be viewed here (if you have access): Github repo

Awesome, let me know when you want to make some noise about it :wink:
We can hit the Twitter feeds and the forums and rally some attention.

After a suggestion i reworked the code and made the effect part of the bloom post effect. It can now be fully customized in appearance (length, intensity, color, density). Pull request is now 732 at https://github.com/EpicGames/UnrealEngine/pull/732

Grats. Look forward to paying with it eventually.

Hey all,

i’m sorry that the whole thing kind of died, but i got preoccupied with a lot of other things that prevented me from continuing this project.

I like to have this effect in the engine however, so it would be good to find a way to have this as some sort of plug-in rather than having to modify the engine source itself (problematic as the engine source keeps changing of course).

If anyone has any experience in how to make this kind of thing as plug in, please don’t hesitate to give me a few pointers.