Fog of War Post-Process Sphere Mask

Since Render Target is 2D, maybe you don’t need it?

Here’s what I came up with:

It’s based on the character position in the world, and it kind of creates a sphere around it. IDK, maybe it will help you?

You need to additionally create a parameter collection and set a parameter on Tick in your character class or wherever.

I have a problem concerning a fog of war system I was working on that uses a render target as a mask. The post-process material uses the “Absolute World Position” node to set the position of a render target in the world. This method works for the x and y coordinates, but it ignores the z axis. In essence, the material overlays a texture on the map, much like a decal (with stretching included). The harsh cutoff that this produces is extremely undesirable, and I would rather it be more spherical (more of a hemisphere or dome). Currently, the render target mask is a circle on the ground. Would it be possible to “place a dome” on top of it to create an effect similar to a sphere mask?

Top: The current effect produced by the post-process material.

Middle: The desired effect with a dome-like cutoff.

Bottom: The current post-process material itself.

Mine is not based on the position of the character. Multiple objects draw to the render target, so I need it to keep track of them. That’s also where it becomes more complicated; different objects draw different sized “circles” to the render target.