Unreal Engine 5 - Police Emergency Lightbar - Part 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello hello everyone today we're gonna see how to use this police car that is totally free and we're gonna Implement some flashing lights so we have the red and blue like a real police car so let's jump right into it now we need to get this police vehicle into our project so we're gonna go to the Epic Marketplace and we're gonna search for the city sample vehicles and you get all those vehicles from this pack that is totally free it was the pack that was used for the Matrix demo a couple of months ago and for what concerned this video uh we're gonna use the police vehicle that is right there so when it's downloaded I'll see you back in the project so now the project with all the Shader compiles that probably took forever because the pack has a lot of shaders so what we need to do from here when we have the police call already and that you restart your project because when you have the shaders and you have to you're gonna have to add some plugins here uh you just accept those plugins obviously and you restart your project and now all the colors of your place call will work correctly so from here we have to do materials that's gonna control the lights on the vehicle itself so let's do this now so we're going to create a material so M underscore police and I'm just going to open that so the default setting here all good so what we have to do here we have to create a logic that will make this material flashing red and blue okay so we're going to take time here and from time we're going to search for multiplier and in the multiplier I'm going to put 1.1.75 and apparently there's a calculation here um I I found a number but I'm I don't understand the logic behind this calculation but apparently it's something around that with the sin uh uh it's like 1.57 for a quarter of the circle or something like this I'm not too sure so I can't really uh tell too much about it I don't want to say anything that is not correct so we're just going to leave it as is and we're gonna put this number up there on the Sim number here you can put a number between 0 or 9 um so after that we're gonna search for add why I'm doing ahead because we're going to take all of that once again and just Ctrl C and Ctrl V because I want two lines of this oh I want two lines because I want the blue flashing at two different timing instead of having like one flash I want two different diameters so if I connect this to emissive right now you see now it's flashing white like this but if I go here and put three you shall see there's two different flash as you can see here so it's more this look more like a flashing police car than having you know point point nine right this it doesn't really feel like a police car okay so you can put 0.9 here and you put a number that it's convenient for for you here depend on where you're from uh in my area the police car kind of flashing that way um so you can play with the numbers like this it has you want obviously so from that here we're just going to disconnect the emissive and from the ad here we're going to search for a multiplier once again and the multiplier will be connected in the work later but for now we're just gonna drive from the distance supplier and search for an internment supplier and holding three on your keyboard and click it's gonna give you the possibility to basically put a color that you want so we're gonna go for a bright blue like this and here on B That's How Strong you want your blue to be um it's not going to be that important because I'm gonna put an intensity light later but you can put a number here so if you want to try it out for example I'm just going to put that in base color so you can see but if I put I don't know 20 here you'll see that the blue is a little bit different I believe it seems different well I can't really say from here so maybe in the missive color there we go let me see if color seems to work better so if I put one yeah exactly right so in the emissive color here is kind of the intensity of your light but I'm gonna leave it that one because I'm gonna do at the end one that control all of it at once so you can put something you you want right now or just leave it as is so from all of that we all gonna take all of this and we're going to copy that once again and this one would be for the red so all the timing or good here so we're just going to change the color and we're going to put a nice red perfect so all the setup are done for us so that's pretty convenient so this is going to be attached to alert not this slurp uh we're gonna take the one to interpolate alert so this one would go to B and this one will go to a and I'm going to disconnect this and from that we're going to add another mid supplier and that multiplier will go to emissive color and here we're going to all one on the keyboard and I'm going to promote this and convert that to a perimeter I'm going to call that light intensity and this will control the intensity of my light so if I put one you see now it's kind of that purplish it's doing purple because those red those the red and the blue together do a purple so we're going to fix that in a few minutes so this is the intensity so if you put 50 you can see you have the intensity here so instead of doing both you know changing the number you can just change it here right okay so we have that so now from that we're just going to take all of this we're going to bring that up a little bit and I'm going to take all of that I'm gonna do a comment and this I'm just going to call that flashing light interval so it's telling us a little bit what it's doing for us and this basically it's your speed right so if you remember the speed of flashing so you could you know just right click on it and just put a little note if you want to remember to change the number just to flash so if you take all your time here now make sure that you click on in your polls so when you pause the game it's going to still flash in the background if you don't do this apparently it can cause some issue and your lights will be desynchronized and it's not going to work so I don't know I didn't see that but they recommend to do this so I'll just do that um so from down here I'm gonna search for another time and that time here we're gonna drag from that and search for multiplier and this multiplier will be the same number that we put up here so it's going to be 1.57 and I'm going to search for another sin and this scene you can put the number that you want because it's like zero to one so I'm going to put 0.5 and you can play with that number you'll see in a minute what it's doing so we're gonna drive from that we're gonna search for if and that if here we're gonna all one on the keyboard three times so to create three notes and I'm going to connect the first one to be right here which will be zero and this one will be a bigger than b and this one will be eight smaller than b so we're gonna promote the promo convert to a parameter and I'm going to call this one exactly how its display on this I'm just going to change my keyboard there we go so B so this one would be bigger than b and this one would be smaller so a smaller than b there we go so we can apply that now so this one will be one the default value and this one would be zero so we're good with that so we're going to connect this to the alpha so right here in the lurk now you're going to see it's just going to take red or blue so we're gonna see that number here that I was just talking about so if you put 9 you see the blue is not it's not there right so we're gonna click on that and put 0.5 now you have built so you play with those number and see what you like so from this here I'm just going to select all of that and I'm going to put a comment that thing select blue or red without mixing them together to get I don't know how to write together I guess is it like this something around those lines Okay so just a reminder what it's doing for us so we'll all there so it seems to be good now obviously for this police car doesn't really matter if you put a base color or not but if you don't use this for this car and you use something else maybe you want a base color so if you connect this to the base color and you change that for whatever you want so when it's not flashing it should be discolor so as you can see here you showed seeing green when it's not flashing so you put the color you want so I'll leave it as white so when it's not flashing it's kind of weird but you can put it that like kind of a gray you put whatever you like I pull it at black I don't really care and from that here it's optional you don't have to do that but you know if you want to put a little bit more metallic uh to it you can put you can do this so it's gonna sound a little bit more metallic I'm gonna put speaker and roughness and you know just gonna put a little number there we go so the material is done now so you can play with those value to make it look the way you like obviously so it's all done so what we're gonna do now we're gonna apply this material to the police vehicle so we can close it so we have the material right here so we going to create two material instance for it so the first one would be called police red instant and I'm gonna take the other one and I'm gonna rename that and I'm gonna put blue so we're gonna go in the blue one and we're gonna check those two bucks here and we're gonna reverse the value so one here and zero here and I'm Gonna Save that so what it's doing is that one will flash red and at the same time the other one will Flash Blue so when you apply different lights on your vehicle they will flash a different uh the red low Flash and blue will flat will flash so it's kind of avoiding that all your lights at the same time flash red and blue now it's going to be like kind of reverse another kind but it's going to be reverse so now we click on the police vehicle and we click right here to go to the blueprint itself I'm going to go to the viewport I'm going to click on the lights on the top here and the material that we want to change is this one here so we're going to change this and we're going to select one of the material and stand that we did so I'm going to start with the blue here so now you can see it's flashing blue here but you know most of the police vehicle when this is flashing on the top those lights are flashing as well so I'm going to select the lights here and it's those one here and I'm gonna search again for my lights but instead I'm going to take the red so and you can see now when it's flashing blue the yellow one is flashing red so it's kind of a bit reverse so it's a little bit better so you're going to compile it and save and I just remember that I forgot to put in the material instance here and uh that one here the time here make sure that we put in your so it's not causing any issue so we're going to save that so we can exit that and go back to the police vehicle so now if you go here and you take Delights of the level and we remove it so now you see that is flashing windows one or a red the other one or blue so it kind of reverse so if you want to add a little bit more to that all right it's up to you it's optional you know at this time now it's done you see uh what I was talking about the the black here so you can change the color here that you want a little bit more gray and I'm going to save that and if you go back in the vehicle you see now it's not more great so you put the color that you want here it's not really too important um it's the way you like it uh so at that point it's already completed and it's working however uh if you want to put a little bit more optimization not optimization but a little bit more to it it's depending on where you're from so where I'm from here uh they have lights on the side as well so I'm just going to add the static mesh and I'm gonna rename that side lights and I'm gonna put it around here and I'm gonna put a cube to it so not a cube a bar so as you can see there's one here that I did earlier when I record the first time and when everything crashed on me so you can add you know um a static mesh and make it the shape that you want so it's already done here so I'm just going to align it here so do a little shape like this if you want to and the material here when it's selected you can select your police and you can take the um the incident so we're going to take the blue so this one will be blue and this one would be red let's take red and the run is red here so we're going to put blue here and this one here on the other side and this one would be red so there you go like this perfect so I'm just going to move it a little bit so it's not you know over the gas here so I'm going to move it like this perfect so I'm going to move this one by the same spot perfect so now obviously it's flashing inside the vehicle I guess well it is what it is so I'm going to compile and save that so now if we go back to the map here we can see that it's now on the side as well so if you close the lights and it's look pretty good right so that's pretty much this so hopefully I hope it was helpful for you I will catch you on the next one see you guys
Info
Channel: Unreal By Yourself
Views: 8,280
Rating: undefined out of 5
Keywords: Unreal Engine 5, Unreal By Yourself, Unreal Engine Beginner Tutorials, how to use unreal engine 5, how to create games, the world biggest video game engine, how to learn unreal engine, is it difficult to learn unreal engine, creating video games, unreal engine series, Unreal engine or unity, what is the best between unreal and unity, Is unreal engine worth it, lightbar, Police, Police light, Red and blue, Red, Blue, How to create a police vehicle, Police car, Cop
Id: 7W0R_-XB5_w
Channel Id: undefined
Length: 17min 45sec (1065 seconds)
Published: Thu Oct 20 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.