Radar/Sonar Pulse Post Processing Material

Hey there.
Now, I’ve been thinking about one effect since I’ve seen it in several games. And a few months ago, I saw a vine-video of exactly what I wanted, but I couldn’t find the creator and, since I’m not that good at materials, let alone Post Processing, I’ve been trying it out but giving up soon after for the last months. I just wanted to try to get it done before asking somewhere, but now I know I don’t have the slightest idea of what to do.
The video is this one: Sonar Pulse

So as one can easily see, the effect I’m trying to duplicate is that of a Sonar/Radar Pulse going through the whole map.
The thing I knew for a fact was that this could be achieved with a Post Processing Material, so I’ve been playing around with it. Just a few hours ago, while searching for something on Google, I found this thread where the Creator of the thread is asking the exact same thing. The guy that answered had made a material which, as he said, should get the creator of the thread started on making his own material.


This is the material the guy made. I figured I’d replicate that one to see how it works and how it looks.

Now, it already looks pretty cool, but it still isn’t quite what I wanted from it. Trying to change the material just caused it to not work anymore, which I obviously didn’t want, so I thought asking on the forums might help. Below, you can see how it looks for me:

Since it’s just a picture, I think it’s necessary to say that the blue circles that you see just get bigger gradually and infinitely.
The “infinitely” is one problem I see with it. I’d rather have it go for a certain distance and then fade out.
The other problem would be that, if you look at the “background” in the picture, even if it might be hard to see, you can see that it kind of gets weird with blue lines going all over the place. Also, it doesn’t quite look like the vine-video I linked.

So yeah, that’s how far I got with my researching and playing around on my own, so I figured I’d ask the people on this forum if they had any idea about how to do a proper sonar-pulse. I hope someone knows how to do it and can help me with it because I always loved that scanning-effect you see in several games and even movies and I wanted to replicate it.
Thanks in advance for any answers and I apologize for the (probably) bad formatting.

Hi there,
here’s another version of the Sonar PP which looks more like the effect from the video, using the fractions of the distance rather than sine/cosine this time.
Please note than you can significantly change the apperance/color curve by changing the ‘Curve’ and ‘Brightness’ parameters.

Oh, thanks! I’ll replicate that today. A question though. What’s the code from pasteall.org good for? I’m not a programmer and I can’t really understand what’s going on in there. Is it just the PP-Material in code or what is it?

you can paste that code into your material editor and it will construct that material network for you

Alright. Thanks!

Cool just what I have been looking for. I do have a question is it possible to add in a texture somewhere? So we don’t just get a color but also a pattern? Again thanks for this it’s really nice.

Just stumbled upon this thread and thought I would show another method for achieving such a result. :slight_smile:

Scan Material Features:

  1. Dynamic Animation Scaling
  2. Field Distance
  3. Ranged Animation Modified By Normalized Equations

Scan Function:

float iTime = Time_Input;
float tRate = Time_Rate;
float bValue = 0.0;
float3 normalizeCamPos = (0-Camera_Position);
float3 normalizeWorldPos = (0-ABSWorld_Position);
float distanceCalculation = (distance(normalizeCamPos*(0-(Radius/10000)), normalizeWorldPos*(0-(Radius/10000))));
float3 cFresnel = (clamp((dot(Camera_Vector, World_Normal)),0,1));
float3 invertFresnel = cFresnel.xyz = float3(1, 1, 1) - cFresnel.xyz;
float scanSync = (clamp((lerp(cFresnel, bValue, distanceCalculation)),0,1));
float3 manualScan = (clamp((((distance(normalizeCamPos, normalizeWorldPos))-100000)/10000),0,1));
float3 invertManualScan = manualScan.xyz = float3(-1, -1, -1) - manualScan.xyz;
float tVariable = (pow(((frac((iTime*(tRate*-1))+distanceCalculation))*invertManualScan),10));
float3 sColor = Scan_Color;
float clampMask = (clamp((tVariable*scanSync),0,1));
float3 finalScan = (lerp(bValue, sColor*invertFresnel, clampMask));

return finalScan;

In order to show World Normal Modification, I chose to implement a pixelation function. There was a video posted by Unreal already for creating this effect within the material browser using some nodes. I simply took the equation and translated it into HLSL.

Pixelation Function:

float res = 80.0;
float2 inUV = Texture_Coordinate;
float2 comUV = ((floor(inUV*(floor(res))))/(floor(res)));

return comUV;

**I hope this is useful **:slight_smile:




I hope you don’t mind, but I made a copy of your post here in Community Content, Tools, and Tutorials.

It’s just too cool of a setup not to share there as well. :slight_smile:

1 Like

No problem, feel free to post it wherever it has a chance to be a help :slight_smile:


1 Like

thank you so much

Anyone ever get the OP effect to work?
I notice there is an input to the shader called Normal_Vector which doesnt appear to be used.

Doesn’t quite work for me… I think the effect is not beginning at the camera…

Hey! It’s a great effect but how do I overlay it on top of the original scene I had (forgive me - I’m a bit of a noob). When I add it as a postpro material it replaces everything and the weighting is just on or off.
Basically - I set up the post pro for the scene and achieved a nice atmosphere. Adding this post pro material completely replaces this.
I would like to be able to activate that post pro material on a mouse click event for it to play once and the bright sonar effect is additive on top of the scene I have.

How can I remove the black regions? I just want the main color to stay?