It’s my first post here. I’ve tried to find the answer online but had no luck. I don’t know much about blueprints and I need help with this problem:
For the third person character I’ve added PP Volume to change saturation and contrast when character inside. But this volume reacts to the camera overlap, not to the actual character. I know that I can create blueprint, add collision volume and make it parent for PP Component in order for it to react on overlap. But I have no idea how to make it react on character being inside the volume rather than camera. It just feels wrong because camera is behind the character and PP kicks in and out at the wrong time because of that. Can somebody help me to figure that out?
How to activate post process when character [not camera] overlaps volume?
@MizuhaMD PP is a camera thing, of course. But I think your two main options are:
Make the volume bigger or position it differently.
Have an infinte extent PP which you turn on and off in BP when the player hits certain areas.
The thing is - I have a round plate surrounded by fence pretty closely. The idea is to toggle Post Process ON when you standing within this plate. When player approaching plate from the road it sort of ok, but if you’ll turn to the side and walk towards the fence - character will leave the plate but camera will still be inside it. And this is breaking the idea because you see the character outside of the plate but PP is still ON. When I was trying to find a solution I found someone else’s question about underwater look PP. The guy asked how to bind PP to camera instead of a character and I need the exact opposite solution. To be more specific, I’d like to know how to activate\deactivate or blend weight Post Processing when chosen actor (like character capsule collision instead of a camera by default) is overlapping certain collision volume.
Many, Tons, Thousands of different ways to go about this.
How you do it would depend almost 100% on your current post process setup.
For starters. the Easiest possible way, is on the Level Blueprint
Follow these steps exactly.
Create a cylinder (or a copy of your mesh that’s a round plate) this will be your Volume. It will be used the same as a trigger.
In the properties you can select Hidden In Game to make it disappear.
Deselect Cast Shadow to prevent the shadow from drawing.
In the Collision section you need to check Enable Overlap Events, and set the collision type to Overlap All
Create a post process or take the one you have and check the Unbound checkbox.
Make your PP Disabled (uncheck enabled).
Open level BP, Drag into it the Post Process and the Cylinder or copy of the base mesh used as volume.
From the Cylinder/Mesh/Volume drag off and type Bind Overlap
You get 2 top entries, OnActorBeingOverlap and OnActorEndOvelrap. Create both nodes.
From the Overlap Nodes, drag off from the event pin, let go anywhere, expand Add Event, select Add Custom Event.
Create 2 events, One for the PP_OverlapStart and one for the PP_OverlapEnd
From eitehr PP_OverlapStart or end, drag off from OtherActor , type Cast, and select the name that matches your main character.
Grab the PP node you dragged in on step 3, drag off from it and type Set Enabled - select the Last Boolean you find. Hook it up after the Cast. Check the checkbox to enable it.
Duplicate the Boolean hook it up to event end’s cast, uncheck the checkbox to disable it.
Here is what the BP looks like:
The effect in action:
A screenshot of where the Cylinder is. PP Is near the cube so you know it’s not being overlapped.
If you create a custom PP material and assign it to the post process, you can actually hook up a Material Parameter Collection and lerp the value with a timeline to Enable/Disable the PP effect.
Just make sure that Enable/Disabled is delayed until after the TimeLine ends.
PP Material Example:
BP Code Update:
Now that’s an answer! To be honest I didn’t expect to get “sweet dreams” answer, that actually covers additional questions about gradual lerping. Many thanks!
As I said - I understand the logic more or less but I have small to none coding experience therefore I simply cannot come up with solutions even within blueprints. I tried to use level blueprint with capsule collision component and PP component as a child to establish boundaries but I would never have thought about casting, binding or anything that you explained so beautifully!
No worries. I needed to make it happen for my Ocean’s PP, so I prototyped it
Ok, great! Even if it was pretty complicated for me to follow this steps at few places I’ve managed to get this to work. Now I’m curious how to replicate blend radius effect from the regular PP Volume. Right now this fading starts as soon as you’ll overlap the volume but I’d rather want it to start blending as player approaches the plate, depending on the radius/distance. Like if I was half way towards my plate - PP would be at 50% blend. I wonder if it’s a matter of slight modification or it should be completely different approach?
For now I think I found a pretty good solution. I’m just using regular blueprint with capsule collision component and PP component and blending PP weight with a timeline when character overlapping it. That setup might be reused anywhere in the level multiple times which is pretty convenient: