Create Lasers That Explode On Impact for FREE In Blender! - Making A Sci-Fi Movie Part 10

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to another exciting blender tutorial i'm chris bailey and today we're going to be creating lasers let's get started [Music] okay so today's plan is lasers we're gonna be making a laser system that is able to figure out when it hits stuff now this is really exciting i'm pretty pumped about this effect i actually did a lot of research to try and find a similar effect couldn't find anything quite like this so i think we actually have something unique and genuinely new to uh to talk about today which is pretty exciting so what we're going to do is we're going to be first off just creating a basic laser system um and then we're going to try and make it be a bit dynamic so it doesn't really matter what it hits we're always going to get a shower of sparks whenever a laser collides with something we're also going to try and set it up in a way we can turn it on and off which is not really part of the functionality of particles in blenders so we're going to have to get a bit tricky to pull that off all right so let's do it let's see we are gonna start off with the scene here i've got my spiderbot in place now if you haven't seen this guy yet this is this is gonna be the bad guy we have a bunch of these spider bots in our scene it's a really cool little rig with some neat features some cool little functionality and the where is it there we go can uh fold up and turn on and off and it's it's pretty sweet anyways if you want to find out how to make this i've got a series about probably five tutorials six tutorials on making this guy um they're all on patreon it's part of the the exclusive part of the the uh the series that i put on for the patrons so if you want to check that out you can head over there and join i think just the lowest tier lets you get access to it so if you want the actual project files you get to go up a tier i think but worth checking out if you haven't already anyways let's uh let's start building out some lasers so the basic concept of the laser system is uh we're going to just use a simple particle system now i'll start us off with just a plane i'll have this guy in here just as a reference but um we're going to be firing at these asteroids here these are our targets and we're going to set this thing up to work naturally so that anything that we put within a certain collection is going to be able to shower spark so we can use this in our main scene really easily and again the purpose of this is so that we don't have to micro manage the process of you know animating every collision of a laser with something we want to be able to shoot a bunch of these off into our scene so we've got some really cool exciting moments but we also don't want to have to spend hours and hours and hours trying to you know connect the dots so let's hit shift a we're going to create a new plane now my cursor is way off in space somewhere so let's put it off at this point but if you just hit alt g it'll reset the position you can also just type in zero zero zero which is what i always normally do but thanks to all of you guys out there and comments and chats you're teaching me well let's take this and let's rotate him on the y 90 degrees i'll just do it with a plane for now um and i'll move the spider bot i'll just move him out of the way for now we're going to go over here to particle we're going to hit plus to create a new particle system all right so we hit blade you can see we've got these particles just you know vomiting definitely not lasers yet all right so let's switch this down i'm going to go for uh first off i'm just going to get rid of gravity um so i'll just come right down here to the bottom all the way to the bottom we've got gravity here under the field weights i'm going to drag this down to zero okay so now you can see we don't have any gravity in our emission now i'm going to come back up here and let's take the number of particles right down to something small like like 50 for now and i will keep the rest of this the same for the time being uh lifetime i'll go ahead and make lifetime 600 i'll do it the length of our frame here and i'll have the start and end frame i'll do the end frame the same as my in frame here now one of the things with particles is you have to remember that you have to manually set the end frame and the lifetime of your particles and again what these mean are this is frame start when is the particle system going to start emitting so i could you know move this up to like frame 91 and you can see it's not going to start emitting until frame 91 but you can't keyframe these values all right so once you've set it you just have to leave it right um you can't change it it's the same with the lifetime you know like you can't animate that property so in essence once you decide what you're going to want when you want this particle system to start and stop you're locked into that so that's something we're going to try and get around because we don't have to worry about that okay anyways so we've got our we're going to think set up and we're going to increase the speed here um now under velocity this is where we're getting the speed so you can see that the word normal here of course the normal is referring to the direction of this polygon face that we're emitting from and so it's saying emit in this direction with with one millis at one i think one meter a second in the direction of the normal okay so i could turn this up to get faster and faster particles so we can go all the way up to like 50 right we're going to get a really fast rate of fire probably to go higher than this but for now that'll work okay let's go ahead and make a laser don't you wish you could say that more in everyday life hey let's go ahead and just make a laser so cool all right let's let's do it i'm going to create a cylinder and again uh i should actually i'm just going to i'm going to before i make the cylinder i'm going to hit shift s and i'm going to go uh cursor to world origin that'll put my cursor down here so now that when i create stuff they won't just you know be created way off in the middle of nowhere i'm going to rotate this on the actually before i rotate it i'm going to open up the little drop down menu here so i can change the number of vertices in this so i'm just going to go to like i don't know maybe just five that's probably all we need four five looks good yeah all right i'm going to rotate this on the y 90 degrees and i'm going to scale it on the x scale it down let's get on the x scale down grab it on the x something like that i'm going to take it and i'm going to go into edit mode double tap a to select all and i'm going to grab that on the x and just drag it forward so the origin is kind of right back here at the base and there you go pretty standard stuff if you've watched any tutorials on making lasers this is how you do it all right now we don't need a full i'm going to create a new material so come down to the material tab click uh the new material i don't need a full principled bsdf uh shader for this we don't need all the the math that goes into that so we can just switch this to an emission shader so i'll just switch that to a mission now it's this uh white blowy color and uh because this is a bad guy um i'm gonna make my bad guys have red lasers i'm going to go against the star wars [Music] code of laser colorage is that right no they're green aren't they no the green or the bad guys yeah that's right sorry i know i know my lore i'm a nerd this is gonna be a laser let's go ahead and name it so we don't get lost laser and what we're gonna do is take the plane which we should probably change this to raygun because that's the only thing that makes sense come down to our particle settings and okay now we need to make our laser be the particle so let's scroll down to where is it render there it is the render tab and instead of rendering as a halo we want to render as an object and instead of an object we need to render well the instance object one is the laser um now all right so a little shout out to samuel hall uh his awesome youtube channel he's got this really great um star wars scene that he's done and he's got a laser tutorial um one of the things that he does that i really liked uh was he puts a light in a collection along with this laser and allows them to work together and that that gives you just a lot more uh lighting in your scene so go check his channel he's got some cool stuff there i hope he keeps going with that series he's just started it and it looks really really great the result that he has is fantastic so worth worth your eyes there um so let's go ahead and do what he did and let's create a collection and we'll call this collection laser grab the laser stick it in and we're going to create a light so let's shift a light point light and position this point light just on our laser oops just drag it four on the x there we go we're gonna make this point light red turn the green all the way down and i'm going to crank the power right up it's like 500. um and i don't want to cast shadows actually yeah we do want to catch shadows why not anyways you can see it just gives a lot more you know pizzazz and now we can do is come over to raygun and down to render a lot of a lot of scrolling in particles we're going to switch the render from render as from object to collection and now we're going to go to the laser collection now whenever we fire these things it's going to be shooting out oh they're so tiny they're so tiny we can't even see them so let's keep going all right so let's go to uh back down to render and um let's let's do okay so we want to do whole collection right oh just crashed okay now once we set laser as the instance collection what we want to do next is tick on this uh whole collection box and that allows us to use everything that's in this collection every time it launches a particle so if you don't have that ticked it's going to take from the different things that are in that collection so this is a great way to get to use all of it at once now we just need to get things oriented correctly because at the moment it's still emitting uh with the laser being way too small so we could scale this up and that's probably a perfectly acceptable way of doing it just do one that will be the same height the same scale as the number ones there we go so we've got some lasers firing off they're going way too slow oh blender crashed again all right so i don't have any slowdown i'm just going to work in uh shaded mode for now uh we can check out raider view in a minute once we get this thing set up a little bit further so okay now um let's increase the speed of this so i'm going to go to right up here normal i'm going to turn this up to 100. we'll see how that looks you can probably go even even faster than that we don't want to go like realistic fast you know i mean we don't want the speed of light because that would be that'd be lame because you could see it i might even want to make i might make this a little bit bigger there we go okay so the next step that we want to do is figure out how to get these lasers to react when they collide with something now the only way to do that in blender is to use something called instance particles what that allows us to do is create a new particle system which is going to be the explosion uh particle system for when we hit stuff and then we can tell it to basically trigger wherever there is another particle system doing something so we can have uh them trigger we can have the trigger whenever another particle dies for example okay so i'll show you how to do that all right so we've got our laser um actually i'll go ahead and move one of our asteroids so that we're actually uh colliding with it so you can see every time we come to this asteroid they're just they're just passing through it's it's like man no big deal so what we want to do is create this other thing so let's do that let's create a we're going to create a uv sphere and we don't want it to be in the collection here so i'm going to just drag it out i'll put it just in my scene collection for now and we'll call this one um let's see explosion all right now the explosion emitter is going to be the thing that emits our explosion for whenever these things when these things strike so let's uh let's see what's gonna be the best way for me to teach this let me let me first i'll just put um we'll start off by making let's make the particle system that's going to live on this thing next so so you can begin to understand how this all fits together because we've already done this you know how to do this so we'll hit the plus sign to create a new particle system and this one uh this particle system is going to be our explosion our spark explosion okay so i'm going to hit play you can see we get this burst of particles um what i wanted to do is i'm going to do the same as the other one i'm going to have it start frame 1 and i'm going to have it go till the end frame 600 okay now again that's the frame that i've set manually so i've set it again here live time i'll go ahead and set to 600 as well for now we're going to change that but that's just so we can see things a little bit easier so here we go this is our particle system and it's just raining down so what we want to do is create more of a burst like a like a spark burst okay so let's uh let's first let's let's crank up let's crank up the um the velocity okay so now they're going all over the place right then we can also uh probably turn down our gravity sum because we don't have we don't want any gravity technically so we should probably turn it off for now there we go all right now let's create something that this thing can can emit so something that looks like a spark now we could do a couple of different things one thing i like to do with particle systems like this is to create them in a shape that kind of cheats motion blur more or less so if we create a let's create uh let's see what do i want um let's create a uv sphere but bring the segments down to like maybe 10 and 10. now it's uh put it again in our collection here so i'll just drag it out so it doesn't continue to make it there and i'm going to go into edit mode and i'll select uh let's see i'll select this bottom vertex so i'll select this guy here and i'm going to turn on um proportional editing and i'm going to i've got mine switch the later i'm going to move back to smooth yours is probably unsmooth already and what i'm going to do is i'm going to grab it on the z and i'll just roll my mouse wheel there we go until i get that circle and i'll just keep playing with this getting kind of like a teardrop look something like something like this i think i'm going to scale and i want to scale let's see i'm going to shift z so that we're only scaling on the x and y if you hold down shift and hit x y or z when you're grabbing rotating or scaling it's going to basically turn off whatever access it was that you hit so shift x shift y shift zed it's going to turn off whatever access you select so that's a great little trick for you know just if you want to just scale on a certain axis so there we go it's kind of a teardrop shape i think that works for us i'll scale this thing down a bit see we might have to refine it a little bit i'm going to call this thing spark okay and this is going to be the thing that uh is shooting out of our our spark emitter so let's go down to uh render and i'm going to select object and i will select spark where are you spark there you go all right now for scale um i'll crank it up a little bit so we can see it there we go now we want these things to actually emit in the direction that each of the normals are facing for the sphere so right now they're all just kind of emitting standing straight up which isn't the look we want so we need to go into rotation so let's find rotation there it is i'll just turn it on and uh i'm going to switch it to normal tangent i think that'll give it to us nope start just normal no could also be the way i think what i'll do as well is i'll turn down the velocity that's a great way to kind of figure things out sometimes so maybe maybe we just need to reorient the the article itself so let's let's select it all in edit mode so select the particle hit tab to go into edit mode we're going to rotate on the x90 and yes you can see now they're pointing it looks like they're kind of emitting outwards right so that was the trick it's just the is oriented in the wrong way but we wanted to go the other way so let's rotate x negative 90. that's pretty good and then what we can do is we need the i want the origin to be centered in the geometry so i can go object set origin origin to geometry all right and there we go now you can see we've got these things shooting out because we've you know sculpted it like a teardrop we're faking motion blur kind of just saves you on processing power why not okay so let's go back up to really fast so our velocity um [Music] that one back up to 50. [Music] and i'm going to turn the lifetime down to like 10. maybe even less than that so this is like this little you know burst and i'll turn this right up [Music] and i might bring the velocity down i know it doesn't make sense in space but if we add in a little bit of gravity so we turn on dynamic that's going to allow them to kind of follow the arc of motion so they're they're we've got gravity turned on so they've got this r which of course makes no sense for space but it's all right we're just trying to make that look cool now i'm going to bring the velocity down a bit and the lifetime because we don't need them to be around this long that just gives us this little kind of arc to that motion which is potentially pretty nice now what we can do is well we're going to bring the skies of these guys down a bit so let's go down to the particle scale and we'll bring that size we'll play with this a little bit more once we get into a rendered view but i think that's gonna work pretty good okay so let's uh go ahead and take our spark we're going to add in a new material and we're going to switch it to emission remember when i do this this way when i when i switch the emission like that it's the same as if you were to be in the shader editor right and so this is the shader for this that we just created if i go back to principle bsdf where is it you can see it just adds a principal bsdf node so changing it there is the exact same thing as come over here and deleting and just going add a shader node emission piping it in boom you'll see it does it there so those are related so that's what's going on there um all right i'm going to make this emission uh kind of like a yellow spark and i'll turn it up that's kind of the star wars way of doing it right so it's a sort of whitish hot yellow spark so we're going to have that be our spark system okay now we'll refine this particle system a little bit better uh once we get it working but let's let's let's think about what we have right now okay we've got two particle systems we've got the ray gun particle system up here and then we've got the uh explosion emitter right here right so we've got two particle systems right they both are starting at the beginning of our scene they go on for 600 frames and they're emitting a bunch of particles throughout the whole scene right but we want to get these two particle systems to work together we want them to partner up so that when one dies the other one initiates now that's a little deceptive what i just said the particle system isn't going to initiate it's not going to start firing whenever we have a particle die right it's it's going to behave according to the same parameters that we've already put into it so this both particle systems are always going to start at frame one because that's what we've set and they're always going to go until frame 600 because again that's what we've set doing what we're about to do doesn't change that it just basically changes the position of the emitter that's kind of the best way to think of it in order to get this to begin to appear wherever a laser hits something we need to do two things the first thing we need to do is we need to take the object that we want to be re reacting to the laser we want to take that and we need to turn it into a collision object okay so we go over here to the uh physics tab when we have the asteroid clicked we can just click on collision all right and that's going to automatically turn this thing into a collider and you can see now we've got lasers bouncing off um you know as they as they hit but we don't want them to bounce off we want them to just disappear so we're going to take this box here kill particles now whenever it intersects this object they're just going to disappear they're going to die i can move it out of the way they'll keep going but here they'll stop all right now the next step for us is to now connect that event that kill event up with this system and there's a really great tool for that it's in the modifier so we go to the explosion emitter and we head over here to the modifier tab i'm gonna go ahead and hit pause just so just in case uh glitter crashes and i'm gonna add in a particle instance modifier so we'll throw that in there now i don't know let's see which one needs to be first or second or if it matters we may have to play with that but now with the particle instance modifier what we're going to do is we need to pick another object in our scene that has another particle system in it so in our case we want to pick our ray gun so we've got ray gun selected as the object and the particle settings this is referring to the particle system that's on raygun so if i come up here and rename this to laser particles right here you can see that now in this guy if i go back to it laser particles is now the name that's appearing there so that's what it's linking now we want to tell it what to do with this particle system how it should behave so we want to right here we want to create from regular so we want to create from the regular particles that are being fired out of this thing not any children particles or anything like that and we want to show the particle when this one dies so not when it's alive uh not when it's unborn but when it's dead the next thing we got to figure out is we need to have this sphere uh that's emitting our explosion we need to in order to get this to work so you can see it's appearing right we're getting little versions little instances of the sphere emitter it's it's instancing here um but we're not you're not getting it where we want it to go the reason for that is the fact that we've changed the scale of the sphere so when i first made it i scaled it right down right but i didn't apply that scale so it's actually positioning it in the right spot on this asteroid but then it's applying this scale to it with the origin being i think at the center or wherever it is and it's so it's scaling down you can see it so it's moved it off of where we want it to be so in order to get it to work we have to do is apply the scale of this so this is one again so we just select your explosion emitter into f3 and apply object transform and i don't want to apply the location because i've moved it off rotation you don't need either really but scale is the one we do want so i'll just take on scale there we go so now you can see scale is set to one one and one okay now if i hit you can see that we're getting it appearing on the asteroid okay it's still not quite working just right but it's getting a lot closer all right so the next problem is of course the fact that our position's off so i didn't you know reset that so i'm going to put this back at zero now if i hit play you can see we're getting these little balls wherever a laser dies so when the laser particle hits the asteroid it dies automatically we get one of these objects which is cool but it's not emitting any particles what's going on well the reason is the particle instance is happening after the particle settings in our modifier stack so if we change the order of these like that suddenly it's going to be emitting a sphere that is emitting sparks whenever it hits now this is really getting cool right so now things are really coming together what we need to do next is we need to go ahead and turn off the emitter because we don't want to see this thing appearing every time so what we can do is we can come to the render settings right here where it says show emitter we can just turn that off for the uh make sure it did on the right yeah for the explosion emitter we can also go into the instancing settings here underneath the object settings which is the orange box come down to instancing we can say we can turn off display instancer and that's going to just turn it off from everything from viewports and all that so now we never see that sphere anymore and we're just going to see the sparks flying one of the limitations of this is that you can see that the sparks continue to emit until the next impact if i took my ray gun down to like let's say instead of 50 let's just go one you can see what happens it's like a laser hits and boom it's just gonna like emit sparks and just continue to emit sparks that's one thing to bear in mind this works really well when you have a lot of lasers firing but there is one other problem that we've got with this system and that is we can't turn it off so lasers are firing or they're not firing that's it right so we can't animate okay uh at frame 300 i want to have um i'm going to have it stop and then at frame 400 i want it to start again um it's sort of you have to commit to the moment in your shot you want to have lasers so we've got lasers and then it's like we don't have lasers and that's it you can't really go in between the two there is a way around it and it's a little bit of a it's a it's a hack i'll call it a it's not it's not great but it works and that's all that really matters right what we're going to do is we're going to create something that exists kind of on the boundary of our scene okay we're going to create a sphere so let's create a uv sphere and it doesn't matter how many subdivision has i mean you don't need a lot so i'm going to scale it up grab it back on the x a little bit and we're also going to set up a collision group for our asteroids when i have collidic so if i take my asteroid here asteroid particle and i'll go ahead and create a new collection for this guy and i will call this collection let's see laser colliders now whatever we put in this we're gonna have um react to the laser and give us this effect this gives us a little more control later so i'm gonna take my asteroid particle and i'm going to pop it in there i'll take this one i'll put it in as well now every object within here we still need to remember to go through and turn on collision and kill particle that's important all right so now what we can do is come over to our laser or is it our ray gun emitter and we come down to uh here we go deflection we've got collision collection we can select the laser colliders collection so now only these are going to work for that now we can also technically um we could hit die on hit and i think that allows us to then not have to necessarily take kill particles and that should give us the same oops the giant sphere is in our collection now we don't want that so yeah that still works you see it so that's a that's kind of a bit of a time saver soon only you just drag things in and click on uh collision and it it should work we now have this laser collider group we're going to take this sphere and we're actually going to put it inside this laser collider group now this sphere we're going to give a specific material to we're going to create an emission material and we're going to make it pure black so this thing is emitting no light into the scene whatsoever so now i can come over to my uh ray gun and i can add con i can straight i just want to use a copy location constraint and i'm going to find my laser there it is laser controller object and now basically what it's done is it's copied the position of this controller right over here and it's put my uh where is it to put my ray gun wherever it is right so now this is also uh let's make sure this is set uh as a collider as well so our laser controller is a collider with kill particles turned on so basically what happens is you can see uh we've got some sparks and stuff flying what's happening is the laser ray gun is inside of our sphere and it's firing and hitting the inside wall right and which is triggering the explosions and all that stuff but it's happening off screen because we're going to put this thing outside of our scene we're going to put it way off in the distance we can also do is we can take this laser controller and we can shift d scale it up so we've got a second one now that contains it all so we're not going to see anything now this one we don't need any collision on we can just turn that off this is just visually there just to make sure we don't catch a glimpse of it somewhere the sparks or whatever so now this thing is just you know out and about so we could take this and uh we could take both of these guys actually i'll go ahead and i'll just um control click uh take the outside one control click the inside one and then ctrl p and i'm going to parent that to the object and now this guy we could just take this thing and stick it way off in the middle of nowhere so 10 000 whatever it's gone there it is we have no lasers in our scene now if i come back to my center zone here and i grab my raygun now what i can do is i can go to this constraint tab and i can animate the influence because when the influence is zero this thing is going to be wherever it is i've positioned it at the scene right when it's one it's going to be wherever we want it to be when it's over there so if we just jump between zero and one we're basically turning the lasers on and off throughout the scene so a bit of a hack but it's a good hack it works now i can show you how this things work let's take this uh let's take this raygun gun guy scale him down a bit and i'm going to set a position keyframe right here and i'm going to move forward a little bit and i'm going to grab him and grab him down y and rotate on the z like that you can see as he's flying around he's firing he's firing he's firing but now another problem we've got is the rotation is off uh for these guys let's go to our particle settings and what we're going to do is come right over here we just need to turn on rotation [Music] and now they're going to behave properly we have lasers firing and then we could take our constraint on the raygun and i can animate the influence so i can make a keyframe there and then i can go to the next frame and set this to zero set another keyframe there we go and then i can bring it back on set another keyframe go forward one frame and make that zero so now you can see that it's shooting and then it turns off and it stops shooting now the reason why the sparks go of course is because it's firing inside that black sphere of death that we have in the back all right so now we've got the basic system working um it's time to kind of talk about what the limitations are now a couple limitations one of them are um one of the problems with this system having a light attached to our laser when we fire it um is is great for you know creating illumination the scene but it can be really intense for eevee so if you want to go back to a live view it's going to really slow down your machine and that's actually why i was getting those crashes earlier i've worked that out since um so i would actually kind of recommend maybe holding off on these if you really need the effect you can have a point in your laser collection a point light in your laser collection and and save that for your render but while you're previewing it i would keep that turned off um in my case i think i'm actually going to just delete it out of the the system itself so now my lasers are just going to be without lights that also means i can jump back into live view now not have that cause problems which is good another thing to really remember is that the system's really limited so we can have it firing and stuff but as soon as it as soon as you have a situation where um a laser fires and hits the rock and it showers the sparks and then another laser fires and misses and goes off and it's not going to hit something else that spark is going to keep firing until it collides with something else so the best way around that is to use this slider control that we've built into our ray gun so the influence slider if you just animate that off so that it goes into the the laser controller sphere you want it to fire in there so that it hits the wall of that thing so that it starts showing sparks inside that and stops on the rock so just keep that in mind now there is a way around that kind of so there's a way of programming into the influence you can use a driver and actually run a calculation on the particles that you've got so how many particles the start frame the in-frame and how many particles are going to emit and then going to take that number and then you figure out from there uh which frame is going to be a frame where a particle's going to get shot out as a laser and then you set that to be the moment when the influence goes to one and it's a bit crazy but you can basically build something and code something into this so that it every second laser that's fired is always going to be fired inside the sphere and that can make the shower of sparks end which is great but just super complicated takes forever i might do another tutorial on how to do that specifically because it is really interesting um and i might put that up on the patreon so if you're interested you can check that out um we shall see anyways then um yeah so that's that's the stuff to really kind of keep in mind now um the last thing also to think about is right now we're emitting from this one um face if we were to take this system and duplicate it and put it like for example here with my spiderbot i've got a bunch of different laser guns if i was to put one at each of those different points that's going to be a bunch of different particle systems but they're all going to fire at the same time which is kind of dull so what you can do is you can actually take your emitter object in my case it's just this plane but if i select the plane and duplicate it in edit mode turn off proportional editing now i've got two planes and if i you can see it's alternating it's kind of randomly picking one of these faces so when you have multiple laser points just create multiple faces and put them where your guns are now in the circumstance that i have here where i've got a uh the spiderbot thing has um a rig attached to it and the arms are articulated and so they're aiming at different places and they're all moving over the place and actually i can't just use uh faces uh one object placed you know just in the same general spot then it's never gonna line up in that case what i'm going to have to use is bones and create a rig to get it to actually deform those faces to fit so i'm going to do that as a separate tutorial on the patreon just talking specifically about the spiderbot and how to get that to work for this guy and we'll do something too where we have um a system rigged up i think where um the uh the guns themselves kind of move like that and fire um at the same time so i think that's what we're gonna do there but i'll do that separate so um you might be different for you depending on what you're using for your bad guys ship um and how you build that so just keep all of that stuff in mind the last thing i'm going to point out is the sad reality that this system isn't going to react to our asteroid particles so when we bring this into the main scene if one of these lasers hits one of our asteroid particles it's not going to create sparks and the reason for that is blender just doesn't have the functionality for particles to interact with particles now there is a an add-on called molecular that does allow for that to happen so it's worth checking that out but it's it's really for like intense physics simulations and in our case we're just adding so much overhead to the scene in terms of processing power and requirements that it's just going to bog things down and it's not worth it so for us the best thing is probably going to be to bring this laser system into our scene animate the shot and then and place a couple of asteroids in the scene that are just objects and not particles that can react to the laser system and explode with sparks that's going to be the best way for us the good news is we don't have to hand play sparks because we've got this system and it actually works so it's not perfect but it's pretty good like i said it's a hack yeah anyways so the last thing we want to do is set this thing up so that we can easily import it into our project so let's do that i'm going to come over here to all my different objects we've got um my laser colliders which we can probably include those in the collection so that we've got them so i'm just going to make a few more collections i'm going to create a collection here called the emitters and in this collection i'll drag raygun and i'll drag the explosion emitter so we've got both of our emitters i also want to create a collection for spark this is going to be our spark part particle and i'm going to drag this in here and the reason for that is just so that i can turn it off and if you turn off the collection it won't render the actual particle itself but it'll print all the particles as they emit so anyways it's just a way of keeping this clean we're going to call this last collection laser gun laser guns that's a good name and what we can do now is we can take each of our different bits all of our different um collections here and drag them in so now laser guns collection has all the elements needed to create our laser guns now last thing to do is we should get rid of the keyframe data that we've got uh on our on our raygun and we're also going to put it back at zero zero zero then what we can do is we can turn off the laser collection and the spark particle collection and that's gonna get rid of these two particles they're just sitting here at the origin we don't need those anymore now one thing to bear in mind is you're always going to get this little burst at the start and that has to do with uh the way the system works with instance particles so um in every situation we have a scene you're just going to want to start you're seeing a few frames later than zero you can also offset this by changing the start time of your particle to be before the scene starts so like negative 100 frames for example there we go so now we've got everything we need for our laser system and our sparks it's all set up and working so remember when you're actually putting this into your scene what you can do now is you can append the laser guns collection and it's going to bring all this stuff in it's going to bring in these two asteroids the sparks it's going to bring in the laser bolt it's going to bring in the single polygon emitter which is the thing you can scale and line up with the uh barrel of your gun and that's going to be the thing that emits so remember the influence is going to be the key thing to animate when it comes to turning off your lasers and turning them back on again also fixing any problems where you've got sparks that continue to shower when they don't need to be make sure you just pop that off real quick so that you have a chance to let a laser fire inside of the sphere and that is our laser controller so the sparks can be firing off in there and then i'll turn off here so anyways i hope you found this tutorial really helpful entertaining and interesting hope you learned a lot and uh please check out the patreon we got a lot of great stuff over there extra tutorials and uh project files and assets to download plus the blender market we've got some cool stuff over there you can check out can't wait to catch you in the next tutorial thanks so much for watching i will catch you next time [Music]
Info
Channel: CBaileyFilm
Views: 30,002
Rating: undefined out of 5
Keywords: blender, blender 2.8, blender 2.8x, asteroids, explosions, fire, lasers, space ships, space, sci-fi, tutorial, 3d, 3d animation, animation, computer animation, short film, how to make a short film, how to make an animated film, laser, scan, droid, asteroid
Id: cUmGNI-kIzg
Channel Id: undefined
Length: 39min 38sec (2378 seconds)
Published: Thu Jul 30 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.