Warning: actual devlog content (from
Unreal Engine forum devlog thread)
Hey, curiosity is eating me. It's about that really nice looking "vignette blur" post process shader (not sure if it has an official name). It certainly fits "dreamy" environments well, for example I remember that LIMBO had it too. So how did you made it? Any tips?
I know that there's custom "radial blur" post process material on these forums, and also you can mask gaussian depth of field in the Post Process Volume settings, but it's not really work that well.
Sorry for the belated reply, I've been meaning to describe the blur effect for a long time, and got sidetracked breaking things up, making toggles, etc to help portray the impact of the postprocessing.
I love the Limbo look -- no doubt it informed my aesthetic quite a lot though I hadn't really thought about it at the time. I think you're only asking about the peripheral blurring, not the peripheral darkening... but I'll mention both since the synergy of the two effects is important to the surreal look I'm going for. More consciously I'm aiming for something maybe akin to some of the Brothers Quay work, e.g. the video for Can't Go Wrong Without You:
Well, not exactly that, but I can't think of a better example offhand...
Peripheral darkening (traditional "vignette" effect)Implemented with the built-in postprocess volume effects. I have a global PPV with the following settings:
Scene Color -> Vignette Intensity: 0.85
Film -> Contrast: 0.75
Scene Color -> Scene Tint: any shade with a Value around 0.5
Importantly, the extreme contrast and dark overall tint significantly increase the impact of the vignette effect:
You can see in the video that there is a major blurring artifact along the right edge of the screen (more noticeable in some scenes than others): a blurred black band pulling inward from the edge. I've only noticed this since the changes in 4.9+, and don't have the technical prowess to track down and resolve the issue (thinking this is more to do with the way my mask is used in the postprocess material than the gaussian blur per se).
Peripheral blurring (dream-like toy lens effect)I used a PostProcess material to apply a gaussian blur using a texture mask. Thanks to the ingenuity of other devs much better at this stuff than me (thanks @EdWasHere!), this was simple enough in older versions of UE4 (but note the bottom of this post for a fix in 4.9+):
https://forums.unrealengine.com/showthread.php?70143-So-Blurred-glass-material-is-impossible-in-Unreal-Engine-4&p=293408&viewfull=1#post293408For anyone unfamiliar with the technique (or if the above thread doesn't make it clear), I essentially created a new material using a SceneColor lookup node to combine the rendered output with and without postprocess settings according to a texture mask:
Using a radial gradient texture mask (actual gradient is smoother than this appears) -- white passes through postprocess settings (gaussian blur in this case) that this material will be applied to, and black masks the postprocess (unblurred image):
Set the material domain to "Post Process":
Then create a new unbound PostProcess Volume in your scene, and add the material you just created to the list of Blendables:
Then configure any settings you want to be applied by the mask (in this case a very strong gaussian blur):
Major caveat: As of version 4.9, SceneColor lookups are no longer available in PostProcess materials (you'll get a material compile error if the material domain is set to "Post Process"). But again thanks to some clever trickery (thanks, @BlueSpud!) we can reenable it by commenting out the sections that throw the error in a single file of the UE4 source code:
https://forums.unrealengine.com/showthread.php?95982-Will-scenecolor-be-available-again-in-post-process-materials&p=447113&viewfull=1#post447113Note that the most recent source code version I've applied this change to is 4.12, so your mileage may vary if applying this to newer releases.
I read somewhere (sorry can't find link), the engine devs stated that this attempt to prevent SceneColor lookups for PostProcess materials was implemented for compatibility with some rendering refactoring in 4.9+ specifically for the console rendering path (which benefits console performance). However I have not experienced any issues with PC builds (again only as of 4.12), and performance impact is minimal in my use case.