Level Up your particle system with visual shader | Godot 4.1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
and so welcome back to another tutorial it's been a while so in this tutorial I'm going to show you how to make a better particle effect with one simple trick it's called UV scrolling so it gives more life to your singular particle but I'm gonna explain that more later so right I'm using Godot 4.0.2 so if you're following with uh Godot 3.5 then you might find some differences here and there so let's just get started oh and also one more thing that it also works not only for 3D is uh which is mainly what I will demonstrate but also it worked for 2D particle systems you might see on the screen at the moment all right let's just go ahead and jump into creating the particle itself so we are here in the fresh scene I'm just going to create a 3D scene over here and then I'm gonna add a mesh well I think I'm gonna show you the basic particle system uh navigation or yeah the system itself so create a GPU particles 3D and then let's add a new particle process material click on that and nothing really happened yet why because we haven't assigned any drawing passes here any drawing paths now let's create a new Quad mesh there you go now it spits out like that basic plain mesh with minimum vertices now let's just play around with the physics system to make it look a little bit more like how should I say fire right so fire usually goes up not go down all right and then let's scale it I'll make a curve here and then adjust the curved size or the Curve the curve what am I saying okay so I start from small and then go in big so like that okay let's assign a new material let's go to Geometry material override and then click new Shader material we are going to create a basic material for this one so yes Shader news new Shader and then click on visual Shader for sure that's my weapon of choice can't really write Shader I don't like it so VFX so let's save it on Shader over here and oh I have basic material but I'm gonna create uh from scratch so basic material two I think to separated it right we have that let's click click on create and we have that click on the Shader basic material there and let's make it a little bit bigger let's assign like texture so we have something to show here texture 2D parameters and then call this one it's just the main mixture let's add oops let's add oh that's Bender uh what is it uh reflex right there main texture and then let's add a texture to the this is a sampler for the texture parameters connect sampler 2D to the sample to the port but you might get this uh error and then you ask change the input I think to sample port click on it okay there's some bug sample part there you go and then connect it to the Albedo Albedo Albedo I still don't know how to pronounce that specific word and right I have oops I have a texture on my folder here like flame 04 let's go then click uh drag it right there right it has blue it's not blue what am I saying like black um Alpha the black alpha but black Square there so we just click the color and then hit Alpha there and I think we need lighting to make it a little bit lighter or brighter rather so there you go we have that let's get it out of the way can we just now we cannot turn that off anyway so we have that you know you can always play around oh one more thing that particle usually will always face the camera you know this is the problem when you rotate the camera will look flat which that's not what I wanted but if that's what you wanted then leave it be but I want the particle to face uh the camera all the time so get or go to the vertices the vertex Shader option and then go get the gout billboard metrics node and then click on that right uh it's okay to set this billboard type enabled enabled but I want to change it to particle because we're dealing with particle right and as you might notice the scale now is not applied so you just click on the keep scale right there anyway so now we're always facing the what is it the camera and sometimes let's say if you not disable but enable here uh why set two particles matter because when you are dealing with the process material of the particle system then you try to use the angle over here it will not rotate as you might see it's still the same right but if you change to particle now it rotates which that's what I wanted so maybe just minus 180 and 180 on the angel angel and the angle mask Max right so there you have it and that was a little bit randomized which is good and also you might notice like the the frame rate on this one is a little bit like slower than it should or lower than it should then you can go to the time drop down menu and then set this one to 60. now it will look smooth uh yeah right oh one more thing maybe if you want to set the color here and it doesn't change the color of the particle because you haven't multiplied the the original texture with the input color and fragment nodes here input in the fragment Shader with the color note that's what I'm trying to say and then we hit multiply where is it factor four there you go just connect okay here and also there now it will fade or tint it accordingly to the gradient that you have over here it looks pretty good I guess if that's what you wanted but again I think I want to improve upon the fire itself like giving it more life you know so we can do that by giving a secondary motion into the singular particle itself so we are going to do that by adding a noise textures and then noise textures only one and add a UV scrolling into the noise texture itself so I think I'm just gonna maybe save the particle system here and then save VFX I think this there is fine and call it like fire particle system it saves there then let's start from scratch right so we have okay safety scene as well all right uh basic particle all right so let's go ahead and create a new material here uh not new material but new particle system so create a new particle system again and then let's add a process material or maybe just use the fire particle system and drag it over there so we don't really have to uh what is it created from scratch new Quad mesh so it's the same but now we are going to improve upon the basic material here so let's go ahead and take our basic material to the geometry create new Shader material and then drag that to our Shader option right there and then we'll make it unique so we have uh what is it comparison you know make unique this one or recursive I don't know what's the difference maybe if you know a little bit leave something in a comment explaining what's it what's the difference between the make unique and make unique recursive because I don't know if that's affect any performance or not but anyway let's just go with make unique so right okay it says it is unsaved maybe it's better for us to save okay go to VFX and then row assets raw assets and then Shader um material I don't know maybe UV scroll too because I already did the UV scrolling for the example in the opening hit save all right so we need to assign a texture to the texture parameter there click on flame 4 and then see this what all right again I think we need to add the light to the scene where is it there you go directional light and then just do whatever with it maybe like oh go ahead go away we're going to tweak the material so of course we are going to need assembler textured sampler texture sampler in this case and we're going to add or name this one is noise texture and then let's just disconnect the alpha for a moment let's add a node a multiplying node for this one multiply here we go so we are going to multiply the main texture with the noise texture right so at the moment is there is no assigned texture to the noise texture we are going to add that noise texture is empty there so I add like this fire noise that I have so okay now I have the alpha there nothing really happened but if we see like make it clear for example you might see the difference right that's previously with only one or the main texture without the noise texture and this one is after adding the fire texture right so like I told you we are going to add a secondary motion we can do that by scrolling the UV so we can add a UV panning node let's connect that with the UV right and then add UV input where are you there you go click on this one and then we add a vectric two parameters to scroll our UV and maybe call this one [Music] noise scroll I'm not so sure with the naming you can do whatever you want so this is go to the offset so what it does so if we like crank this up you can see there is a secondary movement but we need to do it manually by our Mouse you know that's not what we want so we need to use like or we need to optimize it uh in the Shader itself it gives like a secondary motion to the particle we're going to do that automatically by adding a Time node time node and then multiply that time node with the noise scroll uh you can do it in reverse or switch it's okay I think there's not much different right nothing really happened because we haven't assigned any uh how should I say the speed of the scroll itself so like one is going to be faster or minus one of it goes up right or 0.5 is also good or minus 0.5 so this is without a scroll is this like that and this one is with a scroll right so it gives more movement to the particle system itself uh that's for the uv's scrolling and of course you can also like scale the UV of the I'm going to add another multiply let's go do you scale the UV of the noise texture by multiplying excuse me not that one um Vector two multiplying that uh the multiplying the UV map the UV input rather with some parameters so let's add another parameters vector vector vector two parameters uh name this one UV scale [Music] let's be more specific noise UV scale right and maybe China develop default default value like one yes right you can like make it bigger or smaller it's all up to you usually bigger will have a noisier texture or noisier flame texture there you go a lot more detail and a lot more individual uh I don't know polls here and there but I'm Gonna Keep it to one there you go so we give some life to this one then another adjustment that you can make is add a contrast kind of so we multiply again the the final color so in this case I think this one yay the final multiplication here and we add a float parameters and call this one contrast right okay so let me just have the default value to one right what this does is like give it contrast basically if you want it to make like a brighter fire than you assign the contrast like high but as you might see there is you should not set it too high because you're gonna have to get this error you know so let me just set it to two only 1.5 so depends on what you need you can also play around with the modes here like the blend mode you can mix or add usually add will look better but some cases maybe just leave it to mix right okay so we have this particle material at the moment and a particle material particle system at the moment but it's a little it looks a little bit different than this one why because first of all the number of the particle is different so I set like to 20 or something over there and also I have like a Sparks a particle system there so I think just gotta duplicate this one and then process material and make this one unique as well and I will assign uh different material for the geometry in this case so click on that one also make unique and then check on the Shader parameters now let's go to our texture and Spark group I have this texture right so now I add that so it looks pretty similar but not the same because it's sometimes hard to what is it to replicate the exact same uh particle system I really like mingle or not mingle why am I keep saying like just play around with the settings here and there there you go so it's uh the spark plug live longer than the fire the main fire and maybe like set the scale and uh let's fade it out like really really fade it out there you go um maybe you turn up the damping here like three oh yeah that's good so save it don't forget so yeah we just save it and I think it's gonna delete this one and we're going to test it on our VFX test scene why is it important because we have that chest scene has a different uh settings for like World environment the lighting and stuff so close this one and don't forget to save I already saved saved it to my directory or VFX packed and particle system and yeah I already added it to the uh VFX test scene you can actually just drag it over here and then you know set the location and stuff as you might see maybe something a little bit different here because the layers for some reason I set it to two uh and I don't know is that going to affect anything but yeah maybe go to the particle system and set this layer also to two this one also did two all right save it go back here nothing really changing though so it doesn't really affect anything I was wrong now as much it has a different colors like the glows and stuff and while the recently made particle doesn't have that because I made some adjustment in the particle system that I created earlier or before I started the tutorial rather uh let's take a look at the yeah for example like in this case like the color is different right I make like the color Ram different color than the one that I made and also in the UVS curl texture here wow it's like a messy tangling tangling whatever it is tangling nodes but it's actually just the same where we have like our main texture scrolling here and then the things that are a little bit different is that I assign some notes to be uh into the assign a node to the admission Port right so that's what make it a little bit different so we can also do that uh go to our particle system here or we just now we can just open this one UV scroll too right I'm going to use add a node Vector 4 and then click this one and then click this one again and then go to emission it should make it Glow but of course we want to make a adjustment you know to our glow we don't want that to be like unadjustable so we need to add a float parameters and call this one emissions strength I just Str I think that suffice then let's multiply that to our node maybe Vector 4 here and make it a little bit there you go nothing really happened because we haven't assign our uh oh I should maybe just edit edit edit edit it editable children right go to geometry and then this one and set the admission strength I cannot edit that what the hell all right so I need to do it this way emission strength to two maybe 10 right that's for the spark oh that's too bright maybe five for the spark and this one where is the shredder parameters only to five now it's too bright three two I don't know let's just make some adjustment that's what I'm trying to say there you go so we have that and if we want to try to make it the same as the preview there we need to adjust the color uh uh gradient here so it's kind of the same and so there you go we have our fire particle system with improved animation um yeah before I let you go I'm gonna give you a bit of a reference you know there is a good talk from uh Diablo VFX artist I think his name is Julian love you can check it out and just click on the link below in the description and also one more good resource for you to download textures and tutorials also is from Simon shrite I hope I pronounce his name correctly he is really good at what he does and it's I think it's good for you guys if you are interested in more VFX Deep dive into creating shaders or creating stylized free effects or VFX for games in general just give it a give it a try give it a browse you know it's really really useful so with that being said thank you so much for watching Until the End hope you guys enjoyed the tutorial don't forget to like subscribe and all that jazz thank you so much once again see you on the next tutorial I'm going to show you how to make this on to the particle system so yeah bye
Info
Channel: LittleStryker
Views: 9,448
Rating: undefined out of 5
Keywords: godot game engine, godot visual shader, particle system, game vfx, game developement, indie game
Id: yLxYzI4oMMU
Channel Id: undefined
Length: 21min 24sec (1284 seconds)
Published: Sun Apr 30 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.