I'm having issues with the FOV on a screen aligned PostProcess Effect

Hi guys!

I want to create a screen aligned effect to hint the player what direction to go by creating a flare spawning on the destination location.

Much like Damage Indicators

But Instead of using a Widget I am opting for a Post process material to visualize a flare.

Before explaining my issue I will first show you what I already have going on in my PP material

  1. CameraPos to ObjectPos Vector transformed to CameraSpace
  2. Screen UVs converted into polar coordinates and offsetted by the vector we just created
  3. Flare texture
  4. Fade effect when camera vector points away from the CameraPos to ObjectPos Vector

Here you can see the effect in action.
As the camera turns away the flare UV takes the vector to offset the UV This way the flare will repostion itself on the screen so that now the player knows where to turn. As the player starts looking towards the object the uv offset is reduced and the flare will be back in the center of the screen.

As I increase the FOV, more distortion is being introduced, as you may tell when the flare position doesnt match the object.

Does any of you know what I’m doing wrong? All i want is a screen aligned flare that is offseted with the camera direction so that (0,0) in my UV matches the object but the camera FOV seems to break it.

2 Likes

I know this is an old topic, but maybe worth reviving as it’s a usecase potentially helpful for other people as well.

Couldn’t it be, that not (only) only the FOV is the problem but also, that you don’t take the ViewSize into account? By using [1, ViewSize.y / ViewSize.x] you should get a correct pixel ratio.

p.s. This might help: https://www.reddit.com/r/unrealengine/comments/hw5owb/help_figuring_out_the_horizontal_fov/

Hi simon, thanks for bringing it up :slightly_smiling_face: I was able to solve it but I forgot to post about it. Sadly I don’t have access to the project files anymore and meanwhile I am on my holiday, else I would have shared screen images about my solution. But anyways it is as you say, that’s indeed the direction you want to take for solving this problem and I appreciate you sharing your answer here! Cheers!

it is a very subtle effect, barely visible, it triggers each time when this Shama Llama guy respawns after you killed him. Not that great but I will try to share my solution if I find the time

1 Like