Unity Shader Graph - Meteor VFX Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Are you using particles over distance? Your density seems too sparse.

👍︎︎ 1 👤︎︎ u/GagOnMacaque 📅︎︎ Apr 05 2019 🗫︎ replies

another great tutorial. blew my friend's mind that shader stuff is in unity now lol. big fan of your channel. keep it up! 🙏✨

👍︎︎ 1 👤︎︎ u/[deleted] 📅︎︎ Apr 05 2019 🗫︎ replies
Captions
what's going on guys welcome to tutorial where we are going to see how to create a meteor effect and respective impact as well we are going to use telegraph to develop a shader for the glowing meteor and then we will use some particle systems to complement the wall effect everything is a Velma page in page in case you aren't dressed in supporting me you will also get access to these effect and many more game effects and shaders go check it out it's really worth it anyway let's see how we can do this alright so let's start off by making the nice-looking shader we can create a PBR graph then rename it to meet your shader once in a graph we may start by adding a car property that will be the main color the base color basically and we can also add the main texture in case you guys want to use a texture in your meteor let's drag and drop the main texture and connect to the sample text to the spacebar to search it and we also want to multiply the sample texture with the main color just like this and we can now connect to the albedo input of the PPR master shader and in case you guys don't have a normal texture there's no problem with that since we can also create the normal map from this texture thanks to the normal from texture note and connected to the normal input and since we are here let's add a vector one so we can control the normal strength as well we want to connect it to the normal node just like these all right so this is the very basic step we can have a texture we have some color and also some normals and we can see this in action by creating a sphere for now and we can also create a material out of this shader applied the material to the sphere and we can add a stone or rock texture or simply changed color and by the way a medival for free in my patreon page a small package with this rock texture a smoke texture and a circle texture so you can follow along easily because that's the only things that we are not making the rest will be from scratch we want to make our meteor look like it's on fire look like it's really up and glowing but let's first add two vectors one for the metallic and one for the smoothness properties so we can control them in the inspector just in case you need it and yes connected respectively to the PBR master now for the glowing in the blaze part of our meteor we are going to use a Voronoi note and we also want to control the movement of the Voronoi and for that we are going to use a time note which we need to multiply with a vector2 that's going to be colored Voronoi speed with a default value of 0.1 in the X and 0 in the Y or maybe the opposite at least for now we only are missing the tiling and offset note so this can start moving and we can connect it to the UV input of the Voronoi node just like this let's also add another vector one so we can control the Voronoi scale with a default value of five maybe let me just collapse this and push the metallic and smoothness properties to the top okay so now we want to have control over the amount of Voronoi we want to use and for that we can create a power note which as you can see it will let us control the amount of dissolve and that's the value that we really want to control in this vector with a vector one and we can rename it to Voronoi dissolve with the default value of crete maybe cool looking nice now we also want to add color to this Voronoi so let's create the core property and call it Voronoi color and this time we want to switch it to HDR mode we can choose an orange color and increase the intensity let me move it around here let's go ahead and multiply the collar with the power note well at this point now we can replace the connection to the emission and save this so we can see how this is behaving in the inspector so this clearly needs to be brighter I'm going to increase the intensity of the Voronoi color just like this maybe increase the scale and dissolve as well anyway what really matters here is that if you take a closer look you can still see the pattern of the Voronoi and the Voronoi by its own it's kind of very static and we need to dissolve it with another noise and let's go back to the share graph and actually copy this tree note right here the tiling multiplied and this vector to you can also reconnect the time to the multiply like this and we don't want to use the Voronoi speed we actually want to create another vector to call it noise speed with a default value of minus 0.1 in the X and 0 at 1 in the Y at this part now so this tiling and offset is going to be connected to a simple models note with a scale of 25 and yes we are also going to control the output with a power node like we did before cool now we can interpolate with alert node between the Verena and these simple knives but we are going to connect the Voronoi to the B input and the simple noise to the T input this way the simple knives will influence the Voronoi and make it look like it's dissolving the Voronoi by the way let's also create the vector one call it noise dissolve that will control the power of the simple noise and like we did before we can also add another vector one to control the noise scale just like this now we can connect these left to the emission all right so it's looking more interesting but even if we increase the intensity we won't get that nice super art feeling we had before you know like it's a blaze so this means we are still missing something and the little trick that we are missing in this shader is the Fresnel effect it's just collapses and now add a vector one call it Fresno power with a default value of 1 and we can connect to the Fresnel effect now we can also add color to the Fresno effects so let's add a color property and call it Fresno color with a HDR mode so we can add a quite intense reddish orange something like this multiply the Fresno with the color and then we can add the Fresnel for not and also replaced the mission connection all right back to unity now we can increase the Fresnel color intensity to make this look really odd and glowy to make this look like it's a place you know it's a meteor that's coming into the atmosphere it has to look really hot I will let you see the final values when we are done not worry about that for now what man is that this is still a sphere and not even close to a meteor so now let's actually go and create a meteor which is fairly easy don't worry we can start with a cube in a 3d software I am using blender but if you are using maya or any other tree software you should probably be fine and you can follow along easily now with the cube selected let's go to the modifiers and add a subdivision surface which will basically subdivide the current polygons and we can set the view to two we are going to need another modifier the displace one which requires a texture we can press this new button to create a new texture and if we come here to the textures panel we can see the text that we just created and we want to set the type to noise now back to the modifiers panel we can decrease a bit the strength and you can see that this is already taking effect and I'm just going to change the shading mode to smooth all right and maybe add another level of subdivision which will require a lower strength to displace modifier it seems yeah it's looking good now let's add a new window for the UV maps and when you think this is good when you are pleased with the result we want to duplicate this meteor with shift D and let's press M to change it to another layer so we can have basically a backup now we can apply these modifiers to the one we have just duplicate it and we still have our original one with the modifiers in case you want to make changes of course so let's like the one with the modifier as applied and press tab to enter in edit mode and you will notice that we have these vertices with three edges just like this connecting to this one virtus and while holding shift and out we want to press with right click on this edge to select these segments just like this and we also want to do it again for these respective edges to with this selection we can press ctrl e and mark the seams for our UV maps and once we have this seams market we want to select everything with a and press u so we can select and wrap and in the end we want to have something very similar to this we want to have a new V map very similar to this one now let's rename this cube to meet your mine already was named it and then we can export it as an FBX and also make sure to choose selected objects turn this little icon for the scale and then select mesh down here at least that's my settings for export choose your project location and export this now back to unity we actually want to start by creating an empty game object and rename it to visual effects meaty or something like this the meaty re-imported we want to say that we don't want any materials or animations imported and we want to apply these changes and let's drag this under the empty game object that we had just created now we only need to drag the material we created earlier this one and it's looking really nice now we are getting much closer to a glowing meteor let's just create a prefab out of these like this year okay so now that we arrived at this point we can start creating the remaining elements of a meteor effect which is basically like some smoke some fire and some particles now in that free package that I included in the description you also find this smoke texture so let's create a material for that smoke texture I already have mine created and in case you don't find this shader you can always go to legacy shaders select particles and choose alpha Bennett just like this okay and now we can add a particle system right here and drag and drop that smoke material we just created let's turn on texture sheet animation and set 4x4 in the X&Y with a graph looking like this next we want to set the maximum particle size to at least three cool now let's make this loop of one second and the lifetime is going to be somewhere between 0.8 and 1.2 maybe less maybe more the start speed is going to be low something between 0.5 and 1.5 should be fine and for the size in my case I'm going to set it between 3 and 5 we also want to make the start rotation random between 360 and minus 360 because it will give a bigger range that's great now let's insert some really I values in the rate over time something between 40 and 50 maybe invar more at least for now we will see how this is behaving in a few moments and if I start moving this around you will notice that we don't have any smoke trail which means we need to set the simulation space to world and now we will leave some smoke behind as long as this is moving now let's turn on size of a lifetime and select this type of curve it will make the smoke shrink at the end you can test other curves obviously don't hesitate to test few things now I'm just going to rename this to smoke and apply the change to the prefab all right so at this point we want to start testing out the meteor is looking when it's falling from the sky and for that we need a very simple script to make the meteor go from one position in sky to a position in the ground so let's create a script that we can rename to spawn meteor script let's open it up and we don't need discipline function delete it what we need is a public game object called visual effects or VFX which is going to be for our mature and enemy the public transform for the start points and another public transform for the end point which we are going to assign in the inspector now in the start function we want to get the position of the start point transform just like this to a variable and then we can create a game object varial so we can instant ate our public visible effects this viral that we are going to assign in the inspector and we are going to instantiate it at the start position with a catonian dot identity and as a game object all right so now we need to get the end position just like this and we are going to need this variable so we can rotate our meteor towards the end point and this is easily done with a function that we can call rotate to which is going to rotate our object towards the end point and down here let's declare that function that is going to take an game object call it object and a vector3 called destination and what we want to do is get a vector with the direction between the destination and the object position which we can get by subtracting the destination with the object position this direction is going to enable us to create a rotation that will contain the correct rotation to apply to our object with quaternion dot luke rotation just like this now we only need to rotate our object to the correct rotation by using a lip which is an interpolation from A to B and a is going to be the object rotation not the position rotation sorry about that and B is going to be the correct rotation now this script is pretty much done but as you may have noticed this is not for the meteor this is for an empty game object that we are going to create and rename to meet your ground like this let me just place it around here and now inside it we want to create another empty game object which is going to be our start point and it's basically the point at which our meteor is going to spawn in the sky you can place it anywhere you want I'm gonna choose this position around here more or less that looks good all right so now we can add the script we just created to our meteor ground now we can add our meteor prefab to the visual effect variable for the start point it's going to be the start point we just created and the end point is going to be our meteor ground just like this let's also create a prefab out of this ground meteor alright so if you press it play right now nothing really special would happen we are still missing the part where we make the meteor move so let's create another script called projectile move let's open it up and the first thing we need is a public fault call it speed then we are also going to need a public impact prefab for later usage and we also need a private rigidbody variable that we are going to cache in the start function by saying get component rigidbody just like this the update function is going to be fixed at the update since we are going to use physics for the rigidbody and we don't want to skip a bit basically and here we will say that if the speed is different than zero and the rigid body is different than no and then we want to increment the position of the rigidbody make it move basically we transform that forward multiply it by open brackets speed multiplied by time dot Delta time and closed brackets all right so we can save this and go back to UT so you can see how things are going but first let's open up our meteor prefab so we can add this script we just created the projectile move and set the speed to 50 let's also add a rigidbody and turn off views gravity all right looking good let's test this out just make sure to turn off this meteor and leave the meteor ground on I'm gonna press pause and then play so we can see what happens and the first thing that happens is er being instantiated at the start position which is good now if I am past this our meteor will move exactly to the end point which is really cool of course we still need to trick smoke and add some fire but the meteor for now passes through the ground and keeps on going on forever so the next step is to add an on collision enter function to the project I'll move script around here yeah I got this auto fill thing of Visual Studio but you get the idea so in here we want to say that the speed is going to be zero as soon as it collides with something and then we want to destroy the game object that all this script basically the meteor and while we are here let's also take care of the impact effect that we are going to create later and let's check if the impact prefab is different than new if it is then let's pound it with descent yet by assigning it to a variable instant a to impact prefab and with position and with rotation as game object then destroying this game object after let's say five seconds however these paws and rut variables are not the claret and they are going to come from the contact points of the collisions so it's accentuate them up here where we can create a variable for contact point call it contact which is going to be equal to collision dot first contact of the contacts list and then let's look Claire that brought variable which is a quaternion and it's going to be equal to cut turning that from to rotation let's give it the vector treat dot up which is y-axis and then give it the normal of the first contact and the post variable is going to be a vector tree that it's going to be equal to basically the first contact position which is the point all right cool so that's it for the collision detection instantiating the impact effect which we are going to create later and then destroying the meteor now back to UT we only need to add the box Collider to a meteor ground prefab like this with a scale of 0.1 in the Y and something like 50 and the x and z axis just for the purpose of this tutorial you can make this bigger smaller depending on what you need obviously now save this as a prefab and let's not forget to also add a box Collider to our meteor with around 1.5 for the size at least in my case maybe less let's go ahead and test this alright alright so it's starting to get closer to what we want but there's room for improvements obviously anyway let's just make sure the meteor ground is closer to the actual ground alright so there's a few adjustments that we need to do like to do smoke and to the shader but I'm gonna do it mark towards the end of this video for now let's create an impact effect for when the meteor collides so like we did before let's create an empty game object and rename it to meet your impacts or meet your heat and let me just push it down and inside it let's create a particle system named beam which is going to be used to create a flash of light and we don't want any loop so 0.24 the start lifetime is enough and it's not going to move so we don't need any start speed and let's set the start size to around 10 at least now let's also pick an orange color similar to these and we don't need any rate over time because we are going to use a burst with one let's also turn off shape and let's use color over lifetime where it's going to go from full opacity to completely transparent and we want the size over a lifetime to go from big to small in a linear way just like this and if we test this and if you are in the I definition rather pipeline it will probably appear as pink and we will fix it let me just push this a bit up so let's actually go ahead and create a simple faded point of light in Photoshop or your image editing software something very simple with 500 by 500 pixels let's paint the background to black so we can see what we are doing and create a new layer control-shift-n and with brush tool selected let's choose the white for the color and I'd set the brush size to 250 with arnaz to 1 and we can click only one time somewhere close to the middle since we are going to align these by selecting these two layers pressing V and these align options will appear so let's align to the center just like this and that's it it's not we can add the black background and export as a PNG to unity once in unity we want to create a material out of this texture and and we need to assign the legacy shader call it particles additive which we will change in the moment dragan job the texture and let me put the material in its correct folder just like this and now let's assign this material to the beam I also set max particle size to at least three so as you can see it is not very bright it's actually quite dim we have two options here either we increase the burst number in the emission which will work but it will create a few more particles that we don't necessarily need because if you use it a shader with HDR calls we would only need one particle and we will make it as bright as we want and it's fairly quick and easy to create that shader so let's create an unlit graph its unlit not PBR and rename it to particle additive and ask our HDR I'm gonna put tooth so it doesn't conflict with the existing shader that I already have open these in shadowgraph and the first thing we can do is switch the surface to transparent and the blend mode is going to be additive and we can turn on two-sided next we can add the only two and most important properties of this shell which is the color that we are going to switch to HDR mode and choose a white for the default value with a full opacity by the way and we need the texture 2d which is going to be our main text let's create a sample.txt to 2d I multiplied the main text with the color now we want to split these values so we can have access to the Alpha and the RGB channels and then we can create a vector tree only with our G and B just like these and now we need the vertex color node so we can control the color with our particle system it's very important to create this vertex color node and we also need to split this node so we can get access to the RGB channels we also need to create a vector tree like we did before and now we can multiply both of these vector trees and then connect it to the color input of the unlit master however we feel need to multiply both of the alphas like these and connect it to the alpha of the unlit master and we are done with this shale so let's save this and add back to it so you can switch the shader of our beam material with this one we created which is probably inside the shader graph drop down menu let's just reassign the beam Dexter oh and in my case turn up the Alpha values to the maximum now we can decrease our account in the birth to only one and let's increase the intensity to around three or four and now it looks much nicer and we have this cool glow which is awesome now we can proceed to create another particle system and call it particles impact which are going to act as sparks let's rotate it - 90 degrees in the x-axis let's come down here and assign our beam material to these particles set max particle size to 3 and switch the mode to stretch at billboard with a speed scale offer around 0.01 so it stretches our particles let's turn off looping and set the start lifetime to be between 0.6 and 1.8 the start speed is going to be really quick something between 5 and 25 really fast and the particles are going to be really small between 0.05 and maybe 0.3 a bit less maybe I'm gonna choose an orange color for the minimum and for the max maybe a reddish orange something close to this the mission we don't want to rate over time we want a burst between 25 and 35 in the shape we want a call with an angle of around 80 maybe less and I'm gonna make these particles specially go up a lot with velocity over lifetime and set the space to roll don't forget that so we can set the value between 1 & 8 in the y-axis the color of a lifetime is going to be from full or packed completely transparent like we did before and the size of a lifetime it's going to go from big to small and let's see how that is looking so it's looking really nice we got some cool sparks going on here guys with HDR college looks really bright if you want you can increase the intensity of the beam material and the Beeman particles look really cool together however we are still missing a few things but no problem with that let's just save this as a prefab let's add some smoke to the impact by creating a new particle system and renaming it to smoke and rotate it - 90 degrees in the x axis so it faces up turn off the loop set to that lifetime to be between 0.8 and 1 the start speed is going to be mildly fast and consistent something between 4.5 and 5 the start size can be between three and five let's make it also random between 360 and minus three six to have a bigger range now for the color we want a light grey and then we want a dark brown color similar to this you can play with these values of course in fact you can play with all the values I recommend you test it and we also want to lower the opacity on both colors something like this for the image we want between 50 and 60 particles in a single burst maybe it's to match depends in if it depends if you are developing for mobile this is just a tutorial for educational purpose so 50 and 60 particles to make it look good on the shape we want to say it's a circle with two for the radius and around 0.2 for the radius thickness so it doesn't emit from the center we want to turn on velocity of a lifetime and select world in space drop down new so we can make the smoke go up just a little bit somewhere between 0.1 and 0.3 in the y-axis gaurav a lifetime is similar to what we did before inside it's going to be this curve from small to big finally let's also add some rotation of life time between 45 and minus 45 this is smoke so let's assign the smoke material always set max particle size to three or bigger by the way and let's turn on texture sheet animation with four by four and voila smoke impact is looking good and it adds a really nice detail I'm just going to decrease the radius thickness a bit maybe all right looking good looking really nice let's apply this change to the prefab let's parent the particles impact and smoke circle to the beam so we can easily see how everything is going on any starting to look really nice I'm just gonna push the smoke a little bit up so it doesn't detect with the ground now let's also another particle system for the debrief with again my ninety degrees in the x axis for the rotation turn off looping lifetime is going to be between two and five and start speed between three and ten we want some of them to go fast but not as fast as the sparks we actually need 3d start size between twenty and seven in the Y and z-axis at least for me I always try to play with the values guys see what you like see what fits best your project rotation is random between 360 and minus 360 and let's add a burst between 12 and 17 shape is a cone with 44 the angle or a bit more and 1.5 for the radius and I'm gonna push this a bit down and we need size over lifetime this curve from big small progressively in the rather we want to choose mesh for the random mode and we will reuse the mesh we created for the meteor these one let's just create a very basic material you can obviously create a more complex material but for the sake of this tutorial I'm just going to choose the same color of the ground and creased smoothness to zero I'm gonna apply this material the breeze just like this and there's the breeze flying everywhere which means we need to use the gravity you said it one all right cool we only need the collision model now set the type to world and the dampening the bounce to 0.5 and in my case the collision radius of the debris z' is way too big so I'm going to decrease 0.1 maybe they are still too big make sure they are not bigger than then some of the debris x' something like this yeah much better let me just add the visualize bounds of the collision all right so now it looks really cool this is another fine detail to our impact let's save the prefab and apply all the changes and now if we come here to the meteor prefab and if we enter the prefab we can assign the impact we just made so we can see how it's looking and yes it's looking quite interesting actually we are going in the right direction however there are still a few things that really annoy me like for example the smoke trail of the meteor it disappears immediately because we are also destroying the meteor as soon as it hits the ground or as soon as it hits with something to fix this we can come here to the project on move script and we want to add the public list of game objects colored trails whoever will add only particle systems and down here in on collision enter before we destroy we want to say that if the trails count is bigger than zero basically if there's something in list we want to iterate with a for loop through all the elements with tray list everyone - and parents so it doesn't get destroyed with the game object and then we want to cast the particle system to a variable and if the particle system is different then no let me want to stop the particle system from emitting and then destroyed particle system game object with the delay that is going to be the main duration of the particle system plus the maximum start lifetime so let's save this Oh when sorry do this int I equal to 0 not equal to I and let's save this back to unity we want to go to our meteor prefab and add the smoked to the trails list just like this now if we test this we will see that the meteor is being destroyed but the smoke is left behind until it disappears and only then it will get strike which is good which is what we wanted and it looks much better much more realistic and well at this point we can go ahead and quickly create a simple crate for the meteor impacts nothing too fancy so let's go to our 3d software I'm using blender and let's go create a cylinder with 16 vertices scale it now in Z and I can scale it up the wolf Inc in edit mode we want to delete the bottom face and let's shrink this again in Z and also shrink the upper part so it looks like a cone something like this next bit control are we want to add a ring around here and then scale up the base of our crater then we want to extrude this face and move it down like this and also shrinked a little bit so it starts looking like a hole more or less like this now let's go to the modifiers and add a subdivision surface and let's also add a displace modifier where we will create the new texture in this button let's go to the textures panel and then we want to choose a Voronoi in the drop-down menu where we also change the size down here to 0.45 now back to the my files panel we want to descries the strength of the displace to around 0.2 which looks much better and let's also apply the smooth shading in here and here we go we have a nice great for our meteor impacts I'm just going to make a bit bigger at the bottom like this and yeah now we are ready to create the UV maps which we only need to select everything with a and press you to select unwrap let's just rename this to crater and export as an FBX where we want to turn on to objects and turn on this button near the scale and select mesh down here choose your project folder and export it once in unity let's say we don't want to import materials Nora animation and then press apply ok so now we are ready to create another particle system call it crater with no loop and we our lifetime of 10 and no start speed we are going to use 3d start size with 20 in the X&Y and 5 in Z turn on 3d start rotational rotate 90 degrees in the X set one in the flip rotation 2 and we don't need shape set the rate over time to 0 and let's add only one burst now let's switch the render mode to mesh and you can select the crater we just created and we can also assign the debrief material like this nothing really happens because if we get closer we will notice that the crater is really small that's because we need to select the crater mesh and we can set the scale factor to ten at least for me it really depends on size you have created the original crater and this is pointing towards the camera because we need to change the render alignment to local instead of view alright alright that's better let me just increase the Z value to around ten and then push the wall effect until the crate is intersecting the ground just like these yeah now it looks much better let's apply this change to the prefab and let's go ahead and duplicate the crater and rename it to meteor which we only need to basically change the 3d start size to around 120 in the X and 80 in the Y & Z and down here we want to apply the meteor mesh to the renderer just like this and maybe the meteor is too big or maybe we can increase the size of the crater which yes something like this 25 which actually should be bigger but anyway and maybe also a bit in z-axis too all right so now let's add a few more details to the impact it's cool but there's not much happening yet but we are getting closer to what we want for example we can duplicate the breeze to create some meteor the breeze and the only difference is going to be the material which we are going to switch to the meteor material just like this and it looks like the meteor has saturated himself in two pieces all right so the next one is also very simple and this time we can duplicate the particles impact so we can create some particles floating which they are going to have a longer lifetime between 0.8 and 2.6 and are going to be slower between 0.5 and 1.5 more or less increase a bit minimum start size and turn off gravity since we want to see them float and in the mission we only want to add rate over time of around 50 the shape radius is around 1.5 and the velocity of a lifetime is smaller in the y-axis something between 0.5 and 1 and we can leave the color and the size of a lifetime as it is now we need to turn on noise so they can move more randomly and we to set this trend to be between 0.2 and 1.2 and we also need to increase the size or the frequency to 0.8 which should be fine and let's add a tiny amount in scroll speed and here we go quick way of creating some embers floating which is really looking good just push them a little bit up like this yeah and one more thing we can quickly add is some smoke floating in the middle as well so let's duplicate the smoke circle and rename it to smoke floating and the first difference is that this one is going to have a duration of one second like the particles floating but you can increase this by the way to have a bigger aftermath and start life time is already at the limit of the texture but we can still increase to 0.9 and 1.3 more or less the start speed is going to be lower between 1.5 and 2 and the size and the color can stay that way however in the emission we want to add rate over time to around 30 and the burst is going to be lower only between 10 and 15 and this time the shape is going to be a cone instead of a circle and we can increase the angle to 50 and the radius to around 1 we can also leave the velocity the color and the size and the rotation of a lifetime as they are they are fine let's test this out and yeah it keeps a nice touch you can increase the start lifetime if you want but it's starting to look much better let's just increase the size of the beam to around 18 I have noticed it's small and the size of the particles impacts can be a bit bigger to a maximum of 0.6 maybe and the last thing we can easily add is another particle system for the shock wave and we can create a new material and we can also use the particles additive shader we created earlier and now we can use that circle texture that comes in the package they have liquid in the description and assigned this circle to the texture slot of the material and max out the Alpha values to let's assign it to the shockwave and set the max particle size to three at least and we can rotate 90 degrees in the x axis and move it - 0.6 in the y axis we don't want this to loop the start lifetime can be 0.6 and we don't want start speed the start size is something really big like 50 we can choose an arranged color and in the mission rate of a time is zero because we want one in the burst there is no shape and the color of a lifetime which is going to go from full back to transplant but we also want this key color to be black and move the white key to around here let's just turn on size of a lifetime that curve is okay like that and let's set the render alignment to local all right it's looking almost good we just need to decrease the Alpha of the start color and that's it it's looking really cool let's see how this is looking by the way just don't forget to apply the changes to the prefab and yet looking really interesting quite interesting already we are almost done actually there's a lot of things happening really cool we just need to make some more adjustments to the meteor like add some fire for example but first let's increase the rate over time of the smoke since the meteor is moving really fast and we need a rate over time of between 50 and 70 maybe even more it really depends on how fast you make it move let's also increase the start life time a little bit and the speed to of the smoke yeah alright so now for the fire it's going to be really simple we are going to duplicate the material of the smoke and change the shader to the particles additive HDR that we created earlier and assign the smoke texture set the alpha to the maximum yeah just like this and now let's come here and duplicate the smoke and rename it to fire that's applied material we just created and now the trick is to set the start color to a lighter orange and to a reddish orange something similar to this you can play around with these values then we want to decrease the start lifetime to around 0.4 and 0.8 and start speed is lower to 0.5 and 1 the size is smaller 2.5 and 4 and now the amazing part is that if we come down here and increase the intensity our material will start to look like flames like some fire burning it has this really cool feeling and maybe 7 intensity is a good value yeah it's looking really interesting let's just turn on color of a lifetime and basically at the end we don't want to fool transparency like we have done before we just want to make it almost transparent and let's push this key to around here and I really like to give the last color key a reddish filling not fully read but close all right it's looking really cool let's just add the flames to the trails list so it doesn't get destroyed with a meteor and if we tested these right now we would see that it looking really nice but if you take a closer look the flames sometimes are behind the smoke and if we are fine with that you can leave as it is but if you don't like it you can change the order in layer and set it to one and the flames will appear in front of the smoke always all right so we are almost done guys now we can add some Amber's to the meteor but it's really simple since we can duplicate the particles floating from the meteor eat just like this reset the location and now we can say we want these to loop we can turn off velocity of a lifetime and the shape can be a sphere with a radius of one in the emission we want zero for the burst and around 80 for the rate over lifetime all right they are looking really interesting really cool stuff nice nice let's just change the simulation space to brawl and also set the ordained layer to 1 now we only need to add these particles to do trails like we did before so they don't get this try it and apply the chance to the prefab and now we are good to go give it a try and yeah I think it looks really awesome I really like the outcome of this tutorial we could keep on adding more and more details but I think that we have come to a really good point where you can start making your own changes and adding your personal touch for example I personally add a little bit of fire after the impact and made the smoke emits a bit longer but that's basically it guys this Turrell is already in normals and like I said we could keep on adding stuff like we could add a flare a camera shake maybe some post-processing effects to more the breeze around the crater and the fading glow meteor and perhaps and could keep going on but it also really depends where or what you are trying to achieve with this material where you are going to apply the meteor or if it's just for academic purposes but anyway I hope you have enjoyed this tutorial if you are able to support me in my patreon page I would appreciate a lot it means really a lot and you can get access to amazing visual effects package and shaders anyway thanks to all the patrons that supported me so far you guys are amazing and I want to say a special thanks to the super mega patrons that are the biggest supporters of this channel which are Ben Meyers bill dear Carl's guides Kristen mercy No blimp lag James Finland drew Amidala party time Stephen Chung steeper Tavita Trey Klein and ex game dev and I'm sorry if I pronounced in any of your names wrong you guys are awesome you guys are the super Megatron's so thanks for watching guys and see you in the next video
Info
Channel: Gabriel Aguiar Prod.
Views: 58,781
Rating: undefined out of 5
Keywords: Unity tutorial, unity effects, unity special effects, game effects, unity particle system, unity game effect, unity spell, unity fireball, unity projectile, spell effect, unity impact, unity shader graph tutorial, unity shader graph, shader graph, shader graph tutorial, unity shader tutorial, unity shaders, unity meteor, meteor effect, unity vfx graph, unity comet, meteor tutorial, unity meteor effect, unity explosion, shader graph explosion, unity shader graph glow
Id: YNHw4-DEpzE
Channel Id: undefined
Length: 52min 46sec (3166 seconds)
Published: Thu Apr 04 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.