How to make a sphere mask that masks out post process volume, fog and particles around player?

Hi!
I need Help!
I am totally new to UE4 and game development, I come from animated film background and have experience with 3d programs and rendering, and 2d compositing however I am having problem wrapping my head around some concepts in UE.
I am helping friends to achieve certain global look in their game for that I have used post process volume (using Gausian DOF), combined with ExponentialHeightFog (that fades out near camera) and some particles flying around. The game is co-op almost top down, and when two players walk away from each other camera moves backwards to keep them on screen and players get engulfed in these effects too much. I would like to make a spherical mask with soft falloff around players that would eliminate or attenuate this three combined effects.
The problem is not that simple because these three effects are all of completely different kinds and need multiple node setups/blueprints to work; basically after a week of trying very hard and learning new things along the way I am stuck…
1.
I found this:

I got this black and white image but failed to compose it with the post process volume in a useful way, that is so the sphere-masks-out the DOF effect. I am not sure if “ScreenTexture:PostProcessInput0” node I use to composite in with this setup (to blend it with PPV) is with or without PPV effects. It would help if there were some blending modes for blending PPV with PP Materials, or even better it would be great if PPV settings (DOF, tint etc.) were part of PP Material node system… but they are not and that is where my brain starts to hurt.
2.
I found these two tutorials hoping I could maybe use this technique to mask out the particles:- YouTube all kind of fell apart for me… (not working as shown, must be my bad I am sure) Is this the right track for masking the visibility of particles around the player?
3.
I also found this:
How can I control a Post Processing Volume through Blueprints? - Rendering - Unreal Engine Forums
All the settings for post process volume can obviously be found in blueprints, however i don’t get it where or how do I plug in a material that would act as a mask.

A programmer friend would get me the player position coordinates so for now I would at least like to make this masking (clearing) effect for all three components I use, centered on some arbitrary point in space.

I kind of wrapped my head around materials, and you can make post process material, however, post process settings available directly on post process volume (like DOF, tint etc.) are not defined through material. I understand that PPV and PostProcess Materials can be blended in the PPV blendables option but as I said before… it hurts my brain… And I still need to mask out the “ExponentialHeightFog” which also does not use material node system (or am I wrong?) And to mask out particles…

Please help!

Am I going in right direction?
Is there a more elegant and simple way to do it? Or do I need to delve in level blueprints, actor blueprints, PPV and PP Material blending, and material nodes even deeper?

Thank you so much for your help!

Nikola

Masking the Particles and Post-Process with a SphereMask would be pretty simple, you could just use a material parameter collection to feed the player’s location into something that you could then place into all the necessary material networks to do the masking effect. You’d just need to build the mask into all the necessary materials. The Height Fog? That’s out of my current level of expertise.

Thanks!
However I am still confused how to mask PPV, you say it is simple. How would you do it? PPV does not have its material graph accessible, I’ve seen in manual that it has its own node graph but it is not the part of material system. Or am I wrong?

Anyone else has some ideas too?

You can add Materials to a PPV as a ‘Blendable’ (it’s in the settings, just scroll down towards the bottom).

In terms of masking / altering the PPV effects themselves based on a Sphere mask, you would have to do that via Blueprint. The effects done in Post-Process Volumes are not applied by materials the same way they used to be, they now have much faster code-based implementations. However, you can still add materials to the Post-Process volume for screen-based material effects, and mask those via the same Collection Parameters if you need to!

Hi TheJamsh! And Thanks

I am aware of this, as stated before, but this does not help with masking PP effects if i got you right?

How? With “break” and “set post process effects” nodes in level blueprint? like in No.3 i found? but what should i plug in the path of let say DOF connection in level blueprint so the DOF effect gets attenuated only in one region. how do I plug in the mask result into level blueprint?

As I said. I managed to make a PP material that looks like a black and white alpha channel mask of the scene (it is aware of the geometry in the scene) as in the No.1, how to now blend that in the PPV blendables so it masks out the PP effects from the PPV settings stack. Everyone is talking about it for granted, but the actual solution and logic escapes me completely. For instance No.1 says it is then easy " to Lerp between the original scene color and a post process effect of your choice" but how? where? how do I get the original scene color, and how do I get Scene with DOF effect? where do i do the actual node setup for that?

Sorry, I’m completely noob to UE4 and game developement in general, my video compositing experience ended up being two sided sword I know what I want and know how I would do it but it does not help in context of UE4 logic and it is so frustrating :smiley:

Thanks in advance!

Ahhh it sounds like what you really want in this case (and would also be easier) are just multiple post-process volumes, and as you move into them the effects will automatically blend (which you can also tune / time as you want).

No, not really :frowning:
Imagine a landscape scene (with static camera for this example) rendered with post process effects (dof and noise in this case), and also with fog, an then some dust in it… now imagine there are two playable characters in that scene, one is close to camera and is less affected by these effects, and all is fine with him, the other however went further away from the camera, and now all this effects start to get in way, he is out of focus and covered with dust particles an what not, that’s why I would like to remove these effects AROUND this other player with a spherical mask, and leave the rest of the scene untouched.

In the end it seems futile, as there does not seem to be a way to mask fog for example I kind of dropped the idea as it ended up being practically unreachable. or?