Unity VFX Tutorials - 03 - Basics (Projectile)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
a driver one and welcome to my new video today we are gonna learn how to make a simple projectile in unity so it's not going to be anything too hard it's going to be very simple once again we are going to see how to make one from the very basics so as I say all the time if you already know a lot about unity you might want to keep this one again if you don't see I reckon to watch the whole video and if you want you can leave some feedback and some comments okay so let's get to it today we are going to see how to make a simple animation and how to create simple trails and worlds particles in unity so you just right-click and you select create empty so this is what it says it's an empty object it has nothing in it just transform well let's put it here at 5y okay so it's just an empty object what we are going to do is rename it project an and in this window animation if you don't have it click in window animation here on for six I'm just going to click on create let's create a new animation over the f1 I'm gonna raise it project a zero one and all we're gonna do now is just to activate the automatic key creation order record button and but it let's put it here - then I'll show you why in a bit and now click on this one okay so when you click on this one it says okay now all the modifications I make on this subject are gonna be recorded on my timeline which is here so what you're gonna do is just click on add property transform position so now we're going to modify the position of our project I'll and at one second whether that put it all the way here at then so you can see if you crack the timeline that product is moving if you want more position you can put on curves click on F to see all the curves and you can see here the curve of the projectile we are going to add some more motion to it by clicking on post engine oh right Trenton free and add some motion to it right click flat for this one so it's going to be very fast active at the beginning and slow at the end you can see here it spills down if you click Play that's what your project is gonna do maybe a less that we can actually see the effect or like this okay that's better now click this one again to exit the animation but okay so we have our protector but there is still nothing in it so I am going to teach you how to make a simple trade for this one so right click create empty rename in the tray and add component I already have it here but if you don't have it just type in tray and click on join render this is the very basic trail renderer for unity there is a very good plugin that I'll show you it is very good trace here and type better trips this one it's not very expensive I did they do very very very good trace so if you don't want to just be stuck with this one I really recommend this one let let's just use the basic one it's enough for what we need here so I don't want it to cast any shadows so enough money to receive shadows okay so what is a train a train when you move a trail it generates geometry automatically as you can see here I move the trail and it creates geometry it's valuates pink because there is no material attached to it yet that I can reset it okay so now we need a material for this one so weak on material and you see not so let's create one we're gonna just use the same kind of material we used last time so you can just duplicate one and I'm going to need trail 0 1 and now let's test how it looks like with this one that's how it looks well you can see the texture is stretched along the whole trip here so we're gonna take advantage of this to create a nice texture and I remember the orientation of very textures so if I make a mistake sorry I correct it in just a second so let's just do a very simple one this is do something goes like this fill it with white and that's it three two one and let's put it here what and of course that's the opposite so just do this and overwrite it take this one here okay that's the right one of course it's way too long so we're going to just to change the time here and let's say the time will be I don't know point now when we wants it the ways is the start this is how wide the trade is going to be at the top with project ID so here let's say I want it to be maybe one two five oh one two five and here maybe dot five maybe Atticus twenty five now you can change your colors too so let's just think of these as a gradient and you have your first point here so second third and so on let's say I want the top to be white that's fine I want the rest to be a bit sian then a bit more bluish place then a bit stronger and like this let's try but I can totally try it yet because I need to create a script to play the animation in the game so how am I gonna do this I need to create a script I already have it here so I'm gonna show it to you in a moment okay another now rewrite all of this because it's very simple I'm just gonna explain it line by line I just want this game object to be activated so that it automatically plays the animation so I just take the reference of the game object as you can see here main project type then I want to know what particle system is in it so I have this one but first and that's about system and then I'd the name of variable then in the update function I say when I press when the key space is up i activate my game object main project egg so main predictor that's attractive true and when this particle system is not alive I set it to false so once the effect is over it just resets the whole effect so I'll show you how it works here I just have to create a new empty object let's call it the monitor let's just drag and drop the script on it now it wants to know what's the main protector and what's the main particle system so I click the project ID and I don't have a battle systems yet so let's create one particle system let's just say Spock's so I'm going to show you how to make words particle systems so like this you just have to say the simulation space in word I don't want it to load I want it to be like one second the situation set here and a lifetime that's that's way too much so let's say maybe eight start speed zero and the shape let's say I want them to be a sphere point one so this place that's what it looks like but they are way to be so it's same dot one dot two way do the rest later just to show you so let's go back to manager sparks here and let's test of course I don't have any cameras here so it's great one new write fake camera here so I know the animation is going to be that way so I have to rotate the camera like this like this and I think maybe that poops ladies and that's not okay expert is here minus 90 zero and 55 maybe like this okay and you can see it's already place and you have a nice thread there let's put the come up here okay so I have this here thing I don't want it to look and I want it to be activated at first because I activated it manually and safe never forget to save your projects because unit is a very good program it's very stable but sometimes it's it crashes so you don't want it to crash when you do not save and here you have your effect so it wasn't be too far so I'm just going to sit that here here okay well too fast again let you see how oops a here yeah and then I have my camera and the Kansas City this is going to be a lot easier take the gizmo on low car and put the car away be okay so that you have before fix this in the cameras fringe okay and now let's test again and that's more like it okay that's a good beginning now let's modify the trade a bit the project is ready flats on the end so let's say your image here is stretched all the way because that's how it looks like in the game that's how your choice is going to look like so what I'm going to do is just say okay I want this trailer to have some kind of round bit here so I'm just going to add some white around it something I'm not going to be very precise already but that's something along this way just add layer filters black and duplicate it ctrl T to transform it and in horizontal - 100 and do the same here okay now just sighs okay so that's what it should look like so it's fine for me though quite is still good so I don't care about it and let's try again that's already better I think it's just way to be here - point I don't know why we say - 90 yeah that's more like it okay now I think it lasts a bit too long points twenty five point zero five here I think a predictor is supposed to be faster most of the time so let's say I want it to last maybe 45 five 45 frames then the sparks I want them to last okay lifetimes a bit too big to point so up okay that's somewhere ohristmas always activate this when you modify your particle systems that are within an animation because if you don't then they're gonna modify these and create key frames for this I'm someone that here so just delete this one and okay so now that this and spawn more atoms fifty and just let's say a one color over lifetime and welcome to fade like this the white at the beginning and then blowww ish and then completely blue at the end maybe a bit pink either purple like this and add a small start color and activate this save and play + space okay that's already a good-looking project out here I want a bit more spunk stone and I want to rent on to it I want the rate to vary it between let's say 30 and maybe 200 I want the pants to be a bit bigger and I'm going to show you how to make better looking spells for project just activity any inherit velocity so is going to do it's going to take the velocity of the object and apply it to the particles so let's see a particle your object moves forward the particles will move forward - so we can do just I'll show you if you put one to this and you play it but goes follows just that if I wait and when it stops it keeps moving forward because it's like some kind of inertia force to it I don't want them to move forward all the time so what we're going to do is just take this and add curve to it so at the beginning they have their initial speed from the objects but then what's going to be its own dampen I guess it's cord so at the particle slow down once they are spawned so just a curve like this should be okay so let's test and space and of course I made the same mistake again and as you can see here zero is here and I put them way down here so they take the opposite speed so they go backwards I don't really want that so you can either try to figure here and put it on zero or right-click on it edit key type zero and the value enter and pay again yeah here you can see particles are moving and it's all good now I think the trail is stopping a bit too abruptly here I don't really like that so first of all I'm going to take those two black spots remain here I'm gonna make them bigger like this as you can see it of course the clarity is detailed so I'm gonna make them again let's just say okay what can I do it's a bit in a cleaner way so just do this maybe even just the two will be enough delete this and just do this okay control shift I to inverse the selection and fill it with black now this has been filled respect to so just elated okay and that should be good okay so first of all it's this again and that's already better but now that's not enough add some black parts to it I want to fade at the end I want two spikes to fade so I'm just gonna paint it black over it the blacker it is the more the faster it will fade okay delete the front that stays white and let's say I want this to never fade I want this to be always white and powerful like this and let's say I want some broth with some globe OOP sorry I went a bit to pass again ctrl a ctrl shift C control V / motion blur then Excel is a bit much 8 pixels and click on light or screen ah I think I don't we do just right maybe not it's fine notice and let's test if I don't have any values on the edges and I do here so what I'm going to do is just take this one and this as you can see here I don't have anybody here I have something like maybe add so Brewer more and that should be fine okay save this but of course I have to very sharp edge here but tapping is going to be fine let's just test like this okay play again space another 30 see the globe as much and I think it's fine that way already like the central spice to it but now as you can see it still doesn't fade it's still very sharp and I don't try right at but what I'm going to do is add a new property and then I go into trade trade renderer and I'm gonna change the glow intensity here so I want it to fade at the end so I'm going to add a new key and put it here to zero now let's go to the curves F and you can see here it goes too high I don't really want that so click on this one flat and that way it's always right like this okay let's test and that's it it goes off pretty smoothly ticket C is just fine now maybe the sparks stay a bit too long so minus 0.5 175 here and a bit too big let's reduce them and maybe we can use some stretch billboard again here zero ended up maybe minus 0.5 here and in the speed point one let's just how it looks like and yes you can see here the sparser bit but I'd rather you can scale up that's good okay you can see here the space gets a bit elongated when they are spawned and that's very nice so what I'm gonna do I'm gonna make them a bit bigger three and here it's smaller so that's the speed takes more importance and let's stir again and that's nice put it back to one maybe that's a bit too much one two and maybe here that's a bit too much here point fifty five point fifteen three and next time let's add some random to it point three point six okay birthday I think says to think are a bit too big so let's reduce them to getting buddies okay hmm okay I think that's fine for now it's this again yes that's nice now let's add a small glow to do beginning of the project I'll here so I am just gonna take this is an example I want this to follow the same kind of curve so we're going to me at the net when you document try to invert control-shift-n new layer and I'm gonna do something like this up the right center that's fine fit it to a fleet with white and now we're just gonna remove a part of it so opposite to one hundred due to the terror what now way I should do that is a lot more precision but here oh it's fast so sorry in advance okay let's reduce it to date that's this way and just duplicate it and let's prove it with this is this one this reduced opacity okay and let's do this so below zero two so let's do a new particle system it's going to blow let's take this here add this here and I want this glow to be not in billboard but I want it to be on the mesh on a quad more precisely precisely like this I don't want it to be to have in space I want it to be the length of our particle system so 0.75 I want it to loop yep okay sighs we're gonna see this later shape I want it to be a mesh so it's all the same place I want it to spawn on the ones so verse 0 1 and let's orient it up nope equal to 0 okay and like this and if it's set on local you can modify the size of this one either do this manually like this or with the new unity you can change the 3d start size so when a second see it and you can change it that way too so let's say I want it to be true like this it seems a bit too bellowing so it is your pasty ma good night okay add some color to it it's nice like this okay so I'm going to show you as more technique I have I guess it's not much of a technique it's just something I do all the time but ok so let's create a new layer black and reduce you pass this one now let's copy that's what's behind it let's do this and let's put it on add in your Dodge ad nonetheless save it too low - and see here so I fly up the glow intensity is gonna be like this as you can see so this is more blueish on to this and this is some lots more intense right it should be okay so let's see let's go say I can do this by the way look let's put the glow into the sparks okay no let's play it more like this I think okay let's test it again press play and that's lot better already you have a nice product idea that you like it what is with this so you can see better what okay having a glow is a bit too wide so I'm gonna do this but let's make it a bit bigger - like this now I need to make the fate at the end so let's put one let's say here and like this and make it a bit make it live a bit longer this guy needs to be longer so test it again 30 V this one control s play and space and that's it you have a nice little prototype and what's nice about it because here I on the top but what we can see is that let's say I want to come out to be like this you can see it Mauro in a 3d view what ok that's right out okay here this I can see the project is ready for 3d you have a nice trail you have some spots and you have a nice glow to it so that's it that's all for this third tutorial um I don't know yet which one it's going to be the next but it's going to be another very simple one so I hope you're looking forward to it and once again stank so that for support and for watching my videos and if you have any feedback please leave some in the comments so thanks again and see you later bye you
Info
Channel: Sirhaian
Views: 141,046
Rating: undefined out of 5
Keywords: vfx, preview, effects, abilities, games, final, version, fx, spells, light, particles, tutorials, Unity, introduction, learning, special, sparks, beginner, easy, projectile, shuriken, trails, unity vfx, unity 3d effect, unity tutorial, unity particle system for beginners, unity particle system, vfx tutorial, vfx effects, vfx breakdown, vfx software, vfx reel, vfx showreel, spells for beginners, particles overlay, unity 3d effects tutorial, unity 3d effects, unity tutorial 2017, unity tutorial c#
Id: pWxucHof_5A
Channel Id: undefined
Length: 30min 24sec (1824 seconds)
Published: Mon Aug 22 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.