How to Use Physics in Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys this is jacobsripple here and today we're going to be talking about how to do physics and rigid bodies inside blender itself uh first of all i just want to thank this user for the tutorial suggestion if you guys have any suggestions please leave them down in the description below and also subscribe to the channel to get more awesome tutorials like this but without further ado let's go ahead and get started okay so we are in blender 2.83 but this hasn't really changed for that long so you can really work in a new blender version uh we're just going to go ahead and set up a simple scene and test around with some physics and stuff so first of all i'm just going to enable snapping up here and then bring this cube up one notch like this and then going to go ahead and add a mesh and uh a plane sorry and just scale that up a bit but basically we are going to make a wall of blocks so we can knock it down with physics so to do that i'm just going to go ahead and make a nice little rectangle selecting our default cube we can add s and then x to scale it on the x-axis and just make it a nice little rectangle like this i'm gonna go ahead and move all of the camera light and plane to its own collection by coming over here and adding a collection and we'll name this one non uh physics like this and then so again the cube or sorry the plane light and camera just gonna move all those to this non-physics section so we just have all the physics objects in the same collection so now we are actually going to create the wall itself and i find an easy way to do that is to actually do it through modifiers so if we come over here to the modifier tab and then add a array modifier you'll see that it looks like it extended the cube uh but what it actually did was uh create a duplicate and offset it like that so we are going to offset it 1.1 in the x and then for the count we're just going to increase that to something like 10 like that and you can see it duplicated it 10 times in the x direction now we can set up another array modifier but this time uh instead of it being in the x direction we want it to be in the z direction so if we type in 1 like that maybe let's do 1.01 like that just come to look on sides and you can see we have just barely a gap and this will help us when we actually add physics to the scene and so then we also want to um adjust it in the x a little bit to kind of make it stack like a brick pattern if that makes sense so just in the x we want it a 0.5 that's actually a little too much i think it's a 0.05 like that yeah so that's that's looking good right now and of course let's increase the count to 10 again show so we should have this effect so now if i select this you'll see that all of the cubes are still selected but we really want each individual rectangle to be its own object so to do that we're just going to go ahead and come over here and hit apply to both array modifiers and then if we go into edit mode by hitting tab and pressing a to select all the vertices and faces and then you want to right click and come down to separate by loose parts and so now all of these are individual objects they're their own cube but if you see if i rotate it all of them are rotating on this origin point right here so we actually need to change that i'm going to go ahead and hide this non-physics collection just so we can work with all these objects and then right here let's go ahead and just drag click all of those like that and then if we right click again we should be able to set the origin and we want to set that to origin to centered of mass volume so now you see that all of the dots actually align to the center of each cube so now if i rotate them they rotate on their own origin now to actually get a wall shape i'm going to go ahead and drag and bring all of these over by hitting g and then x and then bringing those over a little bit like this again just keep the snapping mode on and it should just drag over and have the same spacing like that and then i quickly just going to delete these once over here because these will won't really be needed so now we have our wall if we go ahead and unhide the non-physics layer you'll see that our plane is kind of off so let's go ahead and adjust that just by moving that around and then scaling this up a bit so now we're actually going to add our ball and so just go add mesh uv sphere like this and then we're just going to scale this up and go ahead and turn off snapping like this just make it a decent sized ball um just move it wherever you want it basically uh and then i'm gonna right click and hit shade smooth okay so now we have all of our objects actually set up in the scene so we can go ahead and start working on the physics so physics and blender is actually a really easy thing to do first we can look at the actual physics tab uh so if we come over here to the physics properties we can see all these uh fields and stuff we're actually just going to be talking about uh rigid bodies in this tutorial but i do want to make some other tutorials for these physics things so make sure you subscribe for those so with our plane selected we're just going to go ahead and tap rigid body over here and you'll see that this menu now pops up down here um these are the settings that we can set for it uh and all the different like dynamics and if they go into surface response we can set the friction and everything the only thing that we have to do for the plane is to just uncheck this dynamic box basically dynamic means that it's going to be affected by gravity and since we want this to be our ground plane we don't really want that falling and being affected by gravity next let's set up the actual physics for all the cubes uh so we're just gonna go and select this top left one right here uh and then again come over to rigidbody and select that and you'll see that again this menu pops up we actually don't need to do anything with this these are the default settings for any rigid bodies that we want to move and actually be affected by the environment so if we go ahead and press play you'll notice that this one falls and hits the ground but you will also notice that none of the others move in so you might be wondering how we can actually uh get all of them to move at once instead of having having to select each one individually and sending it to a rigid body so to get started i'm gonna go ahead and hide the non-physics collection i'm also to come up here and hide the sphere like that so that we just have all the cubes in the scene so if you remember we have already set the rigid body for the top left one and so now we're gonna go ahead and shift select all of these right here and making sure that the top left one is the one that is highlighted yellow and so now we can come up to the object tab and go down to the rigid body section and hit copy from active so now if we look at all these these all have the same settings as the active one that we selected up here so now if we unhide everything we can actually see when we press play that all of them are now affected by gravity and they stay in place on the plane okay i'm just going to quickly set up my camera so just coming up here to where i want the camera then holding ctrl alt and then pressing 0 on the numpad you'll see that we have some clipping issues so if you ever have that what you can do is select the camera object up here and then go to the actual camera tab and the clip start and end we just want to increase that in until we can actually see the objects uh so if you're having that problem quick tip like that um and so now we actually want to make the ball hit the wall uh and for it to be physically based and everything so an easy way i find is to actually play around with the animation of the ball and then right as we wanted to hit the ball we can disable the animation and enable the physics so let's go ahead and do that okay so to start we want to set our ball somewhere around this area uh like this and then just go ahead and hit i make a location keyframe and then just come i would say 10-ish frames down and we're going to go ahead and move the ball so it is almost about to touch the wall wherever you want um this to touch it doesn't really matter and then again hit a i for a location keyframe so now if we come down here we can right click and hit interpolation mode linear so that it's a linear change across the keyframes so now if we play this we'll notice that it's a little bit slow so i'm going to take this keyframe and just move it over a little bit to make it a bit faster and then just move both of these a little bit out so it doesn't start immediately so now if we play it we can see that we have this effect but you'll notice that it stops before it hits the wall and we want it to go through the wall so first of all we got to actually set the uh sphere to be a rigid body itself so again come to the physics tab then rigid body and so this is the interesting part we actually want to click animated this basically tells blender that the ball is going to be animated and so to not use the gravity of the scene and so we just want to make sure to click this little button right here to set a keyframe and then we can come all the way over to where our ball is about to touch the wall so the last keyframe you made previously and then just come over and turn the animated button off and set another keyframe so now if we view the simulation so you should see that the ball starts out as an animated object but then transfers to a rigid body so you'll notice that the ball kind of bounces off the wall and doesn't really go through it and so an easy way to change that is to actually mess around with some of the mass of the ball and the objects itself so uh you can come over here to the settings tab again selecting the ball in the physics tab and play around with the mass let's try five uh kilograms and yes so now you can see it goes through the wall that's actually a little too much i just kind of want it to barely break through so again you can just play around with this just trying to get the best result for what you're trying to accomplish so i think this is uh the result i was looking for and so you can actually see that some of them are falling off the edge over here so we're just gonna come back and scale this up uh and it'll continuously bake um so now we should see that it continues uh but you'll notice that they are like sliding a bit and i don't really want them to slide so uh next let's look at how to fix that so the first thing that we're going to do is mess around with the friction of the actual plane itself so we can just increase that to like this and now if we go back and play this we can see that the friction has increased a bit but it's still not enough so what we can do instead is actually increase the friction of the blocks so again let's hide the non-physics tab and the sphere back here and then we're going to select this top left one again and then we're going to come back to the physics tab to friction and we're just going to increase it this a bit but you'll notice that these blocks down here are still the 0.5 that we had as default and so we're going to do that same thing just select all these make sure that this is the active one come up to object object rigid bodies and then copy from active and now you'll see that all of them have this friction value so under hiding everything and turning our collection back on we can see and now we can see that the friction is actually a little bit more realistic and it doesn't slide across the plane like before so one thing that you might run into is blocks passing through some objects so if we look to the side view right here you can see that when this cube hits the ground it's actually going underneath the plane so an easy way to fix that is to actually play around with some rigid body world settings and so to do that we're going to come up here to the scene properties and then go to rigid body world then coming all the way back to start down here just make sure you're on frame round one the steps per second in the solver iterations the higher those are the longer it's going to take to actually calculate but the more accurate the results are going to be so i'm just going to increase both of these to i would say 100 basically just keep increasing these numbers until you find what works for you okay so now that we have the simulation to our liking we can actually bake in the physics so that none of the physics change anymore so to do that you want to come over here back to the scene properties and then come down to rigid body world and then open up this cache section and you can you can see a simulation start and end frame uh you can just match that to whatever you want i'm just going to leave mine on the default and then just bake uh this right here you'll notice that it kind of comes across here and now if we look at this uh every time we play it number one it'll be faster in the viewport and number two every time we play it we will notice that um the blocks follow the same path and don't really deviate due to random circumstances so these two blocks are at the same location okay so those are the basics to rigid bodies i'm just going to go ahead and finish up this scene so we can actually get a final render out okay guys this is the final result on the screen right now i think it turned out pretty good uh but again this was just kind of a beginner tutorial about rigid bodies uh if you do want me to make a more advanced tutorial please leave a comment in the comment section below and please like this video but anyway guys that's going to do it for me today again like and subscribe to the channel really helps me out also check out my other tutorials if you're interested uh but anyway guys thank you guys so much for watching and i'll see you guys later peace
Info
Channel: Jacob Zirkle
Views: 47,793
Rating: 4.9126215 out of 5
Keywords: How to Use Physics in Blender, rigid bodies in blender, rigid body tutorial in blender, Physics tutorial in blender, beginner physics tutorial in blender, playing around with rigid bodies in blender, fun things to make in blender, blender physics simulation tutorial, How to use rigid bodies in blender, advanced blender physics tutorial, blender beginner tutorial, ultimate guide to physics in blender, blender vfx tutorial, blender beginner vfx tutorial, how to make vfx in blender
Id: UgIoy9Wt_2g
Channel Id: undefined
Length: 13min 48sec (828 seconds)
Published: Sat Aug 29 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.