Post Process Sonar Pulse Material

Hi,

I’ve been plugging away at this for a good while and haven’t really gotten anywhere. Maybe someone on here will have more ideas about how to properly set this up than I will.

Sonar Pulse Post Process

I found a tutorial on Youtube for UDK to setup a Radar which had a similar pulse type effect. (Video here) but I couldn’t get it to do it properly. I could get the pulse circle somewhat but I couldn’t get it to work with the post process at all.

The poster of the sonar pulse said they used a input vector for the pulse position origin then used the distance between that and absolute world position as a coordinate input for a panner that pans the gradient.

The main part is using a radial gradient and a fresnel effect.

;;sigh;;

I really wish I knew what some of this meant. I’m still learning a lot with materials, but if anyone can help I would thank you so much!

I’ve put together this material which should get you started to implement a circle impulse. For this example I’m using the camera position as the point of origin.

Thank you!!! This is just what I needed! +1 to you sir!

Any work on getting the pp shader from the vine you posted to work?

Hi, check out this thread for a different material setup which looks more like the reference video: Radar/Sonar Pulse Post Processing Material - Rendering - Epic Developer Community Forums

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:

-Jeremy-

thank you so much

Sorry for digging out this old thread but has anyone tried JBaldwins way lately. I had it working in another project, but I cant get it to work now… My world just stays black if I add this post process to the blendables. No growing pulse at all. Any idea or someone who can test it quickly?

I created a copy paste of the material here: http://pastebin.com/tEjwgsge (I removed all of the pixelate logic since that is just optional)
Just set your material to postprocess and the blendable location to “before tonemapping”. That’s how he is doing it in the video, but it is not working for me. :frowning:

I got the same issue. Did you find a solution ever?

Me too. Can anyone help? @JBaldwin?

Sorry for bumping but has anyone found a solution? Black screen issue here also.

Yes in the emissive color, move the node that goes from B multiplier off the alpha, and set a value.

Normals don’t look right to me (maybeeeee thats why?), this is the first blendable i’ve played with so not too sure how to fix that…
Have a play around, maybe you will have more luck! :slight_smile:

Thanks for sharing guys <3

Thank you so much. Everything is working!

May I kindly ask someone to upload a project where this is implemented? I am trying all night to get this to work and when I paste the code in the material editor and use the PP effect as outlined here and in other threads I obtain no results, any help at all would be greatly appreciated :slight_smile:

Hey, I know this is late, i only found this thread today…but I have been looking into a similar effect for work I am doing.
Decided to put it into a demo project for ya.
This is just the 3rd person demo project, with a post process volume with the effect.

https://drive.google.com/open?id=1Ge…dFFKUobXRW-9Zw

not sure if anyone would be interested but I made Jeremy’s material just with nodes, not sure if it is the most efficient way of doing it but my version of the editor kept crashing with custom nodes. And as I didn’t see any loops inside the code I didn’t see any reason to NOT doing it with nodes. Kind of a mind exercise :slight_smile:
I also added some static video line on the screen.
Hope someone find this useful.
UE4_ScanLineDepth.jpg

Here is my 2021 UE4.26 Blueprint only - Post process material method.
Sonar Vision

Hope it helps! it works perfectly as I expected so far.