I’m attempting to create a motion-blur “type” effect for my game, that is constant and static. Basically, I want to be able to put a small PostProcessVolume in an area and have all the meshes in that volume be blurred during play.
Below you can see the post process material and what it does.
The problem is this material just makes the viewport blurred when the player camera is within the volume. I want it to instead blur any and all meshes and materials within the volume, regardless of where it is viewed from.
For reference, I’m trying to create a similar effect to the Black Mirror episode Eulogy where the people who moved during a photo are blurred in place:
Thank you for the quick response! Unfortunately as one user commented the pictures on that site are no longer working. Through some research I put together this which seems pretty much identical.
This makes a 1024 radius sphere at 0,0,0 that desaturates everything inside it. However, the problem still persists that it only works when the camera is inside the PostProcessVolume. I’ve been looking all over and still can’t find an answer on how to make the volume viewable from the outside.
It makes me think;
The location of the PPV has no impact on where the sphere is, so how would I change the coordinates to automatically match where the volume is in the world?
I’m not a programmer, but I assume I’d have to change the code for the blur to accept a world position no? Right now this is the code, but I’m not sure how I’d change it to accept Absolute World Position.
pp are only active when the camera is inside them afaik, so you can make it unbounded.
and then use something to mask the effect like you’ve done, and i think thats what ClockworkOcean suggested.
you can either use math like you’ve done, or you can also use a custom stencil. you could in theory drop a mesh that renders to custom depth stencil, and you then use that as a mask.
math is probably faster, but also could be harder to set up and adjust.
Thank you so much for the detailed help! I ended up getting it to work after a few hurdles. The Lerp was giving me errors with float3 vs float4 so I ended up just masking RGB for both the PostProcessInput0 and the Blur code which got it working!
I’m setting the location VectorParameterValue in the construction script but after drawing a debug sphere on the BP I’ve noticed the blur is actually offset.
You can see in this screenshot the difference in blur between the left and right of the sphere. The blur is being offset to the bottom right for some reason. I can’t for the life of me figure out what’s causing this?
Once again, thank you for saving me once again! I feel like I can always count on @ClockworkOcean
Hm, I must be doing something wrong. I initially thought it was the Blur code, but after going back to the desaturation I found that the volume seems to be offsetting based on the camera’s distance/angle, not code related.
Here’s screenshots of the components. Thank you for your patience and so sorry for taking up your time with these questions, I just don’t want to resort to going in circles with ai
No clue what the problem could be here and it’s making me crazy lol. I can only theorize that the problem might be coming from when the actor location is subtracted from the Absolute World Position, but I have no idea how to fix it.
Agh, no clue whats wrong. Going to try remaking it in a new project to test.
If you don’t mind sharing, how were you able to render a clean outline of the sphere volume in that clip? Is it just a visible collision sphere set to the same size of the sphere?
Once again thank you for all the help.
Update:
Well I recreated the exact setup you showed in the previous posts in a completely fresh 5.5 project and the issue remains. About to start pulling my hair out tbh.
The problem almost seems to be coming from the ScreenPosition?? You can see in this gif when the PPV is at the top left it’s centered on the root, but as I move it down-right it gets more and more offset.
The interesting thing about all this is that you don’t have the same problem. I can only imagine there is like a single check box I need to set that I’ve completely missed. I feel awful using up so much of your time on this so no worries if you can’t see a solution. Thank you.
I agree that ScreenUV might be a problem, but just for this testing case I’m not even using the custom node, only the desaturation method we’ve established that you can see in the overview video I posted.
I can only imagine the issue lies somewhere in the setting of the location in the MPC, or the AbsoluteWorldPosition node, despite how weird that would be. Either that or I’m doing something very wrong in the BP.
At this point I’m almost thinking it’s like a driver issue or something, even though that makes next to no sense. Trying to troubleshoot with AI just sends me in circles… (shocker!) I’m so sorry to keep asking for more, but is there any way you could share a few screenshots or just a quick overview of your material/BP? I’m still convinced there is a single innocuous setting I’ve neglected or something.
Dithered refraction is probably the most trivial way to do this, it works well enough for some things and has the added benefit of just being able to slap it on a particle.
Thanks for the screenshots! Our layouts were basically identical. Luckily I figured out the issue (or at least found a workaround)
I found this post from 2023 where a guy seemed to have a very similar problem. For some reason turning the Blendable Location of the material from ‘Scene Color After Tonemapping’ to ‘Scene Color Before DOF’ got it working properly.
I have very VERY little understanding of what blendable location is, so I’m not sure if this will have any unintended effects down the line. Regardless, it’s finally centered and I can die happy… Even though the problem was something completely different, thank you for all the help regardless!
Not at all. I checked the fresh project version and the blendable location is set by default to Scene Color After Tonemapping.
I’ve had some weird driver issues with Unreal in the past in terms of lighting, so even though it’s highly unlikely I feel like this could just be a hardware problem on my end. Hopefully I won’t run into any more issues like this…