EASY EXPLOSIONS in Unity - Particle System vs VFX Graph

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today we are going to see our simple and easy explosion is done in nudity I believe this is a great exercise slash video in case you are in a rush and need some quick and easy explosions for your game so without further Ado let's jump right into this by the way this is all available on my patrons page where you can get many more assets for your game links below so as you can see we are going to create this very simple and easy explosion with the particle system and then I'm gonna show you how to do it with VFX graph as well so the first step is with right click create an empty game object rename it to something like VFX and the score easy explosion and reset the transform I'm going to push it to value of 2 on the Y so it doesn't touch the ground and then I'm going to add a part consistent for the Sparks in here I'm going to turn off looping I'm going to say the start lifetime is going to be small between 0.2 and 0.8 and the speed between 2 and 20. it keeps on emitting particles because of the rate over time let's set it to zero and add a burst off between 15 and 25. if I turn on the gizmos as you can see it has a cone shape not useful let's switch this to sphere instead and say the radius is 0.2 they are huge so on the start size I'm going to say 0.05 and 0.4 and they are round in case you like it that's fine but for this I'm going to say the render mode on the render is stretched billboard they are still round because the speed scale is at zero let's say it's 0.03 right so we need a material for this to be bright let's create one and call it particle underscore Orange and on the Shader I'm going to switch to Universal render pipeline particles and lit if you want this to be bright let's turn on emission and say I'm gonna copy this color actually place it right here and these are the values that I'm using as you can see we have the intensity which is a feature of the HDR color I also have a bloom on my scene so they become bright and if we add these to our parts as you can see this material is a square in case you like it that's fine but on my specific case I'm going to say that the base map is going to be the default particle if we test it again it's still a square a weird Square because the surface type is opaque if we switch it to a transparent this will work out just fine all right looking good now another thing we can still do is the size of our lifetime we want them to shrink throughout their lifetime and I'm going to use the curve similar to this one so we can get these effects really nice let's move on to the next element which is a flash so right click particle system call it Flash no looping lifetime of 0.1 no start Speed start size of 5 you can turn off shape and the emission zero for the rate over time but a burst of one only one particle and size over lifetime from Big to small and then we can add the material we just created so it becomes bright orange and here we go we have a really nice impact if you select Parts in Flash you can see everything at once let's go for the fire and the smoke another particle system let's call it fire this one is also going to have a random lifetime between 0.2 and 0.4 and a random start Speed between 0.5 and 3. and start size between 0.5 and 1.5 turn off looping as well and no rate over time but instead of burst of 10 particles again the shape in a sphere mode with a radius of 0.2 and then we can turn on size of our lifetime so they go from Big to small but with this curve and finally assign the material the orange one which is bright and here we go we have those bright particles in the middle let's duplicate with Ctrl D to Fire and call it smoke the difference now is first the origin layer is going to be below everything -1 and it's smoke so we don't need orange in here let's duplicate this particle Orange and call it particle dark and turn off emission that's about it now let's assign it to the smoke and say the color is dark black one yeah if we test it out as you can see they are small the smoke particle so let's do a few tweaks in here like for example they could leave a little bit longer 0.4 and 0.6 move a little bit less between 0.5 and 2 and be bigger like 1.5 and 2. in relation to the fire particles if we test everything together here we go we have done our very easy explosion and super fast that's it if you are fine with the particle system that's about it what I'm gonna do now is show you how to create it with VFX graph so the price is the same right click to create an empty game object and then we can on a folder create a visual effect graph called VFX graph underscore easy explosion in my case tutorial and drag and drop it to the empty make sure the Y is zero press delete button and here we go we are inside VFX graph now the process is the same in here we don't want to constantly spawn particles instead let's remove this and add a single burst and then a random number I'm searching this with spacebar between 15 and 25 make sure it isn't constant and the seed is per component and connected to count let's already create a group select everything group selection rename this to Sparks we could use a set velocity but I'm going to show you a nice trick where we use a set sphere a set position sphere and say the radius 0.1 and now we need velocity but I'm going to show you another trick where we use the set velocity from direction and speed spherical yeah I know long names long names but this one it's cool because we can say the speed mode is random between 5 and 19 for example lifetime short one 0.4 0.7 I'm actually using the same values that I used for the particle system version and down here we can assign the default particle for the main text we don't need materials in VFX graph which is cool and size of our lifetime the composition needs to be in multiply mode something like this for the curve that's fine we don't need a set color of a lifetime we can switch it with a set color and select the colors similar to this as you can see in here we can already increase the intensity to something like 3 for example here we go looking nice they are a bit reddish but that's fine before the multiply size of our life let's add a set size random between zot one and one and to make this stretched they are round as you can see we can use a set scale random as well between 0 2 and 0.8 for the X and 1 and 2 for the Y they are stretched but they are not aligned with their velocity vectors so on the Orient blocker pin here we can say something like a long velocity and here we go they followed their velocity Vector let's rename these two Sparks and with spacebar let's add a simple particle system I'm going to select everything and create a group selection this one is for the flash renamed up here and down here it's very important to rename the output particle quad because we are going to use it in a moment this one doesn't need to move and the lifetime can be constant between 0.1 something super bright super fast again no constant spawn rate but instead the burst the single burst of one particle down here we can assign the default particle and use the set size of 8 but the set size of our life again the composition needs to be in multiply you can remove the set color of a life and while all in control you can drag this set color from the Sparks it will create a duplicate of the block of this block cool here we go a nice impact now let's go ahead and create the fire and the smoke again with space bar simple particle system select everything and create a group selection for the fire rename it up here and down here the output particle quad and instead of a constant spawn rate we can use a single burst between 10 and 12 turn off constant connect the count remove the set velocity and say the lifetime is between 0.2 and 0.4 now again let's use the same trick we want to duplicate the set position Arc sphere while holding control and the set velocity from Direction while holding control and dragging to the fire here we go cool the velocity is way too high the speed in here so let's say it's between 0.5 and 2.5 all right and down here now we can use the default particle which is quite useful by the way and the set size of our life composition set to multiply and the curve from Big to small but it will make this Arc as you can see and before that we can add the set size render between 1.25 and 2.25 very specific values you can play with this obviously remove the set color of life and again while all the control we are going to duplicate the set color from The Flash for example while all in control drag and drop exactly and here we go that's pretty much it now for this smoke we can copy with Ctrl C and Ctrl D this fire part consistent rename it to smoke up here and down here in the output particle cloud and say the color is totally black as you can see let's increase the set size to 1.75 and 3 pretty much it's going to live a while longer between 0.4 and 0.6 it's going to move less like 0.25 and 2. and as you can see now it's rendering above everything that's why it's important to rename the output particle quads because now if we select the VFX graph in our project folder on the output render order we can say smoke is rendered before everything and here we go look at this we have done a very easy and very simple explosion I hope you have enjoyed this tutorial it was a very quick one I know and if you want to learn much more about particle systems and visual effect graphs then you must check out my channel I have plenty of tutorials that will help you out if you want to have access to these into many visual effects it's all available on my patrons page I left the link below and I want to say thank to each Patron that supported me last month and as usual a quick shout out to the top tier patrons which are Alex speak Alexander brazy Alvin ape on fire Aurora a Aviator bone air hat love cyber cradle Daniel Smith deep anchor yeah cool Diana simonian effect yellow El Sharif easy thanks strike Frosty Ford George Michael burrow Julio benvenuti grab lab guillerm trinda Jason Marrero Jeff Rose Jose Salazar Casey Miller Li an Old lutuli Lucas Rush Matt Mahone Mike Bell minazuk Nikolai Phoenix pradips and radioactive both randomizer Ross Revenant games ranks R Lee shikaka Travis makalo very suit riches love Whiplash real who's thank you all very much for your support you guys are amazing and you keep this channel going so I hope you have all enjoyed this very quick tutorial and I hope to see you on the next one thank you bye
Info
Channel: Gabriel Aguiar Prod.
Views: 41,112
Rating: undefined out of 5
Keywords: unity tutorial, unity effect, unity particle effects, unity game effects, unity vfx, visual effects tutorial, unity particle tutorial, vfx, unity, game dev, unity explosion, explosion, explosion tutorial, unity explosion tutorial, bomb, easy explosion, unity impact, unity quick explosion, impact, unity vfx graph explosion, vfx graph explosion, visual effect graph, particle effects, explosion particles, fast explosion, unity particle system, boom, quick explosion
Id: adgeiUNlajY
Channel Id: undefined
Length: 12min 33sec (753 seconds)
Published: Tue Jun 27 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.