So Blurred glass material is impossible in Unreal Engine 4?

@EdWasHere: Great work, is this working also on mac? (sm4?) Any update about when are you going to release this?

@devel.bmad: thanks! And sorry for the late reply.
I didn’t test it on mac but there’s no reason it shouldn’t work.
I was pretty busy last weeks so i didn’t make any progress on this project. But now I’m working on it again.
Will I release it? I don’t know.
If I ever release it, users would need to download ue4 from Gitbuh and compile it themselves as you need to add code in source to make it work. I’m not sure a lot of people would be interested by this as it is not really “user friendly”.

Hello, could you please elaborate on how you got your post process material to work? When I tried to reproduce your graph (post #12), Unreal tells me that SceneColor lookups are only available when MaterialDomain = Surface. How did you manage to get yours to work with a Post Process material?

Many thanks.

Yes, you could use SceneColor in a postprocess material in UE 4.8 but since 4.9 it is not possible anymore.
Asking for this on these forums, it seems that there’s a workaround to be able to use it again, requiring to download UE4 from Github, modify a little bit of source code and compile.
See this post:

I didn’t already test it but it should work.

Alternatively, of course, you can use a scenecapture with a rendertarget set to LDR instead of the scenecolor node.

By the way:

They give some partial informations here:

http://forums.ronenbekerman.com/showthread.php?t=8488&page=4

The screenshot of their material is not big enough to clearly see the whole setup but it seems they use the same technique as in it’s blurring node (offsetting pixels several times and averaging them to blur).

Otherwise: new video

Tinted glasses blending their colors when seen one through the other.
With specular, shadows, refraction, reflections.
Postprocess material again.
Notice how the yellow glass refracts what’s behind, including the edges of the red glass itself (which doesn’t happen
if you simply put 2 refractives meshes in a level: what’s behind the glasses will be refracted twice but the shape of the second mesh won’t be refracted by the first as you could expect).

And now: let’s go for a mirror shader…

Mirror Shader, now.

Just discovered this thread. EdWasHere, very nicely done. I’m curious what your solution for the “SceneColor” no longer working on 4.10 to create a frosted glass. Without having to download from Github. Are you willing to share your most recent blueprint for frosted glass? So far I think your solution works well from what I have seen. I just can’t reproduce it from the error message on my SceneTexture:SceneColor.

I think you can’t do it anymore without dowloading source from Github and modifying source code.
But you can replace the scenecolor node by a render target set to LDR. In this case, you have to use a scenecapture2D actor.

EdWasHere,

Thanks for replying. Would you mind showing an example of the LDR method? I can setup a scenecapture2D, but Im not sure how to utilize this with the capture2D to make the glass blur. Perhaps a screenshot of your blueprint? Really appreciate it!

Simple example: see post 12. Instead of the scenetexture:scenecolor node, put your rendertarget by drag & drop from the content browser.
You’re welcome!

When using the Rendertarget I am getting an error in the “Add” node. I am assuming I need to convert the PostProcessInput0 to a float 3 type or the rendertarget to float4?

Yes, you need to add a componentmask node between PPInput0 and multiply, with only “A” checked. That should do the trick.

Ed,

Yes, that resolved the error message I was getting. But I think I am missing a step to get the Post Process Material to appear on my glass. Using the post process material causes my object to display in gray checker. As if I didn’t apply a material to it. I also tried created a Post Process Volume with the material added into the “Blendables” section of my Post Process Volume. This only caused my camera to be replaced with the SceneCapture2D when I walked into the Post Process Volume.

Am I missing a step to get this material to apply to my object?

With this setup, nothing is supposed to appear on your glass, it is supposed to blur a part of the screen once the postprocess material is added as blendable to a camera or a postprocess volume - see post 12 and image result.
For the rest, I don’t plan to make a tutorial about these glasses shaders.

Ok, added a regular glass shader to my window. But the Post Process Volume still only replaces my entire view with the ScreneCature2D camera’s results. Guess I’ll have to dig deeper. Thanks for the feedback!

Did you activate depth of field in your screencapture postprocess settings?

Yep. Here is a screenshot. Also the before and after effect of walking through the Volume:

07f19ab28929ef5059220a73503e7242259debca.jpeg

Before walking into the Post Processing Volume:

9b998e6244e79eac509436cdab04006e32df4667.jpeg

After walking into the Post Processing Volume:

efe54c622a5aec0b3c30989c73fd097687ef3010.jpeg

You have to check: focal distance, focal region, near transition, far transition (all set to 0), near blur, far blur (set to whatever >0).
Select Gaussian DOF to have a nice regular blur.
Check unbound too, so you don’t have to walk in to see the effect.
Set your postprocess material to “aftertonemapping”.
For the rest, I don’t know. It should work.
Something to dig, for sure.

There is pretty simple solution :slight_smile:
Do you know quick blur? It is when we first blurring vertically then horizontally or vice versa.
This can be easily done with visual material constructor.
This is how it looks like (Horizontal blur):


Same thing with vertical, just we modifying Y coord instead of X.
That better to be done in HLSL code with for loop, but I’am too lazy for that :slight_smile:
This is what I get with 4 iterations (falloff looks strange, cuz I just get some decreasing values without calculations):

Material is VERY cheap, it take less than 0.1 ms on GTX 750 Ti with resolution of this screenshot, and gets only 1 FPS to render at 54 FPS in FullHD.
It has 43 + 33 instructions and one texture sampler.
I should even say that it is possible to use depth, make this blur dependent on distance.
But it is really good question: How to use this blur behind HUD/UMG elements?