GODOT 4 - Hits and Impact Effects Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello guys welcome to another tutorial today we are going to see one of the most commonly used vs for games it's used in almost every type of game especially in Shooters RPGs and fighting games also we will use deal to create these nice surface marks on the [Music] ground this tutorial will be divided into two parts we will start creating a nice impact effect using the godot's partical system and then we'll create a mark effect using the decals feature in go do so here we are in go dot let's go ahead and create a new GPU particle system and we don't see anything because in order for this particle to work we need to do two things first first we need to go to the process material and create a new particle process material and then we need to assign a mesh I will pick a new Quad mesh as you can see now we have a lot of particles falling down this is because of the gravity so let's go to accelerations and set the gravity to zero I also want to use a single particle so let's set the amount to one awesome now let's go here into geometry and assign a new material for this particle new Shader material we can create a new Shader I will use a visual Shader name this for example simple Shader let's open the Shader oh by the way let's go to flax and enable the unshaded option here awesome I also would like this particle to always look at the camera so in order to do that let's go to the vertex option right click and create a new billboard Matrix set it to particles so now the particles are always facing the camera cool let's go back to fragment and create a new color color fragment I also want to use the alpha and we also need a texture so right click and look for a texture to the parameter put this in color mode and we can name it for example heat texture let's sample this so now we can oh by the way I will use mostly black and white textures so I just need a single Channel let's multiply the texture with the alpha of the color and that's it for the Shader a color and a texture that's it let's close this now if we go to the particle system in the material option here we can assign a heat texture let's see for example this one maybe this okay I like this this is perfect by the way I will leave the links in the description so you can download these textures now we can customize our particle let's go back to the particle system let's go to the spawn option I want this to have a random angle between minus 180 and 180 I also want to go to the scale option and have a random scale with a value between 0.8 and 1.5 we can create a new curve and control the size of the particle using this curve I want this to start big and then go small perfect now we can go to the color curves create a new color ramp enable hdri with this we can use very strong intense colors so enable this this is important and we can set a row color with a value of8 0.8 and zero and at the end of the particle we can set a value for example of 1 0.5 and 0.2 so it goes from yellow to Orange perfect also in the alpha curve we can control the transparency of the particle with a curve so let's create a new curve here and I want this particle to be transparent at the beginning and at the end perfect maybe this is very slow so let's set a time here for example of 0.25 and set the explosiveness to one so now we have this amazing particle hit impact we can also experiment with different textures let's go here let's try for example this one and this will be perfect for example for the fighting game but for now I want to use this particle finally we can go ahead and create a new GPU particle system we can name this one Sparks also in order to keep everything organized I will create a new node 3D and put all my particles inside this node let's also reset the transform of this particle so now everything is inside this note 3D we can also name this heat VFX cool so let's go to the Sparks particle system and create a new particle process material also create a new Quad mesh for this and I would like the quad mesh to be small for these particles so let's set the size for example of 0.05 and 0 3 this is falling down so let's disable the gravity let's go to accelerations put the gravity to zero instead of gravity I will use a velocity so go to Spa velocity this velocity will go up into the Y AIS with a spread of 180 and a velocity between 8 and 12 also we can set the time to 0.25 seconds and the explosiveness to one oh by the way I want these particles to be aligned with the velocity so let's go to particle flax and set a l Y2 on awesome now we only need to add a new material so let's go to geometry and create a new Shader material and we can use the simple Shader we created oh wait no we this Shader is always facing the camera so we cannot use this uh you know what let's duplicate this Shader with contrl d and in this Shader two I will go back to vertex and set this to disabled also we can go to modes and set this to disable the cool mode so it's double sided and yeah that's it now we can use the simple Shader two in the Sparks let's go go to the material Shader parameters and assign a texture here maybe this one cool let's put a color set a color with a row value of for example 2.5 2 and 0.5 also for the scale set this to have a random scale between 0.3 and 0.5 oh by the way I want to control the transparency so let's create a curve I would like this particle to start without transparency and then go full transparent so that's it for the particles with this the heat impact is completed well almost completed now we only need to add a surface Mark and synchronize everything together using the animation player let's create a new deal here we can assign a texture I will pick the default God do texture for now and Deals can adapt to any kind of surface as you can see we can also rotate it and use it in walls and so on also if we go here and activate view gizmos we can here control the size of the de this is perfect for example for bullet marks explosion marks for the blood when an enemy you hit an enemy and it spreads blood you can create a new blood texture on the wall using deal cool so for this deal we can use this ground Mark texture and let's move the deal inside the heat VFX and reset the position of the deal oh okay we have a problem the deal is overlaying the Sparks as well so in order to fix this we can go to cool mask in the deal and we can say for example to don't affect the objects inside the layer number three now we can put the particles in the layer three excellent also we have another problem as you can see here the more we go out from the surface it disappears so let's go to Vertical faith and move these curves we have another problem let me move the particles closer to the surface so you can see it yeah as you can see here the particles are intercepting the surface with this hard Edge but don't worry all we need to do is to go to the Shader simple Shader number one and create a proximity fade node and multiply this with the alpha of the texture and now the closer the object is to the surface it disappears it's Fades let's put a value here of 0.2 finally to keep everything organized let's convert this heat V effect to a new scene and open the scene here we have our particles and the deal we don't see the deal because we don't have any surface so for now I will create a new box so we can see the deal go to the heat effect and I want to this to be one shot I will do the same for the Sparks let's set this to one shot also we can set this to have more particles for example 25 let's see click click yeah I like this and let's create an animation player I will use this animation player to coordinate the Heat and the deal effect create a new anim for this animation first I want to keep this emit option in the heat effect also in the spark and I want the Sparks and the heat effects to be enabled at the beginning press play so you can see the sequence now let's go to the deal let's go to parameters and move this here and key this albo mix into zero and then maybe over here we can set this to one key and it stays for a moment and then it disappears goes back to zero we can set this animation time to 0.7 let's play we can also for example add a sound here set this to Auto playay so when this is instantiated in the scene it plays automatically this animation perfect let's delete this box so that's it now all you need to do is preload this scene into a script so every time a character hits a surface or a bullet hits a surface it detects the collision and instantiate these particles be creative try using different textures play with the particle system properties change the color change the velocity add some more stuff so you can get the perfect impact effect for your game oh
Info
Channel: Le Lu
Views: 6,383
Rating: undefined out of 5
Keywords: LeLu, Hits Impact Effects, Godot Engine, Godot, VFX Tutorial, VFX, Game Development, Visual Effects, Particle Effects, Godot 3D, Indie Game Development, Tutorial, Godot Hits Impact, impact, Hit, Hits, impacts, GodotVFX, GDC2024, GameArtistry, 3D Particle Systems, shaders, Game Engine, Punch, bullets, marks, decal, decals, sparks, poison
Id: GeParYI2J6I
Channel Id: undefined
Length: 18min 4sec (1084 seconds)
Published: Sun Mar 24 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.