Announcement

Collapse
No announcement yet.

So Blurred glass material is impossible in Unreal Engine 4?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    In this last screenshot, it's noisy but noise is a part of this blurring effect. Like in this example:

    Click image for larger version

Name:	Blur_Noise.jpg
Views:	1
Size:	10.4 KB
ID:	1079559

    But you can tweak this to minimum noise. At least, no more noise than in gaussian DOF with grain=0 in post process settings.
    Last edited by EdWasHere; 06-08-2015, 06:54 PM.

    Leave a comment:


  • replied
    I'm looking forward to seeing video of it, curious how much noise you see.

    Leave a comment:


  • replied
    Ok, I go on experimenting and playing with this PostProcess Material.
    Here I try to get the effect of a white blurring glass, half-opaque and heavily blurring what's behind.

    Click image for larger version

Name:	Blur_WIP.jpg
Views:	1
Size:	127.9 KB
ID:	1079556

    When I'll stop playing, I'll post a video of a demo scene and, if someone is interested, I'll post my setup also.
    Last edited by EdWasHere; 06-08-2015, 05:30 PM.

    Leave a comment:


  • replied
    Ok, that's cool: now, I've got lightning reflections on my blurring panel.
    Looks even better, I think.

    Click image for larger version

Name:	WIP_2.jpg
Views:	1
Size:	78.1 KB
ID:	1079334


    Click image for larger version

Name:	WIP_3.jpg
Views:	1
Size:	101.5 KB
ID:	1079335
    Last edited by EdWasHere; 06-03-2015, 09:36 AM.

    Leave a comment:


  • replied
    Meanwhile, somewhere in outer space...

    Click image for larger version

Name:	WIP_1.jpg
Views:	1
Size:	687.4 KB
ID:	1079287

    So, I changed a lot of things in my postprocess material to get rid of all halos problems, for meshes and pawn, in any point of view in the scene. I don't use decal mask, etc... It was too complicated and so limited, as davision constructively mentionned it.
    With this new setup I can have a big gaussian blur in the glass panel (tweakable) while keeping subtle gaussian DOF.

    I still have to improve some things and then i'll post a video.
    Last edited by EdWasHere; 07-02-2015, 03:48 AM.

    Leave a comment:


  • replied
    In that image, it was masking the amount of blur by the distance from the object to the glass. You can easily disable that by leaving the depth mask at 1.

    But yes, this isn't nearly as fast or good as a "proper" hardware implemented blur. Some engine programmers actually suggested that more 'special case' functions like this be put into a separate content example or sample project rather than going straight into engine since the blur here is not a fully engine-level supported blur. Ie it could be slow and have sorting issues I am curious what you guys think since I don't think we decided one way or another for sure.

    The things that a 'proper' blur can do to be way faster include: creating halfres buffers at each step and then sampling from those. this step alone can be a huge 10X+ speed increase but its simply not possible with materials.
    It is possible to make the spiral blur a bit faster by getting 1 free blur by offsetting the initial scenetexture sample by half a pixel which uses the hardwares filtered lookup to get a 1 pixel blur for almost free.

    Leave a comment:


  • replied
    Yes but looking at the screenshot with this kind of rubik's cube and balls, it seems that everything is not blurred as you would expect e.g the same way: some parts (shadow on the right) seems more blurred that edges of the cube.
    Last edited by EdWasHere; 06-11-2015, 05:57 PM.

    Leave a comment:


  • replied
    Yeah it's the same thing it looks like, nice seeing how it's going to be intergrated though.

    Leave a comment:


  • replied
    Yes. Isn't it what RyanB already showed in this thread?

    Leave a comment:


  • replied
    Looks like there's going to be another option for blurred glass soon, Spiral Blur Scene Texture

    https://forums.unrealengine.com/show...view-5-29-2015

    Leave a comment:


  • replied
    The problem with your usage of masks is that you basically use up all the possible masks you can have just for your windows. So you can't have anymore masking in your game for instance for outlines and decal mask is meant for masking decals which you can't do anymore now.
    So you agree with what I said about limitations of this technique.

    I know it's not ideal. This is just experiments while I'm discovering UE4.
    However, I think a postprocess material is not the better way to achieve such effects. It would be better to use shaders. But, as already said, I don't know how to do it.
    Or it would be cool to be able to manipulate camera layers but it seems this feature is missing in UE4.

    The problem in your gif is that I see blur nowhere. The effect is cool but where's the blur? Must be a subtle effect.
    Last edited by EdWasHere; 05-25-2015, 12:31 PM.

    Leave a comment:


  • replied
    Originally posted by EdWasHere View Post
    @RyanB:

    To mask the character:
    1- I uncheck "Receive Decals" in his rendering settings
    2 - In the PostProcess Material, I use a "SceneTexture - DecalsMask" node, to get it's silhouette as a first mask.
    3 - I combine this mask with the one from "SceneTexture - CustomDepth" (which gives me the window silhouette). This way, I have a final mask and I use it to combine 2 renders of the Scene.
    a) The first from "SceneColor".
    b) The second from a Texture RenderTarget (I got rid of the "SceneTexture:PPInput0" node, as it gave me this undesired halo).
    In order to do that, I added a SceneCapture2D Actor in the scene and, in the level Blueprint, I put it every frame at the same location and rotation that the Camera Component of the character.
    In the SceneCapture2D settings, I activate Gaussian DOF and uncheck "Skeletal Meshes" flag, so that the character doesn't appear.
    I kept my PostProcess Volume in the level, even if I don't use PPInput0 anymore, as I need to attach my PProcess Material (blendable) to something.

    Here is my PPMat setup.

    [ATTACH=CONFIG]40851[/ATTACH]


    Some problems, though, with this setup:

    - Sky is not blurred. I think that's because I capture from a SceneCapture2D actor (what's wrong with this actor/skyspheres?) because I checked that if I use PPInput0 node, the sky is as blurry as the rest of the scene.
    - If I put translucent materials in the scene, they appear to be affected by depth of field in the TextureTarget and they shouldn't (is it a limitation of this actor? is it a bug?).
    - If I set "Capture Scene" settings to "Final" with "Capture every frame" checked, I get an almost black window, something really weird (???!!!). If I uncheck it, it works - but it's a problem as soon as the character doesn't move anymore.
    - Because I use the DecalsMask output, the mask isn't defined according to depth and positions of the actors relative to the window.

    For these reasons, I'm digging in an other direction, to get something more optimized, using depth calculations and getting rid of the DecalsMask output. Should be ready soon.


    @Davision:


    If you're using SceneColor, that's right, but if you use a second render from a second SceneCapture2D actor, then it seems you can still use some post FX effects. I'm experimenting with this now.
    By the way: are there sreenshots of your painting game? Is it a W.I.P?


    If you can define your mask with precision, you can apply the gaussian blur on anything in the screen. Here, I apply it to a plane only rendered in custom depth but you could apply it
    to any number of any meshes set up the same way.


    What do you mean by "animated screen masking"? If you mean a mask redefined every frame according to you needs, this setup already allows this, even if it has to be improved.
    That is quite a big workaround to get that working! You do all that stuff to get the character in front not affecting the blur of the window but what about other objects that are in front of it, like a wall?

    That is a interesting approach which SceneCapture to seperate it but for my painting game I like to have the blur in my post material and defined there, not for a specified object.
    Here is a gif of my game, I mainly use the final render DOF blur for blurring the paint near the edges on the side:

    The painting mask is basically done by using the translucent pass as a mask, which is quite the hack that then doesn't allow me to use any other translucency in the game. Custom masks would here be much better too. The problem with your usage of masks is that you basically use up all the possible masks you can have just for your windows. So you can't have anymore masking in your game for instance for outlines and decal mask is meant for masking decals which you can't do anymore now.
    With animated screen masking I just mean fading a blur in and making it more blurred on the edges of the screen and the like.

    I'm also already using CustomDepth and DecalMask for other things, here is recent gif: http://i.imgur.com/B4GU8rR.gif

    Leave a comment:


  • replied
    Would be also cool to use such blur effect for something like when you get hit or be underwater and screen masking could be animated
    What do you mean by "animated screen masking"? If you mean a mask redefined every frame according to you needs, this setup already allows this, even if it has to be improved.
    Last edited by EdWasHere; 07-02-2015, 04:23 AM.

    Leave a comment:


  • replied
    I did something similiar for my painting game, using the final render pass with DOF as blur and then using scene color for everything else. Obviously that is far from optimal because you can't use all those other post FX like Bloom and stuff.
    Is there any chance that we can get a seperate blur effect that we can maybe even apply to different things in the post processing material?
    Would be also cool to use such blur effect for something like when you get hit or be underwater and screen masking could be animated.
    If we would have access to custom masks it would make such things also easier, I made a thread about it here: https://forums.unrealengine.com/show...hp?70509-Masks

    Leave a comment:


  • replied
    How did you accomplish masking the actors from the DOF? you didn't have the sky masking problem before. That default engine sky is opaque which means there should be no issues picking it up in DOF.
    Last edited by RyanB; 05-24-2015, 12:15 PM.

    Leave a comment:

Working...
X