User Tag List

Results 1 to 11 of 11

Thread: Radar/Sonar Pulse Post Processing Material

  1. #1
    0

    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:
    Name:  SCREENSHOT.jpg
Views: 4300
Size:  800.7 KB
    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.
    Cheers!

  2. #2
    0
    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.

    Name:  sonarpp0294ubq.png
Views: 4058
Size:  250.6 KB

    http://www.pasteall.org/55080/c
    3.14159265359

  3. #3
    0
    Quote Originally Posted by mAlkAv!An View Post
    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.

    Name:  sonarpp0294ubq.png
Views: 4058
Size:  250.6 KB

    http://www.pasteall.org/55080/c
    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?

  4. #4
    0
    Promoter

    Join Date
    Mar 2014
    Posts
    191
    you can paste that code into your material editor and it will construct that material network for you

  5. #5
    0
    Alright. Thanks!

  6. #6
    0
    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.

  7. #7
    0
    Just stumbled upon this thread and thought I would show another method for achieving such a result.

    Scan Material Features:

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




    Scan Function:
    Code:
    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:
    Code:
    float res = 80.0;
    float2 inUV = Texture_Coordinate;
    float2 comUV = ((floor(inUV*(floor(res))))/(floor(res)));
    
    return comUV;
    I hope this is useful

    -Jeremy-

  8. #8
    0
    Unreal Engine Support
    Join Date
    Apr 2014
    Posts
    2,427
    @JBaldwin

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

    https://forums.unrealengine.com/showthread.php?63241-Dynamic-Scan-Post-Process-FX-Radar-Pulse

    It's just too cool of a setup not to share there as well.
    Tim Hobson | Learning Resources | Epic Games
    UE4 Documentation
    Wiki Troubleshooting Guides: Lighting | Swarm Agent | Destructibles |
    _____________________________________________
    Follow me on Twitter @TimHobsonUE4 | My Personal Website
    Photons Be Free: Mini-Tutorials and other Curiosities

  9. #9
    0
    No problem, feel free to post it wherever it has a chance to be a help

    -Jeremy-

  10. #10
    0
    thank you so much

  11. #11
    0
    Samaritan
    Join Date
    Aug 2016
    Posts
    120
    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..
    Last edited by RE-Games; 10-02-2016 at 12:22 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •