Plank Tower Physics Battle (Blender Tutorial)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone my name is ryan king and welcome to this blender tutorial where i'm going to show you how to create this plank tower physics battle in blender so recently on my youtube channel i posted a plank tower physics battles blender animation and in the comments i got quite a few requests to make a tutorial on how to do it so i decided to make a tutorial so in this tutorial i'm going to show you how to create this animation right here from start to finish in blender and also if you haven't seen my plank tower physics battles video you can check it out with the card up on the screen and the link in the video description and if you'd like to purchase the project files for this tutorial then you can get that over on my gumroad and my patreon and that'll also be a great way to help support this youtube channel and then one last thing before we start this video was brought to you by my martian environment blender course so i've created a seven part blender tutorial series where i'll show you step by step in real time how to create this martian environment right here and purchasing the course is also a really great way to help support me and this youtube channel so i'll have a link to the trailer video if you'd like to check it out and then i'll also have a link in the description to the course on my gumroad store if you'd like to purchase all right so let's get started so here i am in a new ceiling blender and also let me turn on my screencast keys so that you can see what buttons i'm pressing right there in the corner so i'm going to start by just selecting this lamp here and deleting it because i don't need it and then i'm going to select the cube and we are going to actually be using the default cube so you can model your planks however you like but i'm going to show you how i like to model my planks so i'm going to tab into edit mode and then i'll press s to scale and then i'll press x to scale it on the x-axis and i'm going to type in 5 enter and then i'll just tab back into object mode so this is how i like to model my planks just really simple but you can model them however you like now i'm also going to press shift a and i'm going to add a plane because we need a ground plane so that when we do the simulation the planks can fall on the ground so i'll press s to scale and i'm going to type in 100 enter and then you can see that's pretty big but i do want it to be even bigger so i'll press s to scale again and then we're going to type in 10 enter and now we have this really big plane um and so it just kind of goes back into the background and that is exactly what i want now i need to move this up because you can see that the plank is going through the ground but what i want to do first is i want to turn on this snapping right here so you can click on this snapping the button is a magnet the little icon there is a magnet so you can see now when i move this it's moving by increments and this is very important because i want all the planks to be right next to each other but i don't want them to go through each other so we're basically using this grid here there's basically a grid in the 3d space and all of the objects will now move by increments so i can now press g to grab z on the z axis and we are just going to move this up just like that so just make sure that this plank is sitting right on the plane so now what i want to do is i want to add the rigid body physics so i'm going to click right over here to the physics properties and then i want to turn on rigidbody so now i'm going to press 7 on the numpad and that is going to take us to top view and then i'm also going to press z and move my mouse over and let go to go into the wireframe view i can now press g to grab and then y on the y-axis and i'm just going to bring it over something like that and then i'll press shift d and bring it over and you can see it's moving by increments so it's moving along that grid there so i'm going to move this one kind of right here and then i think i need to move this one over and then what i want to do is duplicate these and rotate them over so i'm going to shift and select this one so we have both of these selected and i'll now press shift d and shift d will duplicate them and then immediately after that i'm going to press r to rotate and then i want to type in 9 0 and enter just to rotate it over by 90 degrees now if you didn't get the placement of them exactly correct you can just select them and press g to grab and just kind of move them move them around so that they're exactly the same so that it's a square now you can see that these planks are going through each other so i'm going to shift click on both of these and then i'll just press g and z just bring it up just like that so now these are just placed on top of each other so now i just want to duplicate these and move them up so i'm going to hold down the shift key and select all of them and then i'll press shift d z and we're just going to bring that up and then just click to place that so because we've duplicated them and moved them up in one movement i can now press shift r and shift r is going to repeat the last action so i can now just bring this way up um just make it as high as you want something like that is pretty good so now what i want to do is i want to make this flat here and that way when we create those little cannons we can stick them on to the tower so i'm going to click on this shift click on this and we want to join these together into one object so i'm going to press control j and ctrl j will join these together so if i tap on edit mode now we just need to fill this so there's just one big plank so i'm going to press three or click right up here to the face select and i'm going to shift select these two interfaces and then i can press x to delete and i want to delete faces so now i want to kind of push these together so i'm going to press 1 or just click right here to the vertex select and i'm going to hold down the alt key and then select this ring of vertices and then hold down the shift and alt key and select this ring of vertices so i can now press s to scale and i want to press x to scale it on the x-axis and then i want to press 0 and enter and that way they just get pushed together and then also we now have overlapping vertices so to get rid of the overlapping vertices i can press m this is going to bring up the merge settings and i want to click on by distance and that way it's going to remove four vertices so now there aren't any overlapping vertices now i actually don't really want this in here because we don't need this extra loop so i'm going to hold down the alt key and just select this ring of vertices in the middle and i want to click on x to delete and then to just delete the ring of vertices i can click on dissolve edges and that'll just get rid of it all right so there we go now you can see the origin point is a bit messed up because the origin point isn't in the very center and this can actually mess up the rigid body physics later on in the video so i'm just going to make sure this is selected and then i'm going to click on object and i want to click on set origin and then i'm going to click on origin to geometry and that way the origin point is in the very center alright so that is very good so i now want to just duplicate these and kind of move them over so that it's a little bit longer so i'm going to press 7 on the numpad for top view and i can just press z and move your mouse over to go into the wireframe view and then also this camera i can just kind of move it back here so i now just want to box select all the planks and i can now press shift d and move over click to place that shift d and then move it over and then click to place that so of course you can create your tower however you want you could create a giant tower with all these flags and you could create this giant fortress whatever you want to do because this is a tutorial i'm just going to make a simple tower but of course you can create any tower that you want all right so that is the first tower so now i'm going to box select this again and i want to move it over so i'm going to press g to grab click and hold with my mouse wheel to constrain it on the y-axis and i'm just going to bring it back something like that and then i'll press shift d and then click and hold with my mouse wheel and just kind of bring this over just like that so now let's place the camera somewhere around here kind of on the side so i'm just going to move my view to where i want the camera to be and then i can press control alt 0 control alt numpad 0 and that is going to hop the camera to where we are now you can see that the camera actually isn't able to see very far into the scene and that is because this is such a large scene that the camera is starting to clip so what we need to do is just select the camera and we can also scale the camera out scale the camera up so it's a little bit bigger and then to make the camera so we can see farther let's click right over here on the camera settings make sure the camera is selected and then click on the camera settings and i'm going to go right here to the end so right now it's set to 100 i'm going to add an extra zero right here so that way it can see a thousand so now if you look through the camera you're able to see all the way to the end so i can now select the camera and i can press g to grab and i can also press g and double tap the z key and that is going to bring it in and out and i can just bring it over something like that alright so that is very good and then also we don't really need this on anymore the snapping feature so i'm going to click on this to turn it off and that way it won't use the snapping and the movements will be smoother and then also i haven't saved this project yet so let's click on file and then click on save as and i'll just save this as tutorial.blend in a folder on my computer and you can just click on save as alright so before we model the canons i want to just set up some basic lighting and some basic materials so i'm going to click right over here on the world properties and then the color here i want to click on the yellow thing right here and i'm going to change this to a sky texture and then we can just go up into the rendered view to preview this now it's way too bright right now and there's a few things that i want to change so i'm going to turn off the sun disk and then also right here i'm going to change this to this one right here in the middle and i do think this one looks a bit nicer and then it is pretty dim so on the strength value i'm going to change this to 3 so it's a bit brighter all right so that is definitely looking better but i also want to add a main light so i'm going to press shift a and i'm going to go right down here to light and i'm going to add a sunlight and then i can just uh rotate this sunlight bring it up and rotate it rotate it over something like that and then we can just go back into the camera view to preview that so if you click on the light you can go over here to the light settings now on the strength here i'm gonna set this prolly to like a three so it's a bit brighter maybe even set it to like a four now this does look too bright right now but that is because this is a white material and so it is reflecting the light but when we add colors to these materials then it will be less bright now you can see right here that the shadow is very sharp and i don't really want to be that sharp so on the light settings here i'm going to turn this angle up a little bit just so that those uh shadows are a bit smoother all right so now we can set up the materials so i'm first going to select the plane here and i'm going to go over here to the material properties and let's just click on new and i can just call this ground and then for this material the base color i'm going to set this to kind of a blue color i just think this looks pretty nice and then maybe make it a little bit darker and then also i think it looks very nice if the roughness is turned down so i'm just going to turn this roughness value down and that way you can see a bit of a reflection in the ground and i think it does look pretty nice and then let's just select one of these planks here and i'm going to click on new and i can just call this planks now for this material i do want to do a very simple node setup so i'm going to click right over here to the shading tab and then let's just go back into the camera view and then i can just go into the rendered view to preview this so what i want to do is i want to have each plank be a slightly different color and that way you'll be able to tell them apart because right now they're so close to each other they kind of just look like one piece so i'm going to press shift a and i'm going to search for an object info node and i'm just going to drop the object info right here and then i'll take the random and i'm going to put the random into the base color so what the random is going to do is it's going to randomly generate colors per object now you can't really see it doing anything and that is because this object only has this material so i need to add the planks material to all the other planks so i'm going to go into the wireframe view and then i'm just going to box select all of the other planks just like that so we have them all selected and then lastly i'm going to shift and select this plank right here so this one has the planck's material so in the 3d view i can now press ctrl l and i want to click on link materials and that way when i go into rendered mode you can see that they now all have the same material so now you can see what the random value is doing it's giving all the objects randomly generated colors from white to black now i don't want white and black i want it to kind of look like wood so i'm going to press shift a and i'm going to search for a color ramp node let's just drop the color node right in here so i can now change these colors and it'll change the different colors on the planks so this black tab here i'm going to click on the minus just to get rid of it and then i'm going to take the white tab and i'm going to make it a light brown color so that it looks like a plank material and then i want to make another one so i'm going to hold down the ctrl key and click and that's going to add another tab and i'm just going to drag this tab over here now this one i want to be very similar but i'm going to make it slightly more saturated and slightly darker and you can now start to see what it's doing so each plank just has a slightly different color um so now you can tell them apart all right so let's go back over to the layout here and then i'm going to press ctrl s to save our project so now we can go ahead and make those cannons so to make the cannons i'm going to press shift c and that is going to center the 3d cursor in the center of our view and i'll press shift a and i'm going to go right down here and i'm going to add a cylinder i'm going to press period on the numpad to zoom into the cylinder and then i'll press s to scale and i do want to scale it up a bit so something like that and then i can press g to grab z on the z axis and i'm just going to bring this up just so that it's right above the plane something like that all right that is very good so i'll now select the cylinder and tab into edit mode and i want to press 3 on the top of your keyboard or just click right up here to the face select i can now select this face and i want to press g and z and we're just going to bring this up a little bit now when we do the materials for the tanks i do want to add a colored stripe so i'm going to press ctrl r and then scroll my mouse wheel out and then i can just left click and then right click and that way we can add a stripe onto the object and then i want to add some bevels so that it looks a little bit more realistic and reflects some of the light so i'm going to click right here to the vertex select and i'm going to hold down the alt key and select this ring of vertices i can now press ctrl b and ctrl b is going to add a bevel and i can scroll my mouse wheel out just to make two and then i can just click to place that so now there's just a tiny little bevel there um but that will just help to make it look more realistic and then i'm going to go down here and alt select this ring of vertices and again i'll press ctrl b and then just click to place that all right that is good so i can now with the object context menu shade this object smooth and you can see now there's just a little bit of a reflection there on the edge and that does make it look more realistic so i now want to add some little legs to the bottom of the cannons so again i'll press shift c just to make sure my 3d cursor is still in the center right there and then i'll press shift a and i'm going to add a cube so i can now tab into edit mode on the cube and i want to press g to grab click and hold with my mouse wheel just to bring it over and then i can press s to scale and just scale it out a little bit and then i can press g and z we just want to bring it up if i go down under the plane we just want to bring it up so it's just above the plane a little bit and then also just make sure that it's inside the side of the cannon just like that all right i now want to select this and then shift select this vertice and i want to press ctrl b to add a bevel and then i want to scroll my mouse wheel so that there is only one face and then just click to place that all right that is looking good so i can now double tap the a key to select everything and i want to press ctrl b again and i'm just going to scroll my mouse wheel up once just to add a tiny little bevel and then just click to place that alright and then back in object mode i can shade the object smooth so now i want this to be all around the other sides so i'm going to go right over here to the modifier properties and i can click on add modifier and i want to add the mirror modifier and that way if you click on the x here it's going to mirror it over on the x-axis and then i want to apply this so i'm going to click right here on the drop down and click on apply and then i want to duplicate this over so it's on the other side so i'll press shift d and then r to rotate and then z on the z-axis and then i want to type in 9 0 and enter and that way we've duplicated it and moved it around and then i want to shift and select all of these objects but then lastly i want to shift select this one right here so the base of our canon and i want to join these all together into one object so i will now press ctrl j and now these are all one object let's just press ctrl s again to save alright so that is the base for our canon but i want to make the head of the canon so i'm going to tab into edit mode and i want to hold down the alt key and select this loop right here so i can now press shift d to duplicate z and just bring it up on the z axis and then just click to place that so now i want to separate this into its own object so to separate it i'm going to press p and then i'm going to click on selection so everything that's selected it will now be its own object so i can just go back into object mode select this object and tab into edit mode and then i'll just press a to select everything and i can press g and z and we're just going to bring it down just so that it's a little bit above the base of the cannon and then i want to fill this so i'll press f to fill a face right there i can now press e to extrude we're going to bring that up a little bit and then just click to place that something like that you can also press 1 or 3 to go to side view 3 on the numpad to go to side view and i can now press g and z and we can just bring that up a little bit more something like that alright so let's press e to extrude click to place that s to scale and then e to extrude and then s to scale maybe g and z we're going to bring that down a little bit then e to extrude and s to scale okay something like that so that is looking pretty good but it is kind of rough and i want to smooth it out so i'm going to click on add modifier and i'm going to add the subdivision surface modifier and then i want to change the levels viewport and render both to one so there's just a little bit of subdivision and then again using the object context menu i can shade the object smooth now because there aren't very many vertices down here it's kind of stretching it so in edit mode i'm going to alt select this bottom ring of vertices and i'm going to press ctrl b to again add a manual bevel and i'll just hold down the shift key to make my movements very sensitive and just add a tiny little bevel and then click to place that alright that is looking very good and then i also in edit mode i want to press ctrl r and then click and drag up and click to place that just so that that's a little bit sharper so that is very good so now we need to do is we need to create the canon coming out of the canon head so i'm going to press shift a and i'm going to go right down here and add another cylinder and then i'll press g to grab and then before i move the cylinder i'm going to click right behind me on the add cylinder settings and i'm going to change the vertices count to 12 because we don't need 32 that's a little bit high so i can now close the add cylinder settings and i can press g and z we're going to bring it up and then g to grab click with your middle mouse wheel and just bring it over so i can now press r to rotate and we're going to press x on the x axis and i can type in 9 0 and enter just to rotate it over and then i can also scale it up so i'll now tab in edit mode and i want to scale it on the x axis actually i want to scale it on the y axis and just bring that out and then just kind of move it down in object mode just like that all right now i actually want these two objects to be connected so i'm going to click on this object and then shift click on this object so now that these are both selected but this one is the last one that's selected i can press ctrl j and that way this object is going to become a part of this object now because this object has the subdivision surface you can see that it's smoothing this out and i also want to use the object contact menu again to shade the smooth but because there's so little topology right here this is just one big face it is stretching it a lot so what i want to do is i want to press three to go to the face select and then i just want to select this front face right here i can now press i and i is going to inset the face and i'm just going to inset it a little bit just like that and i'll press e to extrude and i want to extrude this way back inside the head of the cannon and then if we go inside here um there are faces right here and i actually don't want these faces so i'll press x to delete and i can just click on faces and then right here there is another face if i just go three for the face select you can see there is the face so i'll just press x to delete and i want to delete faces so now there's no stretching it just ends at the end of the vertices all right that is pretty good um although you can see there's a bit of a stretching right here so i'm going to press ctrl r click and add a loop cut and just drop the loop cut right here and then ctrl r and we're going to add another loop cut right here and then just click and drag and drop it right there so it's pretty close all right that is very good so we now have our little cannon so let's add the materials to our canon so i'm going to click on the canon and i can also just go down into the material preview and i'm going to click right over here onto the material properties i can now click on new and i can just call this uh metal i'm just going to call it metal so the base color i want that to be kind of a gray color of course you can do whatever color you want and then to make it look like a metallic material i'm going to turn the metallic value all the way to 1 and then i do want it to be a little bit more shiny so i'll turn the roughness down just a little bit and that is looking pretty good in the rendered view so i now want to select this bottom part and i'm going to click on the drop down right here and i want to add the metal material as well all right so that's looking very good but as i talked about earlier in this tutorial i do want to add a color here so in edit mode on this object you can see right over here on the material properties we have these different material slots so i'm going to click on the plus here to add a new material and then i actually want to add the metal material into this slot so right now we have two of the same material in the material slot on this object but i now want to duplicate this material and then i can change it and make a different color so i am going to click on this button right here and that is going to duplicate the material and i can now rename this to blue because i want to make it a blue color so now on the base color right down here instead of turning it to a gray color i want to turn it to a bright blue color just like that alright so now i want to assign this blue color to the object right here so i am going to click right up here to the face select and then i can hold down the alt key and i just want to alt and select this ring of vertices and also i want to press g and z and just kind of bring it up a little bit so now that it's selected i can just select the blue material and then i can click on a sign in the edit mode and now you can see that it has that blue stripe and you can tell uh what team it's on of course you can change it to whatever color you want all right so that's looking very good now there's just a couple more things i want to do to this tank if i select the head you can see that the origin point is way down here and this is going to cause a lot of problems when we do the simulation because it's going to rotate by the origin point and the origin point is way down here and that is not what i want so i want to set the origin point right up here so i'm going to tab into edit mode and then i'm going to hold down the alt key and select this ring of vertices so i want to set the order point into the very center of these faces to do that i'm going to press shift s and i'm going to move my mouse down and i want to center the cursor to the selected area so now that i've clicked on that you can see the 3d cursor is in the very center of these faces so i can now tab back into object mode and then to center the origin to the cursor i can click on object and i want to click on set origin and then i can click on origin to 3d cursor so now if i rotate this you can see it's rotating from the center and also we can animate the tank by pressing r to rotate and z on the z-axis and just rotate that and that way it'll swivel the cannon now we do also want to add some physics to these as well because we do want the canon to fall over if the ball smashes it so i'm going to go right over here to the physics properties and then on both of these objects i want to add the rigid body now this top one right up here we are going to be animating this so i want to turn on the animated button right here and then if i click on this bottom one right here i'm going to click on the rigid body as well but this one i'm not going to animate it so i will not turn on the animated button and then the last thing that i want to do to this canon head is i want to add some shape keys and i want to make it look like the canon head is shooting so it's going to kind of go back and then go forward so we're going to use shape keys to do that so to add shape keys i'm going to click right over here on the object data properties and then just open up this shape keys tab right here so i'm now going to click on the plus to add a shape key and the first one here is just the basis so we want to leave everything how it is now i want to click on the plus again and it's going to add key one so key one is going to be the first key and that's the only one we're going to use so make sure the key one is selected just by clicking on key one and then i'm going to tab into edit mode i now want to press a to deselect everything and then i'm going to hover my mouse over the canon and i'll press l and that is going to select all of the linked vertices so i can now press g to grab click with your middle mouse wheel to constrain it i'm just going to bring it back just like that and then click to place that so if i now tab back into object mode you can see it kind of goes back but if you click on this key one you can change this value right here and that is going to make the canon look like it's shooting all right and that is it so let's just press ctrl s again to save so i now want to select this and then shift select this and i can press g to grab click and hold with your mouse wheel and then g and z we're going to bring it up and then you can also press s to scale because it is a little bit too big right now and i don't want it to be quite that big and then i can just bring it down here and i do want to bring it just above the top of the pillar so i don't want it to be going through because if it's going through then it's going to cause issues with the rigid body physics so just something like that you can just go inside here and make sure it's not going through so just something like that is very good so i now want to select this one and then shift select the bottom one and i want to duplicate them and move them over to make the other cannon so i will press shift d click and hold with my mouse wheel and i'm just going to move this all the way over to the other side and then i do want to rotate this over so it's facing the other cannon so i'll rotate this over on the z-axis and i'll rotate it over by 180 degrees so i'm going to type in 180 and enter so it's facing the other cannon and then this one this is on the blue team so i want this to be on the red team of course you can make whatever colors you want but i'm going to make this on the red team so i'm going to click right over here on the material properties and i'm going to make sure the blue is selected i can now click on this button right here and that is going to duplicate the material and i can now just call this red so now that that material is separate from this one we can change it and it's not going to affect the other tank so on the base color here i can just make this a bright red color uh something like that alright so we now have the blue team and the red team so now let's go ahead and create the bullets so i'm going to press shift a and for the bullets i am just going to use a uv sphere so i'll bring the uv sphere up and i'm going to also with the object context menu shade it smooth now this first one here i'm going to click on the drop down and i'm going to add the blue color because i want it to be the bullet for this blue team so i can now press 1 to go to front view and i'm going to press z and move my mouse over to go into the wireframe view so i want to zoom in here and i want to scale this down and move it into place because i don't want the bullet to be bigger than the canon because that wouldn't make any sense it has to fit through the canon so that way i can see that it's the correct size now i also want to press g to grab click with my middle mouse wheel and i actually want to put this inside the head of the canon and this way we can animate it shooting out of the canon head but you won't be able to see it uh before it shoots now i need to give this object physics as well so let's click right over here on the physics panel and i'm going to add rigid body now again this one is going to be animated so i want to turn on the animated button right here and then also the bullets need to be very heavy and that way they will have momentum to push over the towers so i'm going to change the mass here on this bullet to 20. so i think 20 works pretty good you can play around with it and change it to whatever you want if you want the bullets to be much more weak you could turn it down to maybe just like five or ten i'm going to change it to 20 because i think that works pretty well all right so that is very good now let's also press shift d and i'm going to click and hold with my mouse wheel and we're just going to push this other bullet into the head of this one and then this one is on the red team so i want the bullet to be red as well so i'm going to click right back over here on the material properties and i'm going to click on the drop down and i want to change it from blue to red so now you can see that this bullet is red all right let's press ctrl s again to save alright so we are now ready to do the animation so you can change the animation to whatever length that you want um but i know that i want my animation to be around 400 frames so right here on the end frame i'm going to set this to 400 and then just hit enter just because i like 400 frames all right so the first thing that we need to animate is the heads rotating and then after that we're going to animate the bullets so let's just go into the camera view and if you press the space bar to play the animation you can see that these just fall through the ground and that's because we haven't set up the rigid body for the ground so just click over on the rigidbody properties and i'm going to click on rigidbody and then this plane is not going to move at all so i want to change it from active to passive now if i click on the spacebar you can see that everything just sits there so let's animate the canon heads rotating so i'm going to click on this one and then we can just play this and just start to play it so i want the canon head to start rotating somewhere around here kind of at the starting so what i'm going to do is turn on the auto keying and that way it's going to automatically add keyframes when we move the objects so i can now just press r to rotate and then just click and place it exactly where it is and you can see it's going to add a little diamond there and that is a keyframe on the timeline so i can now just play this go a little bit farther kind of to over here and i can just press r to rotate z on the z axis and just kind of rotate it over like that and then i want to press the space bar and just move it over a little bit more and then i can click on this keyframe right here and i can press shift d to duplicate it and i want to drop it over here and that way now you can see that the canon head just kind of rotates and then rotates back so now i want the canon head to shoot kind of about here so what we need to do is we need to animate the shape keys so to animate the shape keys just make sure this object is selected and i'm going to click right over here on the object data properties and then right here we have key one so this is what we need to animate so i want the canon to shoot right here right after it turns so i'm going to hover my mouse over this value and i'm going to press i and i is going to add a keyframe now i'm going to use my arrow keys and i'm going to move over by three so to zoom in here and move over by three and then i'm going to change this value to one and that way the canon is going to go in and then because we have the auto keying on it automatically added a keyframe and then using the arrow keys you can jump ahead three more keyframes and i'm gonna bring the value down so it's back to zero and then it automatically added a keyframe so now if i play through this you can see the canon just shoots so now let's go into the wireframe view and i'm just going to select the bullet and then i can press 7 on the numpad to go to top view so now just play through this and make sure that you're right at the spot where the cannon shoots so i will press g to grab and then just click to place the bullet right there in the center and then i'm going to move over just a little bit kind of till right at the end after the canon has shot and then i'm going to press g to grab click and hold with my middle mouse wheel and i'll just bring it out a little bit um to something like that now if you click right back over here under the physics properties you can see that we still have the animated value turned on now we want to animate the animated value turning off because what we want to do is we want to first have it be shot out and so we want it to use the keyframes but then right when it's reached the end point right here we want it to stop using the keyframes and use the rigid body instead so right over here on this frame where the keyframe is the last keyframe i'm going to hover my mouse over the animated value and i'm going to press i and that will insert a keyframe i now want to use my arrow key and just hop forward one frame so now what i want to do is uncheck this and then because we have the auto key turned on it's automatically adding a keyframe so on this keyframe the animated is still turned on but then this keyframe the animated is turned off and this way the bullet can still be animated but then right here when the animation is finished it will turn back into physics and it will then act with all the other physics now we do have one problem with this and that is it starts to speed up but then it starts to slow down at the end and so if we have it like this speed up and then slow down then the ball will just kind of drop down and it won't really have any momentum and so what i want to do is i want to change the keyframe interpolation to a linear and that way it'll be a consistent speed so to do this just press a a couple of times in the timeline to make sure all of the keyframes are selected i can now press t and t is going to bring up the keyframe interpolation so right now the default is set to bezier and you can see it kind of has a little icon here where it slowly speeds up and then slowly slows back down but i want to change this to linear and that way it's not going to speed up or slow down it's just going to go from this keyframe to the next keyframe and then the next keyframe after that it'll turn back into the rigid body settings so that is it that is how you animate the bullet it might seem a little bit complicated but after you've done it a few times it actually gets pretty easy so now what i want to do is i want to bake the simulation now if you have just a small little simulation like this you can just play it and it might keep up but probably it's going to fall behind so to bake the simulation i am going to actually split this window so i'm going to hover my mouse right here and i'm going to click and then drag down and this will split the window and then also i can get rid of this top window right here because i don't really need it now this top window right here it's the same thing but i want to click right over here onto the scene properties and then you can just open up the rigid body world so we can just leave the rigid body world settings right up here and then the other settings can be down here because we are going to need to bake this multiple times to get it correct so i'm going to click on the cache right here and this will open up the cache settings so that we can bake the simulation now the end is at 400 so i'm going to change the simulation end to 400. of course you can change it to whatever you want and the animation looks good so let's just press ctrl s to save and then also you can change the simulation speed now i think the default does look pretty good at one but if you want the simulation to go faster you can turn it up to like a 1.5 or even two or if you want the simulation to be very slow you could turn it down to like a 0.5 or a 0.3 or something like that i'm just gonna leave it at one for now but you can play around with this so now let's click on bake and because this is kind of a small simulation it won't take very long and as the 3d scene gets more and more complex it will take longer to bake but in this case it baked really fast so now let's just play through this and see what it looks like so you can see that he kind of looks and he looks back and then he shoots and there we go so the cannon is smashed off now i don't really want it to hit the cannon i want it to hit the tower instead so what i'm going to do is i'm going to select the bullet and what i want to do right over here here is the bullet animation i want to make the bullet a little bit slower and that way the bullet will go down a little bit more so what i'm going to do is press b for the box select in the timeline and i'm going to box select these keyframes right here i can now press g to grab and i'm just going to move them over two keyframes and that way it'll just make the bullet a little bit slower and that way it'll fall down a little bit more and that way it will hopefully hit the tower right here instead of up here so we need to now re-bake this so i'm going to click on delete bake and then i can click on bake again and again it doesn't really take very long for me because this is kind of simple but if you have a really big scene with lots of animation then it will take longer alright so let's just play through this and you can see something is definitely wrong here so you can see that there's a bunch of little glitches right here and there are a few reasons why this might happen so one reason why this might happen is because they are overlapping objects so if you press three to go to the side view you can look up really close and just make sure that these objects are not overlapping now if they are a little bit too close you can tab into edit mode and then you can go over into the wireframe view and then you can box select some of these pieces of just the bottom pieces right here and you can press g to grab and z on the z-axis and just move it up a little bit and that way it'll just have a little bit more space so just look over on side view and just make sure that your object isn't overlapping at all you can see there's just a tiny little gap right there and there um so that looks good and then right over on this one just make sure there is a little gap now the other thing that we can do is we can turn on the animated values on the bottom parts of the canons but then right before the bullet hits the tower we can turn the animated value off and so it'll use the rigid body so what i'm going to do is i'm going to select this one here and i'm gonna turn on the animated value and i'm just gonna wait and see when the bullet is about to hit the tower so right here on this keyframe i'm going to press i on the animated value then i'm going to use my arrow keys and move over by one frame then i can click to turn this off and again because we have the auto key on it's going to turn it off and add a keyframe so now i can just delete this and bake it again and now if i play through this you can see that it's not moving until right before the bullet hits it so i do want this cannon to shoot as well so i'm going to go right back over here more towards the starting and i'm going to kind of have the cannon rotating around so i'm going to press r to rotate and then click to place that then i'll move over a little bit and i can press r and then z and just kind of rotate that over and then just move over a little bit farther and i want to rotate this over so let me just go to top view by pressing 7 on the numpad and i want this canon to kind of shoot a bullet right over here so i'm going to press r to rotate and i'm just going to rotate this cannon over and just rotate the cannon head until it's facing the side of this other tower so now i want to animate the shape keys so let's click right back over here to the object data properties and we have the shape keys right here so i'm just going to go to the end here right when it stops moving and on the value here on key one i'm going to press i to add a keyframe and then again using my and then again using my arrow keys i can move over three frames and then i can change the value to one and it'll add a keyframe and then i can move three frames over and again change the value back to zero so now what i want to do is go into wireframe and i want to select the sphere and i'll also press 7 to go to top view and we can now animate the bullet so i'm just going to move back kind of right here and i'm going to press g to grab and then just click to place it so it's right in the center there and we now have a keyframe there so i can now just move to the end till after the canon has shot and i'm going to press g to grab and i'm just going to move this bullet out right about there just try to aim it at the tower wherever you want it and then again we need to have this be animated but then we need the animated value to turn off so to do this just click back over on the physics properties and right at the very end here while the bullet is still moving on the last keyframe i want to press i and that way it'll add a keyframe on the animated value then i can use my arrow keys and i'm just going to move forward by one frame and then i can turn the animated value off and again it's going to add another keyframe right there and then again this is slowing down because the default is bezier so what i want to do is just press a to make sure all the keyframes are selected and i'm going to press t and then i want to again change this to linear instead of bezier and that way it'll be a consistent speed from the first keyframe to the second keyframe so right back over here on the bake settings i'm just going to click on delete bake and then i'll bake this again and there we go so let's just watch through this that looks pretty cool now you can see that it didn't really take down all of the tower it just took down a little bit of it so i want this one right here i want this one to shoot a second bullet so what i'll do is i'll click on the bullet right here on the blue cannon and i'll press 7 to go to top view and then let's go into rendered mode and just kind of zoom in here to the starting so i can now press shifty to duplicate and then i'm just going to right click to hop its back to its default position and then because we already animated the keyframes i can press a to select all the keyframes and i can press g to grab and just kind of move them over here so i can now just play through this and figure out where i want the second bullet to start so i want the second bolt to start probably around here so i will just press g to grab and i'm just going to move the keyframes over just like that and then i'm going to click on this canon right here and we already have the keyframes of the canon shooting and they are right here so what i can do is i can just box select these right here and i can press shift d to duplicate and i can just move them over and then i can just find where the second bullet shoots so here's the second bullet and you can see that it shoots right about here so i'm going to press g to grab and just kind of move this over so it looks like it's shooting the second bullet and of course if you want to rotate this again you can so you can add more keyframes and have it rotate as well so now we have two bullets so i'm just going to click on delete bake and then we'll bake this again and here's the second bullet but you can see the second bullet is at the same exact location and what i want is i want the second bullet to be a little bit slower and that way it'll hit the tower down here so what i'm going to do is just select the second bullet and then right over here on the keyframes i'm going to box select the last two keyframes i can now press g to grab and i'm just going to move them over by two keyframes and that way it's just going to be a little bit slower so again i can click on delete bake and then i can bake this again and now we can just play through this and there's the first one you can see the second one is a little bit slower so because this was a little bit slower it's going to hit this at a lower spot so let's just animate this one more time so i'm going to add one more bullet and we'll have the other bullet hit right here but before we animate the bullet i want the cannon head to rotate and that way it'll hit the side of the tower so i'm going to press 7 for top view and i want to kind of move it over here and then i'm going to press r to rotate and then just click to place it so it stays back at its default position and then i can just move over a little bit maybe over here and i can press r to rotate and i'm just going to rotate it over slightly so that the bullet will shoot right over here so again i can go all the way back to the starting and i'm going to go into wireframe view and then i just want to select one of these bullets i'll now press shift d to duplicate the bullet and then just right click so it hops back to its default position now we already have the keyframe you can see there's the keyframe right here so i can press g to grab and i'm just going to move the keyframe over and then i'm going to figure out where i want it to be so i want it to start right about here so i'll press g to grab stick it right there but you can see that this bullet has been animated to go forward and i want this bullet to instead go sideways so to fix this i am going to move my blue line right over here to the second last keyframe so these two keyframes are the keyframe in between where the bullet is shooting and then the last keyframe here is the animated value turning off so i'm going to move right over here and then if i make a new keyframe it's going to override the previous keyframe so i can press g to grab and i can just move it over just like that so now if i play through this you can see it's shooting sideways and then again we do want this canon head to look like it's shooting so if i move right over here you can see here is the animation of the shape keys so i'm going to box select these keyframes and then i'll press shift d to duplicate and we're going to bring it over here and again we need to find the spot where the third one shoots so right about here so i can press g to grab and just move the keyframes so that it's synced up with the last bullet shooting alright that looks pretty good so once again we need to click on delete bake and then bake it one more time alright so this is looking pretty good but there is one more thing that we need to do this object here we have the animated turned on because the object is being animated and it's moving around but i don't want it to be animated right at this point right before the first bullet will hit the tower so what we need to do is again just animate the animated value turning off so i'm just going to move right here right before the bullet hits the tower and i'm going to press i to add a keyframe on this object on the animated value then i can use my arrow key to just go over by one frame and i can turn off the animated value and then again i'll press i to insert a keyframe and we have the auto key on so we actually already added a keyframe so i can just delete the bake and then bake it one more time and there we go so you can see now that is working just like we want alright so that is finished now if you wanted to you could bake the object to keyframes but i found that you really don't have to make the object to keyframes if the bake looks correct then it should render just fine what i want to do though is i want the camera to move throughout the simulation so i'm going to go into the camera view by pressing 0 on the numpad and then i'm going to select the camera i can now press g to grab and then click to place it and that's going to add a keyframe on frame 0. so i can now move all the way over to the 400 frame just go to frame 400 and i can now just move to wherever i want the camera to be so i want the camera to be somewhere around here i can now press ctrl alt numpad 0 and that is going to hop the camera to where we are and you can see it's also added a keyframe now the problem with this is that the camera starts to slow up and then kind of slows back down and i don't really want this i want the camera to play at a consistent speed so i am going to select the camera and then right here just press a to make sure the keyframes are selected and then i'm going to press t and i want to click on linear so that that way the camera moves at a consistent speed all right and there we go so i can just play through the animation and i do think that looks pretty good now if you want to switch your camera angle during your animation i have a tutorial on that it's a tutorial on how to switch different camera angles throughout an animation so i'll have a card right up there on the screen and a link in the description if you'd like to check out that tutorial so we can now do the render settings and render these all out to images and then we will throw the images into blender's video editor and video edit together the final video so let's click right up here on the render properties now the render samples i'm just going to change this down to like a 20 because i don't actually need that many samples um because there aren't very many complex materials now if you want the render to go faster you could definitely use blender ev so blender ev is a real-time render engine so it renders much faster than cycles but as you can see ev does not look nearly as realistic as cycles so i will be using the cycles render engine but you could totally use ev if you want to and then to make the render even faster i'm going to open up the light paths and i'm going to turn most of the light paths off so the max bounces i'm going to turn the total to 2 the diffuse to 2 the glossy to two and then everything else can actually be turned to zero so transparency transmission the indirect light and also the filter gloss and both of the caustics we can all turn those down to zero and you can see it actually doesn't look any different in the rendered view but it will render much faster and then one last thing that i want to do to make each frame look really nice i want to add a denoise in blender's compositor so if you go over to blender's compositing tab you can click on use nodes and this is going to use the compositing nodes now right in here i want to press shift a and i want to search for the denoise node and i'm just going to drop the denoise node right in there and this way when we render the frames it'll use that d noise node and denoise the image and make it nice and smooth so i can just press f12 and we can render out a preview render you can see it's rendering and it's not taking my computer very long and you can see it was kind of grainy but then it activated the denoise and that looks much smoother now so now we just need to set an output for our images so i'm going to go right over here to the output properties and then right down here under output i need to set an output for the images so i'm going to click on this file icon and then i've made a folder on my computer called images and i'm just going to click on accept now you should definitely set the file format to an image format but i'm going to use the jpeg instead of png because jpeg images are lower file size and then also set the quality to 100 and then before you render all the images one other thing you can do to make them look a bit more realistic is if you go right up here to the render properties you can turn on the motion blur so the motion blur is really going to help to make it look more realistic because things that are moving it will be blurred just a little all right so let's just press ctrl s again to save and then i'm just going to click on render and i'm going to click on render animation and that way it'll render out all the images to the folder all right and it just finished so i'm just going to press ctrl s again to save and then let's click on file and i'm just going to click on new to open up a new general so now that we've opened up a new blender file i'm going to click over on the video editing tab now if you don't have this video editing tab you can click on the plus here and then you can go down to video editing and open up the video editing so right down here on the timeline i'm going to press shift a and i'm going to go down here to image sequence and then here is the folder where i rendered out all the images to so i'm just going to press a to select everything and then i can click on add image strip all right and there we go so there is the final animation now if you want to add music and sound effects that would definitely help i won't be adding any music and sound effects though in this tutorial just because i want to focus on the physics simulation but it's really easy just to drag and drop sound effects into blender's video editor so now let's render this out to a final video so to render it out to a final video i'm going to go right down here to the output settings and i'm just going to save mine out to the desktop as like final video something like that and then the file format i want to change this to ffmpeg video now if i go right down here and open up the encoding i like to use a container of mpeg4 and then if you open up the video i like to use a video codec of each point 264 and then i just leave this at medium quality and good and then if you have any audio i like to use the aac audio format or you can just click on no audio if you don't have any audio so then just make sure your end frame is at the end and you can just save this file if you'd like and then you can just go right up here to render and you can render out the final animation and there we go so there is the final animation so that's gonna be it for this tutorial thank you so much for watching i hope you enjoyed the tutorial and i hope you learned a lot as well and if you'd like to help support me and this youtube channel some great places to do that are on my gumroad store and my patreon page i will have links in the description but thank you for watching and i hope to see you in a future tutorial
Info
Channel: Ryan King Art
Views: 1,894
Rating: undefined out of 5
Keywords: Ryan King Art, Blender Tutorial, Blender, Ryan King, Tutorial, plank, tower, physics, simulation, plank tower, rigid body, blender tutorial
Id: HWzFLrGq_dU
Channel Id: undefined
Length: 52min 34sec (3154 seconds)
Published: Fri Nov 05 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.