Multi Impact Force Field Effect - Unreal Engine 5 Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone in this video I want to show you how to make this improved version of my force field impact effect from 5 years ago this time I have upgraded it a lot so in this video you will learn how to make this cool looking force field effect with a bit more complex material than last time also you get to create this ground Aura effect and last time you could only have one impact and if you had another one it would reset but this time I have solved the issue so this time you can have like infinite amount of impact and the last one won't reset I will show you right now so here you can see that you can have any number of impact and the last one won't reset like last time here you can only see three because of the time that I have given each wave so if I increase the time of the wave it will last longer so if you have like four different guns firing at the force field you will have four different effect at the same time so that is one Improvement another one is that if I press the E key it will dissolve like this and if I press e again it will come up like this so this is another Improvement I have added and there are even more improvements so if I go into the instance here you can see that I have some Advanced color col here so we can get this Advanced Colors by using a curve so if I click this I get this curve and you can adjust this curve to get different colors so if I just change the Hue you can see that the color changes I can also change the individual colors here so I can have more depth like this and here if I click this I can change the gradient to something I have created before so if I open this up I can see all these gradients and I can select that and put that in like here so if I just put this in I get this and this so you can create your own gradient and you can have different color combination really easily and here if I change the alpha I can just dissolve the thing like this so if I just click on the pan opacity and if I disable that it will look like this so it won't really Pan the noise anymore and here so if I change the opacity texture to to like this peing noise then I get something like this so if I turn the alpha here and change the oppacity bias like this you can see here that I'm getting a new effect so if I change this to this tone texture I get something like this and I can have an effect like this and I can change the edge width like this so I get a new effect I can change the color of the edges and now if I click on pan opacity it will pan it like this and if I press play here I have a new effect and if I press e it will dissolve like that and if I and if I press e again it will come up and stay there like that so you can control the opacity bias for that and the alpha you can control through blueprint so you can control the dissolving of the force field and there are a lot of effect here so here if I just get a spear if I bring it here and if I scale it up you can see that the effect is aligning to the sphere like that and here also you can see the lines adjusting to the sphere like that so this effect has a lot of advanced things going for it so if you want to download the entire project file you can support me on my patreon and for $5 you can download the entire project file and also these three extra effects that I have created so here you can see this kind of grid effect and here you can see a prismatic effect and here you can see like a blue flame effect and here you can see the additional effects that are kind of variation on these three effects so here you can have this glow effect here you can have this broken glass like effect here you can have this Force Shield effect like this one and here there is another effect and here Al also there a really cool looking effect so here these are all created from these effects so if I just select the material and here I can change the flame color and I can change the main color of this one so I get a different effect like this and here if I go to the main controls and pick pan opacity if I just select this and go to the instance and here I can change a lot of parameters and here if I just pick pan opacity and if I change the bias like this I can have a effect like this one I can also change the opacity pan speed and also the tiling like this and also if you support me on my patreon you also get this textur so if I add this here I get a very different effect from before like these ones so all of these have the impact effect and the bounce effect [Applause] Etc so if you support me on my patreon for $5 you get these four effects and also this additional variation of effects so this one this one this one this one and this one and you can also Al create a limitless amount of new Effects by mixing and matching different parameters and adding new textures to it so please consider supporting me on my patreon and downloading all of these files so for $5 you get to download all these files and also the project files from my previous tutorials also and if you're already my Patron thank you very much for supporting this Channel and me it means a lot to me thank you hey everyone I wanted to take a moment to shout out my Patron Ian fish and his brother their team is making a new game it's called Kings maker I'm pretty sure you probably have seen the insanely cool trailer of it on YouTube by now this game is in your typical medieval game in this game you get to go to the medieval Battlefield with a a machine gun a truck and even crazyer and attack helicopter and you get to mow down your enemies and build your own Empire in this insanely cool looking Sandbox game this game can be played both in solo and in co-op mode so if you are interested in this game please go check out the trailer and also wish list the game on Steam the links will be in the description below thank you and thank you Ian for your continued support So to create this right click then go to material and click on it and we can call this mcore force field then open it up now we want this to have a blend mode of translucent and a shading model of unlet and we also need a two-sided material so take two-sided also so now right click and create a material instance now go to add and get a sphere so sphere now we can just go to the sphere here and change this to the editor sphere this is much smoother than the original sphere now take this lock and scale it by two so it will scale that on all axises now we can bring this down you can also use a half spere if you want and also you can go to modeling and then go to duplicate so we don't accidentally edit our sphere and now after that we can just go to model and plain cut and we can just flip this so we have a half spere if you want you can also have that but I'm going to have a spar and now I will just apply this and open the material up and here first we can add the edge lines for that we can either use distance field or depth fade for this material depth fade is enough so we can add a depth fade and I just get an opacity now if I just get a constant value of one and connect this to the opacity and connect this to the MC color and click apply you can see that the places where the sphere intersect with another mesh is black and the top is white so if I just one minus this and connect this to the MC color that part will be white so if we give a value of one which is white to opacity then only that part will be visible I will just bring it here like this so we get this part now if I change the distance to like 20 or something like that then it will be a very small line now we can add it with other things to the opacity and for the MC color we can get a l and connect this to the alpha and connect this to the MC color now get a vector parameter by pressing all V and clicking and name this color and connect this to the B we can go this Edge color and give it a really bright orange value like this so if I click apply you can see that we have an orange line like this now we need to take care of the rest of the stuff so here if I give a value of zero here and click apply you can see that we get a really thin line and that's it now we can bring in couple of textures we need for this so first first thing we can go to the starter content and bring in the water texture this water normal and this x style texture and bring that in now we also need to bring a noise texture so for that go here to the engine and type in tore noise and there's a really cool noise texture here so bring that in now we need to pan this noise texture around so for that get a texture coordinate by pressing holding U and clicking and get a multiply and get a scaler parameter by pressing and holding s and clicking and name this noise tiling so this will control the size of our texture or the tiling of the texture and now we need to pan this texture around for that we need to get a Panner so for that press and hold p and click and give a value of .4 here and now we can get another lur and connect this to the AL here and connect this here and we can also connect this to the ad here so now if I click save I get an effect like this now here change the noise styling to seven now we need to distort this texture to get an effect like this for that we can get an ADD no and we can connect this here and connect this here and we can just duplicate this one and connect this to the noise texture now change the pan speed to 2 and 47 now if I try to connect this directly here we will get an error because here this is a two Vector you can see that by this it has an X and Y or here you can see that it only has a green and a red channel so we can only give a green and red channel here so in order to do that we can get a mask so mask compound in mask then only tick RNG and get a multiply so we can control the intensity of this this and change this value to .1 or you can connect a parameter here if you want to change it using the instance and connect this to the ADD and click apply so now we have this so now here you can see that there's an opacity change in the center and here also you can see that and the edges so in order to get that we need to have a frel so go here and get a multiply and connect this between this and this and now get a frontal node so what this does is that it will create a gradient using the view Vector so if I just get a multiply and preview this here you can see that if if your camera is directly viewing the surface it will be zero or a low value and if it is perpendicular to it it will be a white value so it's like a rim light that's what fral does so if I just connect this to the multiply here and stop previewing now here you can see that the center isn't really that visible now so here you can give a value of two for exponent and 01 here so we get a look like this and for the multiply we can give three so all these hardcoded values that I'm telling you is values that has worked for me but you can feel free to change them so you can experiment with this after you finish the tutorial now here we can add the grid to it so in order to do that just get a texture coordinate and a multiply and change this value to like 17 so so it's barely visible now get a lurp and connect this here and connect this to the lurp here and connect the green channel to the alpha so here if I open this up you can see that the green channel has this x pattern in it so here for the B here we can give a value of zero so it will be darker so we get that dark X effect like this we can also see the dark X effect here now we need to add some dots to this so for that get a radial gradient and get a parameter now get a text cordinate now here get a multiply and change this value to like 140 and connect this to the UV here and just round this and if I just preview and if I just preview this nothing will happen but if I change this value to like one you can see a circle if I change this to two the circle will be here but we need to have the entire me surface filled with circles so in order to have that we can use a node called Frack so what a Frack does is that it will just output the decimal values so we can have a repeated value if it goes above one so if I just connect this here and connect this to the UV you can get four different ones and if I change this to 140 you can have the entire Cube filled with the circles I will change this value to like 120 or something like that now get an add here and multiply this and this together so now we get an effect like this and connect this to the ad and now we can multiply this with the original Alpha like this and click apply so this gives an effect like this one so I will change this value to like 50 sorry I made a mistake here we are supposed to add this together now we get a look like this we can barely see the circles but that's the look we want so here you can see that the faded circles now we just need to duplicate this part and paste it here and connect this here now we can multiply the frel with this one and connect the red channel to the multiply so this is to give some additional depth to it now we can change the stying here just delete this and change this to three and change this to1 and change this to .1 so this will make it a bit more darker now click apply now we need to give color to this so in order to do that we can create a curve so if I just go here and type in curve so we get this curve atas raow parameter but right now we cannot add any curves to it because we don't really have an atlas so now we can create an atlas so for that go here and go to misscellaneous and go to curve adlas and I will call this C8 and for field then open it up so it has a texture width and a texture height so we don't really need this much height so untick the score resolution and change this to two and we can add two gradients so this is all what we need we can also decrease the texture width if you want you can change this to 1 to8 but I will just leave it at 1 56 so we get a really high risk gradient but we don't really need that but it's okay for now and now we can go to m l again and go to curve and we can go to curve and we can add a linear color and select and I will call this CB force field then open it up and here you can click this and give an orange color like this and you can go here and normalize this and you can click this again and give a dark color so we get a orange color and a dark color and click here again and click here and we can give it a red color so let's see what happens so now if I go back to the material and if I change this to color curve and here I can just connect this color curve and here I can just connect the red channel to the color curve and connect this to the L here so now we have an error because we haven't provide the Adas or the curve so for the Adas we can go for C8 force field and this curve we haven't added anything so we can go to the atlas here and we can add a curve so we can add this one and now we can select that here so now we have given the color to the curve and we have this cool effect now if I open the curve I can adjust the colors so here you can see that the white portion has this really bright orange color so if I move this closer and move the black one closer and delete this the black will be black and the really bright portions will have the red color so if I move this around like this and if I add black here or a red and change that to Black and if I get a green here you can see that the really bright portions have this uh red color like that and the other values that are between here it is going from 0 to one so the values between 0 and 0.5 is mapped to green and the values that are at one and before this part is white so that's how we are mapping the color to the gradient so if I just connect the red channel to the L here you can see that there are different values so some places are very bright and some places are very dark so the darker the the place is the value is closer to zero and the brighter the place is the value there is closer to one so that's how we are mapping this curve to the gradient to the gradient here so if I just connect it we get an effect like this and here you can just adjust a hue to get a really cool effect like this one so if I go here I get something like this now let's recreate this curve so I'm just going to recreate this curve here so we get the exact same effect so if I look here the one value has this really bright orange color so R is 200 and G is like 20 so we can give that there and I will just reset the Hue and here we have a dark value here and this value slide a dark red so let's get that and this value is like a pink color so let's get the pink color and then between that and the black we have this really bright orange color so click here and get that orange color and then we have this two darker colors closer together like this and now we get a color like this now we need to do the rest of the adjustment in the material so to get the glow effect so here in order to get the glow at the edges we need to multiply this curve by this frel but we need to power this by six first so it will be really sharp around the edges and connect this here and now we can multiply this with 100 so it will be really bright around the edges so we get a look like this so if I just press apply we get something like that now we need to get an add node and get a multiply and now multiply this with this one I will just move it back multiply this Alphas before the depth Fade with this texture and connect this to the ADD and connect this to the L so we get a unique look like this so if I click apply now we need to bring it up and get a lurp and connect this here again and connect this Edge color to B and connect this to the a of the L and now connect this to the a again so here this is The Edge line and we need to individually control the strength of the edge line so here it is this line and we need to control the brightness independently so in order to do that we can get to multiply and connect this to the B here and get a Scala parameter and we can call this Edge boost and this can have a value of 50 so it will be really bright and now for the alpha of the L we can bring in the radial gradient circles we have created so just bring that in so I think a better way to bring that in here without all this mess will be just to create a named rear out node so just type in named and we can call this circle pattern and now save this and we can just disconnect the alpha and type in circle pattern so now we have that also now here this is obviously too much we don't really want this much circle patterns so we need to make a thin line that goes up and down so the circle will be only visible in those areas so now here in order to get the thin Lines Just connect this to the B here and now get a linear gradient and now get a multiply and if I preview this you can see a gradient like this and if you want to have multiple lines like before we can use a frack and if I change this to like six and if I preview this you can see that I have multiple lines and here if I just subtract this and then saturate and then round this I can control the size of these lines so here you can see that the lines have a gradient and here if I subtract 4 then it will only have 0.1 after the round so this saturate here is just to clam the value between 0 and 1 we don't really want this to go to1 so here there are val that are zero or like3 and if we subtract 4 from it it will go to negative we don't really want that so we are just claming that between 0 and one and here this what this round does is that if the value is below 0.5 it will round that to zero and if it is above 05 it will round that to one so if I just preview this you can see that I get a really clean line and if I CH this to. 59 then it will be really small and if I subract 05 from it it will be black because there is no width for the line anymore and if I change this to three you can see that we have more lines because we are subtracting 3 from 1 so you get the rest of the gradient and if I subtract .5 from one you will only get .5 and if you round that we don't really get to see anything but if I round point for5 you can see a really thin line so set that to point4 now just stop previewing and multiply this like this one and click apply so here we need to connect this here before all of this now click apply and this value we can change the edge boost to 10 now here we can distort this line a bit so if I just start previewing this and if I go to the normal and if I get an ad node and connect this here and get a UV coordinate and now if I just connect this to the UV of the linear gradient can see it is very distorted now so if I click apply so we get the same effect we have here now we can go into the gradient and we can play on with this values so I just move it here so here one more thing we can do is that we can change the EXP component to like1 here and click apply so we have an effect like this it's similar to that one now we can go to the curve and here we can turn this to like black like this so now we have the effect we want I made another mistake here we are supposed to connect this color curve to the multiply in order to get the look like this one that I have created so if I just connect that here and click apply and change the and change the exponent to two back again and click apply and now if I just open the curve and and select all of this and click the auto curve here so now we have that look now adjust these values like this I'll just delete this and delete this and add a black color here and add another black color so now you can adjust these values to get the look you want okay I think this is what I want now just bring up the sphere a bit now we will create the alpha effects so for that we can go back to the material and here I will just go to clean graph and clean up so everything we don't need is gone and I will just tidy things up a bit now we need to create an alpha effect so for that I'm just going to double click here and cck here so we get this rear out nodes and here I will just copy this texture and bring that in here and I will just connect this to the opacity and connect a constant value of 1 or 10 to the MC so here you can see that the white values are visible and the darker values are invisible and if the values are lower like gray or something like that it is transparent so that's how opacity works the value is zero it will be completely invisible and if the value is one it will be fully visible and anything in between will be transparent so we can use this property to have our dissolve effect so for that we just subtract this by an alpha so I will just create a Scala parameter and I will call this Alpha and I will connect this here to B and connect this to the opacity now if I change this value before that I will just set the slider Max to one now if I change this you can see that it is eating this and if I reduce this you can see that it is showing but at zero it is still like this but what if at zero we want this to be fully visible and at one we want this to be fully invisible so in order to do that we can multiply this value by two so at zero the value will be zero and at one the value will be two now if you subtract one from this at zero it will be -1 2 it will be one so here if I change this value to like1 you can see that it is fully visible and if I change this value to like two fully invisible here we are just remapping them minus one to two by just multiplying it by two and subtracting it by one so if I connect this here and change this value to like zero now it is fully visible like it was minus one and if it is one it is fully invisible like it was two so that's all what we have done here and now if I just set this value to like 0.5 and go here you can see the cylinder like this so if you want this gradient to go from top to bottom we can do a linear gradient and if I just multiply this with this one and if I just increase the gradient you can see that the top is getting cut off faster than the bottom so if you want the opposite of the effect you can just one minus this now we can have a UV coordinate and get a multiply for tiling and we can call this opacity tiling and I will default this to one and connect this here and connect this here so now if I change this value to like 05 you can see it is getting visible and visible like this but here we need to have an edge line so if I go into this one and if I just press play and if I press e key you can see that there's an edge line to the dissolve we need to have that so in order to have an edge line instead of this white color there are many ways to do it in this tutorial I'm just going to show you a way using curves because this tutorial is mostly about curves so I'm just going to use curves to get this Center Line so in order to do that I'm just going to duplicate this and I will call this Alpha and I can add this to the atlas here we can just delete all of this and technically you can just use the alpha channel for this but in order to show you what is happening I'm just going to use the color channels so I'm just going to click here and click here and I will set this value to like black and and I will click here and here and set this value to like black also and click here and set this value to like one so here at 0 five of the gradient we will get a white color and before that we will get black and after that we will get black so what happens if I go here and I will just duplicate this and change the name to Alpha curve so here I'm just going to get a curve and I will call this Alpha curve and change the addas to the one we created and change the curve to the alpha and if I just connect this to the curve and connect the red channel to opacity and now if I just change the so here nothing is really visible so I will just connect this to the m and this to the opacity and now if I just change the alpha you can see that the edges are white and if I change this to like here like this you can see that it is fatter now so here I can change the size of the edge using this so I go here you can see the instance and if I change the alpha here you can see how it is changing don't mind this artifact this is because of the translucency and it won't really bother us later so here you can see that the alpha is thicker so if I go here and bring it like this you can see that more of it is visible and less of this is visible like this so here we want this to be closer here and this to be closer to5 and this should be closer again and this should be a bit closer and here we can just go to normalize and select this and go here to the constant interpolation so we get this Square so it is really sharp here and here we have this gradient so now when I move this you can see that we have an edge color like this so this is the same Edge color that we are going to use so now I'm just going to connect this to the opacity and connect this to the MC and click apply so now if I move this around you can see that we are having our Edge color like this and here we don't really have to invert the alpha click apply now if I just do this you can see that it is dissolving to the bottom B like this and you can change the opacity tiling so it is more visible now you can also go here and convert this to a parameter and we can call this opacity texture and now we get something like this so in order to control the size of this we can either go to the curve or or we can just power this so get a power and now get a Scala parameter and call this opacity power now if I change the opacity power you can change the size like that so this is exactly what we want so now in order to connect both of these effects together remember here we have this edges and outside the edges we need to have our force field effect and inside it we don't really want anything because we are going to dissolve that in so outside it we need to have the force field so in order to get that we need to subtract this part from the curve so we will just ignore the curve and leave the rest of the gradient intact because we are giving the edge color to the edges and the rest of the part we want and then we can round it we are rounding this because we don't really want any transparency depending on the value of this texture we just need to have one solid color like this then we can multiply the solid color with our original opacity so this lighter values won't affect our original colors because it is either fully visible or fully invisible now we can just add this back together to the opacity and now for the MC color we can get a lur and this Edge color should be at this white values so we can connect this to the Alpha and if the value is one then the B output is taken so if you want the at the edge we can connect this to the B and connect this to the MC color and here we can connect this here and click apply and now if I increase the alpha you can see that it is visible like that and I can reduce the opacity power and increase opacity power a lot we can also use a blur texture so if I go to the engine and type in blur so it's a lowess blur texture and this is really nice so if I just add that I get an effect like this so I will just set the power to two and now this is issues are because of the curve so here we are supposed to connect the power after the curve so that was the issue so just connect that like that okay now it's working really well now we can also increase the opacity tiling like this now if you want this to have that panning effect we can go to the force field and get a Panner and now give a value of 0.1 and connect this here and click apply and now if you want to increase the speed you can go to we can go here and change this value to like two or something like that and click apply and now we can change the tiling and increase the power degrees it we can also go to the curve here and move it closer and closer and move this closer to and increase the tiling again this Alpha we are going to control using the blueprint but if you want to have an effect like this all the time without the blueprint changing it we can create an alpha bias so we can go here and go to Alpha here and get your multiply and duplicate this and call this Alpha bias and connect this here now go here and one minus this so at one all of this will be fully visible and if I reduce this it will stay here now we can control this from 0 to one but it will also stay at the same position without going anywhere now we need to control the alpha using a blueprint and for that right click then blueprint class actor PP force field then open it up now add a spar and change the static M to editor sphere this editor sphere now for the material we can add the force field material we created now I will just move this away and bring in our blueprint now I will scale it a little bit like that by two now we can go to the event graph and here we can drag the spearing and type in timeline and we can call this animate Alpha then drag from here and type in scalar parameter value and connect this to the update and for the parameter name this is the alpha we created here Alpha so the parameter name is Alpha Now open up the timeline now add a track and add a float track and I will call this track Alpha then shift click here and set this to zero and zero now shift click here and set the time to five since the maximum length is five and the value here to one now we can just normalize this and now we can connect this to the parameter value and here we can create a custom event custom event and now here we can call this show fce field and connect this to play now create another one and call the this hide force field and connect this to reverse or you can connect this to play from start and reverse from end play and reverse it back and forth you can connect this to play from start and reverse from end if you do that every time you call the event show voice field it will start from 0 to one and from reverse and if you call hide it will it will go from 1 to zero but if you connect this to play if the timeline is at05 then it will play play from0 5 to 1 and if it is at0 2 it will play from 2 to 1 and here if the height force field is called at05 when it is going up it will go from .5 to zero so this reverse end and play from start just reset and start from zero or one that is the difference now here for begin play we can just call show first field and after finished we can call hide first field so we can just test this out so now if I just press play can see that it is coming up now it go down like that so if I just press play again and see that it is coming up and going down so that part is working so if you want to activate this using blue print you can just call this function you can just get a reference to this force field and search for this function and call this so it will start showing and if you call hide it will hide the force field so that's it for showing and hiding the force field now we can create the hit reaction like this first we will create the bounce then we create the particle system so for the bounce go to the material and we need to go to to World position offset now here we can get a Vertex normal and we can get a multiply and now get a scalar called Bounce normal then connect this to the multiply so what this vertex node does is that if I start previewing this you can see that it is just a bunch of Direction where the vertex is pointing on the sphere so if it is pointing up it will have a blue color and here which is pointing a bit to the right also so so it has a combination of blue and red so that's a pink color so this vertex normal just points to the direction of the vertex if I just connect this to the world position and if I increase the bounce normal like 100 or something like that you can see that and now if I just stop previewing this you can see that it is really big and if I set this to -2 or 20 you can see that it's smaller so so at 20 it is bigger and and at zero nothing is affecting it so by scaling it this way we can scale it uniformally if I just scale it using the scalar value then there won't be any direction so if I just turn this value it will move this way because we are not specifying the direction so just think of this as a unit Vector that points to the direction of each vertexes so we can scale it uniformly if I just do this it will just move like that so if I just get a three vector and connect this to the world position offset and if I change the C value to 100 you can see that it is going up so if I set this to zero and set this to 10 Y and 100 you can see that it went right so basically here we are giving a three Vector but it is just pointing along the vertexes so just connect that to the world position object and here we can set the bounce value to like 100 now we can get a ler and connect this to B and get a new Scala parameter and we can call this bounce Alpha so with this we can scale the offset so but zero it is like this and at one it will be this value and we can control this in the blueprint to get the bounce effect now we need to pan a noise around this so we can get a nice bouncing effect so for that we can get a multiply here we can also use a multiply instead of the L now for the text we can go to the engine content and type in wind and just filter this by texture by going here and clicking texture like that and we can get the wind turbulence texture and bring that in and connect the RGB value to multiply and connect this to the B now get a text coordinate and a Panner so we can Pan the texture around now set the speed to3 and3 so it just moves around like this now set the bounce Alpha to Z so it looks normal now go to the force field blueprint I will just move this down a bit now go to the spere and make sure that block all Dynamics is enabled you can also create your custom Trace Channel or Collision preset by going into the project settings but I'm not going to do that because this is already a really long tutorial so just set that to block all Dynamic then go to event graph and select the sphere and go to own component hit and now drag and type in print tring and connect the hit component and now if I press play and get the gun and if I just hit you can see that what I'm hitting so here I will just break this so it is always visible and also break this so it won't blend in so it will make it easier to test so here if I connect the other actor so if I just press play and get the gun and hit it you can see that I'm hitting the force field using my first person projectile so that projectile is in the first person blueprint and this one first person projectile I have just modified it like this but nothing changes you can use this and now once we are hitting it we can just destroy the projectile so just connect this to destroy other Rector then we can create a timeline and we can call this bounce and here we can play this from start and now we can go to the bounce and set the track length to one and get a float and we can call this bounce Alpha and go back and here we can drag in the sphere again and type in set Scala parameter value and this time the parameter values bounce Alpha so this is the value we are going to modify this bounce Alpha and now every time we hit this this timeline will play and this bounce occurs now open the timeline and add zero here and one for time and one for value now if I just press play and hit the thing you can see the bounce effect but it is really slow so I'm just going to move it back and here I will click on the middle portion set this value to one and set the last value to zero because we want to go up and then down now we can make it a bit smoother by selecting it all and adding an auto and shift click here and bring it down a bit and add another key and bring it up and add another key and bring it down and add another and bring it up so we get an elastic effect like this you can also create an elastic effect like this using the curve editor but I'm just going to use this and now we can go to the event graph and increase the speed a bit so we can go to event begin play just delete all of this we don't really need that now go to component and select the bounce so we can name this TL bounds for timeline and now set play rate so this will increase the player rate to whatever value we give here so if you give a value less than one it will be slower and at one it will be the same 1 second duration we gave here and if I set this to 20 it will be really fast so here we can set this to four and now let's see okay now it's really fast so this is what we want now we will create the impact effects so first we will create the sparks then we will create the Rings so in order to create the Sparks right click then go to nagra system and we can click next then go to foundant and add and click finish and we can call this NS impact then open it up so here you can see that it already has a found an effect so we are just going to modify this a little bit so here we just want this to happen once so just untick spawn rate and go to Emer State and set loop Behavior to once and set the duration to one and now go to the update click add then select spawn instantaneous and now set the value to like 40 and now go to initialize particle and set the lifetime to4 and 6 so it happens faster now go to the add velocity and here set the corn axis to -1 and I will show you why this matters later in the blueprint and just thr out the Z value now we can go to the initialized particle and set the color to a bright orange color like like this now we can go to spite render and set the alignment mode to Velocity aligned so it will align to the velocity and we can go to the particle update and type in scale by speed so scale Sprite size by speed so we can scale it in the direction of the Velocity Now set the value to like 75 and 3 and 1.2 and 3.3 now going to initialize particle again and set this uniform Sprite size Min to two and Max to like five and one more thing we have to do is that we have to go to the local space and tick this so it will spawn from the emiter location itself and won't change that location so we want to spawn it from the impat location itself now we can duplicate this and we can call this curved so we want a curved particle also so here we want this to move in a curve Direction around the sphere so in order to do that we can go to add velocity and here for the cor angle we can give a value of 180 and the inner core we can give a value of 170 you can do like this now we can disable the gravity and it spawn like this and we can decrease the lifetime to 0 2 and3 it will be super fast maybe five and we can increase the spawn count to like 200 or something like that maybe 120 okay that's what we want now go back to the blueprint and here after the impact we can drag this like that we can drag this here and type in spawn emitter at location and we can break the hit and get our impact and now get the location and connect that to the location and for the I made a mistake here we need to type in spawn system and location so this emitter at location is for the Cascade particles and the system is for the nagra so just add the impact and connect this here here and connect this to the play Connect the location to the location and for the rotation we can get the impact normal and type in rot from X and connect this to the rotation so this is why we have added netive one here for the X so it will face the opposite direction from the impact so if I press play so now you can see it is Corning the way we want from the direction of the impact from the surface of the sphere like that no matter where we impact it or from what angle it will come out from the surface of the paer so here I connect this to the play from start so that's why we didn't really see the bounce so now if I press play now you can see the bounce like that now to create the impact Rings select this Spear and we can go to the modeling and we can go to x form and duplicate this and click at accept so we duplicate the mesh now we can just set some other material here like this m Flor so we can see it and now go to model and go to plane cut and here flip the plane like this and move it up like this like about here so we are just cutting this sphere and click accept so we have a new mesh like this one now select that and go to x form and go to edit pivot and and click top and bring it up a bit like this and click apply now we need to create the material for this so right click M underscore Circle then open it up and here we can set the shading model to UNL it and the blend mode to translucent and get a radial gradient and connect this to the opacity and get a particle color and now multiply that with the alpha and connect this to opacity and also multiply this with the RGB and connect this to the MC color and click apply now if I just apply this you can see that it is in really showing up so we need to fix that for that we can go to the modeling tools and go to mesh and UV and go to auto UV so now it's looking really nice so click accept so now it's showing up now we need to make this into a ring so for that we can get a Time node and a multiply node and connect this here and get an add node and connect this here and now get a multiply node and get a Frack node so if I change the value here we can get three rings like this like before and this time we'll just move the values around so it will be animated like this so this is what we want now we can just subtract maybe like 02 from it and if we just round this we can get rings like this and if I connect this here we get this effect now we we need to fix this two for that we can one minus this and get a multiply and multiply this within one minus of this so we get this donut leg shape we can multiply this with this one and now with the round so it's not visible so just connect this to the round and multiply it like this and just seal this so we will get a nice bright lines like this one and maybe just connect this to the B here so we can fade it out faster now click apply and save so this is what we want maybe here we can also reduce the radius to4 so this is what we want now we can go to the impact and here we can add an emitter and single looping particle and here go to the Sprite renderer then untick this then add a new runor and get the mesh run eror and now for the mesh we select this mesh and select that and add that here and for the material we can enable material override this will replace the material of the static mesh and add an array element and for this material we can add the circle material we created so just add that like that now if I just play it from here you can see that it is not oriented in the way of the impact so we can fix that by going into the properties and clicking local space and here we need to rotate this a bit so we can go to add we can go to particle spawn and type in mesh orientation inial mesh orientation then here set this to system and click rotation and set this to 75 so now it is rotated towards the system like that and now if I press play and fire you can you can see that it is sticking to The Spar like that so this is what we want we can also go into the mesh and we can edit the P so we can control where it appears by editing the P it so if I drag this down a bit and now if I just fire you can see that it is on top of the sphere like that and if I go to PB and click top and push it up a bit like that then it will be inside the sphere like that now we need to add some fading to the Rings so go to the impact effect then go to emiter State and change this to self and loop Behavior to once and duration to 1 second and go to initialize particle and reset this value and now set this to 0. five now here we can type in scale color and for this color here we can go to initialize particle and go to color mode and and now click direct set and set this to the orange color like this now go to the scale color and here we are going to untick the scale RGB we are just going to scale the alpha now type in curve so we can scale this using a curve and now click this one so it will go from 0er to one we need to click this one so it will go from 1 to zero like that and now we can go to particle update and type in scale mesh size and here for the scale factor we can type in float and Vector from float and here we can type in curve like before and now click this one so it will just e in so it will go from 0 to one like like that going to initialize particle and go to mesh scale mode and set this to uniform and set this to one now it should work so if I press play so now we have ring effect also and you can obviously adjust the parameters to get a different effect now if you want you can also add some Collision to your found particle and increase their lifespan little bit and you can also change this to GPU particle both the fountain and curved if you want so you can spawn a lot of it now if I just press like this you can see that it is bouncing now let's create the ground Aura so for that right click then material mcore ground then open it up we need this to be decaled so we can project it onto the ground we can go to material door domain and click defer decal and change the blend mode to translucent so we get this now we can go here to our main material and copy these parts fill the curve and paste that in now here connect this to the MC color and now get a radial gradient and get a multiply set this value to like8 and get a UV coordinate and add this to the radial gradient and here just delete this and get a rotator and connect that to the Rotator and connect it like this and here instead of the panel we can also get a rotator and connect it here and here the value we can give a25 for this one so we get an effect like this now here we can multiply this with three and get an add node and connect a time to it like before this time instead of a Frack we can use a sign because that will will give a smoother result and here since the sign function goes from minus1 to 1 we can just normalize this to 0 and 1 by adding one to it so minus 1 will be 0 and 1 will be two and get a multiply and multiply this by5 so 0 will be0 and 2 will be 1 so we just remap sign from -1 to 1 to 0 to 1 and here like before we can get a multiply and one minus this and connect this here and connect this here so we get a donut looking effect and get another multiply and give a value 0.5 so we can bring the value up a bit and here we can multiply this with this one and now if I preview this you can see that it is very noisy so in order to fix that we can make our noise texture a bit blurry so select that and here go to the map value and select relative to computer M and change the value to like four so it will be blurrier because the texture is smaller now and now we need to get a grid texture so this grid texture we can just copy that and paste it and set the tiling value to like four now we can multiply this with the original gradient and here we will multiply this with the green Channel and if I preview this we get a look like this now add both of them together and connect that to the opacity so now we get to look like this and here we can also add this one with this one saturate it and connect this to the curve and here we can control the curve color by getting a alert and connecting it to the alpha and so if I preview this get something like this now if I set the value here to one and here to8 and stop reviewing we get a look like this so we can adjust these values to get different colors here like that so click apply now if I just create an instance of this and bring it into the world you can see that it looks like this so if I bring it here you can see that there is some intersection effects happening here and we don't really want that so we need to mask out the perpendicular planes to the surface so in order to do that it is really easy so here if I get a scene texture node we can get a world normal from this so go to here and get a world normal so here it will output the normal of the world so if it is a really flat surface the C value or the B value will be one and if it is perpendicular to the surface it will be zero since the B here will be zero so you can use that to mask out the perpendicular plane so get a mask and only take the B and here we need to make it absolute because we also need to mask out the negative value we also need to mask out the one for the B and now if you just multiply this together and click apply so now you can see that it is masked out we don't really have the ugly effect that we had before we can also do one more thing we can go to the radius and set that to4 now click apply that's a bit small smaller now we need to create a nagra particle system for this so nagra system then click next then click single looping particle and click add and finish and I will call this NS ground then open it up and now go to Sprite render and take this then type in decal render and for the decal we can add the instance we created and bring that in so it's really small so let's fix that so in order to change the scale of the D if I just come here and scale you don't really see scale deal so in order to do that we can go to the particle attribute and type in dcal and get the decal size and now drag that into the particle spawn and here we can give a value of 200 for x and 650 and 650 for Y and Z so it looks like this so now if I open open the blueprint and again drag in our decal so now we can see the decal here and here if I just catch a spere so if I bring the spere you can see that the decal is rendering on top of The Spar so in order to prevent that we can click that and type in decal and receive decal and untick that so if you have something you don't really want the decal to be drawing on you can do that and now if I just bring this back like this you can see that it is not even drawing on the flat surface so that's what we want so now if I just press play and get the gun and now I can hit the forse field and get the impact effect like this you can also adjust the size of the decal Etc so I think that's it for the tutorial guys thank you very much for watching and if you want to download the project file you can support me on my patreon thank you e e e
Info
Channel: UnrealCG
Views: 4,101
Rating: undefined out of 5
Keywords: Unreal, Engine, Tutorials, game, development, indie, VFX, UE5, Realtimevfx, UnrealEngine5 tutorials, unreal engine 5
Id: 8QI6WLbrFEY
Channel Id: undefined
Length: 71min 57sec (4317 seconds)
Published: Sat Apr 27 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.