I’m trying to create a post process volume to implement a scanning effect for third person character. I want the effect to originate from the character. My problem is that for some reason, even if I give the character as the locus for the sphere mask, it’s as if the mask starts from the Upper Left — and the offset isn’t consistent.
Here is a very simple post process material that illustrates my issue:
I tried the above as a material to the floor and it was perfectly under the character (as expected). But this is as if the center is LEFT and UP from the character (if it were centered around the characters head, that I could understand).
Is there anyway to get the effect centered on the character? (BTW, I have checked to assure that the actor’s position is being sent correct — notice that “HERE” on the character.
Getting the location as an event from the controller. That part appears to be working just fine (see the image above where I print “HERE” on the character).
One thing I’ve found is that the closer I move the camera boom to the pawn, the more centered it appears (which is difficult to see unless I LERP in ScanTexture:PostProcessingInput0).
This all leaves me with the uncomfortable feeling that it all has to do with camera positioning.
This is designed to be third-person… I have some ideas to “fix” the problem, but they involve a lot of hackery that doesn’t look pretty.
The idea is to have a nice radial scan like this… It looks really cool except that it is off-center. Other than that it is perfect (even lights up objects like that ramp).
Materials work, but the goal was to avoid putting this in every material in the world. I agree, it appears that the post process isn’t “in the world” (and as such camera angle is/isn’t taken into account). If you point the camera over the characters head, the position is over the same position of the screen (sorta).
Other than the messed up offset, the scanning effect is golden. But it’s supposed to originate from the character.
I suspect there is a solution, but has more to do with 3-D space to 2-D space and is a little over my head.
This is the route I’m going. It seems to work for what I need. It has some scaling issues that I need to work through, but this seems to be a more reasonable solution ATM.
I’d PREFER just showing the intersection with objects, but I’m not sure that will be very performant. A semi-transparent sphere will do what I need (although not what I want )
I’ll use the PP material to “light up” the necessary objects. There will be some offset still, but I don’t think it will be enough to matter. The objects tend to be relatively small and not a lot of people sit around to calculate “OMG, they’re off by a meter!"
Very curious. Would you mind zipping up your project so we an take a look?
The only difference I see is you setting the pawn position every tick — but that shouldn’t make any difference (in theory).
I’ll try a fresh dummy project and see if that makes a difference. But Clockwork Ocean also saw the issue so now I’m wondering what the differences are. I’m using 5.2 (not compiled from scratch).