Animated Radar effect in blender - TUTORIAL

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone and welcome simon 3d here today's video may be a little bit different than the previous ones because youtube statistics tells me that you don't really enjoy the longer format a lot of you just turns it off in the middle so i guess it's boring for you so i guess i will try to condense the content into smaller bits but maybe more interesting and i also won't go so much into details about certain nodes and techniques that i'm using but rather just show you how it's done but of course if you have another opinion then let me know in the comments i would love to hear some feedback from you guys and also don't forget to subscribe because youtube also tells me that most of the people watching my videos are not the subscribers and that's basically the easiest way to stay up to date with whenever i upload new videos and you can be the first one to watch it so i'd really appreciate it you know red button notification bell you know what to do all right but today we're gonna make this radar effect in blender the entire effect is just a simple plane with a shader on it so now let's find out how it's done first let's start with a empty scene in blender and add a mesh cylinder now let's go into edit mode select only the top face and then delete everything else because we will need just the top as the screen for our radar now we can also add more subdivisions to it because as you can see it's pretty low resolution so we can just add a subdivision surface go maybe one step higher and then apply this and with nice smooth circle we can already drag in a new viewport and switch it to the shader editor now let's get rid of this one simply click n and as you may know from the previous tutorials make sure that you have a node wrangler enabled in your add-ons because it's gonna make our job so much easier so now we can create new materials simply click new give it a name [Music] and delete the principle bsdf we're not gonna use it and now let's add a emission transparency transparent vsdf and a mix shader make sure that the transparent psdf is on top and the emission is on the bottom the factor we will create later now this effect consists of few elements laid on top of each other so let's break it down into smaller bits so that it's easier to understand for everyone first let's start with that rotating part of the radar for that we will need a gradient texture now with the node selected click ctrl t get the mapping and texture coordinate node and make sure that the texture coordinate is plugged in the object in the gradient texture change it from linear to radial and now in this viewport let's switch to the rendered view and as you can see it's black because the material is not plugged in yet let's preview what our gradient texture looks like simply click on the node hold down ctrl shift and left mouse button to preview the node now let's add a math node and plug it right after the gradient texture and switch from add to power now by changing the exponent value we can change the falloff of our gradient so let's put it to something like maybe 60 or maybe something smaller maybe 30. this is gonna act as the mask that will show us the dots on our radar and as the mask goes from white to black those dots will also fade away so this doesn't have to be too sharp but rather smooth and gradual and now to make it rotate we simply have to add a driver to the rotation z and now as the animation will progress this radar will simply rotate around so let's create a value and then a combine x y z now plug this value to z and then combine x y z to rotation the reason why we're using the value to drive the rotation of the z axis of our radar is simply because in order to make those dots change their position every full circle like in real life radar we have to sync this rotation with the seat value of our dots it may not make sense now but i promise you you will see what i mean in just a second so now that we have the mask for our dots let's create the dots itself this will be simple voronoi texture and again click ctrl t to get the mapping and texture coordinate node plug in the object change the warning texture from 3d to 4d so that we have the seed value exposed now let's add a color ramp as well plug in the distance and let's preview the color ramp as well ctrl shift left mouse button here let's change the interpolation of our color ramp from linear to constant and bring down the white value all the way down let's switch the places with the white and black and make it look something like this as you can see that we have some dots and as we change the seed value the position of the dots changes as well now if you want bigger dot smaller dots you can simply change the scale of the voronoi texture as well as black slider on the color ramp so you can adjust it however you want i will leave the scale at 10 and the color ramp on something like this now let's get into this value node that's gonna drive the rotation of our radar and here if we type in simply hashtag frame then we would probably expect that every single frame the value is going to change so for example if the animation is at the 30th frame the value is 30 which means that the rotation if you look at it is gonna be a 30 degree right sadly that's not the case because if we preview the result of our mask and then we play the animation then you can see that the spinning is so much faster than the value that's being plugged into our rotation and that is simply because the value here is not being converted to degrees but it is expressed in radians and what is radians and degrees and what's the difference and the relation to each other i will leave it to your own curiosity if you want you can read about it on google i'm not gonna get into details how it works what you have to know is that there is a two pi radians in the full circle so we have to adjust the value that's coming from the frame and we have to multiply it let's open the brackets pi three point fourteen fifteen the more numbers you put there the more accurate the measurement will be but this is just fine just 314 would be fine as well divided by 180 close the bracket and now if we play the animation then you can see that the number of frame now corresponds roughly to the angle of our radar one thing you may notice is that it moves in the wrong direction right now so in front of the expression let's just put minus and now if you want to make it faster at the end of the expression simply add a multiply and then how many times faster you want it to go so let's say five alternatively you can delete that times 5 and simply add a math note right after the value with a multiply function and then you can see it better when you change the second value of the multiply node then the radar moves faster now one thing we can do to make it look smoother is go to the render settings and change the frame rate from 24 fps to 30 or even 60 if you want like the butter smoothing but i personally prefer 30. as you know human eye can't see past 24 frames per second anyway right so with this done let's move this aside because we will use it for our dots as well let's tidy it up a little bit let's move those with down this little bit back and now we want this value to correspond with the seed value but if we simply connect it and then preview it then you can see that the dots are being changed way too fast and that is because the value is being changed every frame and we want this to be changed only every full circle so for that we will need another math node right before the forum texture and change the mode from multiply to snap and simply change it to 2 times pi as i mentioned before that is the full circle and actually we can go to this original value and change the 314 to simple pi as well so that we get quite accurate measurement and now in order to visualize what we just did we have to combine the dots and our mask so let's move this aside and get another math node change it from odd to multiply connect this color ramp coming from the voronoi texture and also the radar mask and now let's preview the output and if we click play now it's moving a little bit too fast so let's turn down this multiply to something like three maybe you can see that the dots are being uncovered as the mask progresses and on the full circle the seed of the dots changes now this is just masked dots but let's add on top of that the visual representation of the radar turning so for that we can simply duplicate this math note power put it above and connect the gradient texture again now let's preview how it looks like and make it a little bit tighter maybe something like 100 and lay that on top of our existing effect using another math note this time it's not going to be multiply but add so that our dots are gonna have the extra oomph when they will be discovered by the radar now we can preview the add and if you play the animation you can see that the base of our effect is already here now let's make the animation bit longer so that it doesn't cut in the middle as you can see on the full circle the pattern of the dots changes now we can already give it some transparency and colors before we start working on the background grid so simply plug the add output into the mix shader factor and add another math node after the add change it to multiply plug it in and the output of the multiply let's plug to emission strings now what it will do is it's gonna let us control the color of our effect in this emission node and the strength of the emission we can control in this multiply node now two things we have to do before we preview our material is go to the material properties and make sure that the blend mode is set to alpha blend and shadow mode you can put to none and another thing is in the scene tab make sure that the bloom is checked now if we change the emission color to let's say green and increase our multiply value you can get a nice glow effect maybe something like 10. now one small adjustment we can make as well is to make the rotating radar not as bright so that the dots are gonna be the things that pop out more simply go to the gradient texture and after the second power that we created which is actually the tail you can see the whether it's the right one simply by changing the power put in another math node and change it to multiply and put it to some small value something like 0.4 maybe so that our rotating radar is not gonna give us so much bloom but it will let the dots pop a bit more and in order to emphasize this effect even more let's go to this color ramp from the voronoi texture click on the white value and now in this color picker change the value from 1 to something like 5 and as you can see the dots while being uncovered pop so much more and it gives off so much better result now before we move on to the grid i recommend you put some frames around the nodes just to know what they do in the future so simply select this power and multiply then hit ctrl j to create a frame click n and in this label give it a descriptive name so that later when you come back you know what these notes do so in this case it's a line tail and string now let's add a frame to another power this one was mask for uncovering the dots here those three nodes snap on a texture and color ramp ctrl j this is our dots on the screen and this value node and multiply is the map for driving the rotation okay so with this nice and neat graph we can move on to the next part the grid is very simple and it's gonna use the same texture coordinates and mapping as the dots on the screen we will need another voronoi texture and a color ramp again change the interpolation from linear to constant and plug in the mapping nodes to the voronoi texture change the type from euclidean to kebichev chebychev something like that not sure about the pronunciation and let's preview that color ramp as well bring in this white value and bring this randomness from one to zero as you can see it gives us this very regular grid the thickness is controlled by the color ramp and then the size of the grid is controlled by the scale in the voronoi texture so set it to something a little bit smaller maybe like six okay now again select those two nodes ctrl j and name the frame this is a background grid and in order to add it to our effect another math node we can leave it at add let's make a little bit more space for merging our mask and put this ad right at the end here and you can simply hold down control and take this connections and just plug it in here and connect this add to that one and this will lay one on top of the other giving us this nice result when we preview our mix shader you can see that the grid is now a little bit too intense and that's what we will take care of now so in order to emphasize the pulse setting of the radar we can also make the grid pulsate as well and change its opacity at the edges so that it's not just a harsh cutout and for that we will need another gradient texture again ctrl t get the mapping and texture coordinate change the coordinate from object add a value node that will connect to scale and switch the gradient texture from linear to spherical now if we preview this gradient texture you can see that we have a nice gradient that's brighter in the middle and then gets darker to visualize it better you can play with the value node that controls our scale now we can get even finer control over the gradient by adding a math note change the type from add to power and the x but end will let us control this this falloff so that we can make it pulsate whenever the radar makes the full circle so in order to do that we will need that value that's being calculated right here so let's move it down here just so that we can see it better and now let's add another method change it from add to modulo connect this value in here the module goes into the power exponent and change the modulo value into two times pi now if we zoom out you can see that the values are extreme but this is because it goes from bright to even brighter but we want this to go from bright to dark so after the modular let's add another math node change it to multiply and the value simply put -1 now let's incorporate that into our effect and then connect the background grid with the mask that we just created simply you add another math node a lot of math notes today but you can also use mix rgb it works just as well now let's connect this background grid color and our mask let's actually give it names as well so this module and multiply ctrl j this is what makes our grid to blink so let's just simply name it blinking grid and this part on the bottom this is the grid falloff and now let's get back to our math node let's change it from odd to multiply and again as we did before let's hold ctrl and take this connections from our background grid and connect it at the end of the multiply and then the color ramp again goes into the multiply now we can preview our mix shader and as you can see as the full circle is completed the grid gets brighter and then it falls off into being invisible again you can control how fast this grid disappears with this value that's being plugged into the scale so something like 0.3 makes this grid visible for much longer so that is it for the whole effect now you should have a graph that looks something like this with nice frames and names so that you can adjust all of those values for your liking and yeah congratulations if you made it this far if you did comment capital r in the comments so that i know how many of you actually watch it till the end and as always if you don't feel like following the tutorial or something is not clear you can get the blend file that you've seen in the intro on my gumroad for free link for that in the description and as always if you manage to make something please let me know you can tag me on twitter link to that in the description as well any requests for future tutorials leave it in the comments as well and i'll see you in the next one bye bye
Info
Channel: Simon 3D
Views: 11,894
Rating: undefined out of 5
Keywords: radar, shader, blender, tutorial, animated, effect, stylized
Id: 0QlCYOKs18o
Channel Id: undefined
Length: 16min 47sec (1007 seconds)
Published: Sun Dec 12 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.