How to use Rigid Body Dynamics in Blender (Make your own explosion)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi my name is chris bailey and i'm a blender youtuber over at c bailey film and today i'm bringing you this tutorial with cg cookie we're going to be talking about rigid body dynamics that's right we're going to be breaking stuff let's get started now don't forget to check out cgcookie.com there's a ton of amazing material there for you to learn and grow your blender skills you can start a free account today now this is going to be a basic introduction to rigid body dynamics how do you get things to behave with proper physics as they bounce around and knock into each other it's gonna be a lot of fun and we'll end with a really big explosion so stay tuned to the very last second let's jump into it okay here we are inside of blender now we're gonna start talking about rigid body dynamics with a simple demonstration i'm going to come over here to the physics properties tab with my cube selected you can see we get a couple of options we're going to go ahead and click rigid body to activate it now i'm going to create a plane that i want this cube to fall onto so i'm going to hit shift a and go plane and scale it up and i'm going to also with this plane selected come to the physics properties tab and click rigid body everything needs to be activated as a rigid body in order to behave in the simulation now in order to get things to work i need to make sure my cube is above my plane uh because i want it to fall and hit the plane okay so there's two modes that we have here you can see we've got active and we've got passive and right now i've got my cube set to active and that means that it's going to behave with gravity it's going to be an active participant in the rigid body simulation so it's going to move around however if we select the plane let's switch it to passive now passive means it's not going to be affected by gravity it's not going to react to other objects but it's still a part of the simulation so it is going to react to other objects in the sense that objects can react with it so this cube can still fall and impact this plane but the plane is not going to fall with gravity and it's not going to hit other things and bounce around so that's basically two differences so passive it just sits still and lets objects react to it whereas active means that it's an active part of the scene and it's reacting to other objects in the scene now with those two things set you can go ahead and hit play in my timeline and you'll see we have a simulation that's not very exciting but hey things are working and that's always a positive thing right i'm going to go back to the beginning of my timeline i'm going to rotate my cube and run it again you can see the cube behaves properly as if it's a physical object in the scene now let's make this a little more complicated let's duplicate the cube and create a few of these guys all right so i've got a few cubes different sizes let's see what happens so you can see they all interact with each other just by turning on rigid body and having active now that's the beauty of rigid body dynamics is that it really works out of the box quite well let's introduce something a little more complicated to our scene i'm going to delete these guys and i'm going to go shift a and i'm going to create a monkey and i'll grab it up also get rid of my light my camera so they're out of the way now this suzanne monkey has got a pretty irregular shape to it right so let's go ahead and turn on rigid body dynamics and let's hit play to run the simulation well you can see she actually behaves quite well now there are different ways of calculating the collision process and what's going on right here you can see we've got convex hull with convex hull it's basically blinder's creating a simplified mesh and then shrink wrapping it around the object that you have and whenever something collides with that mesh then it it calculates the collision for it so it's basically like it reduces the geometry so if you have a lot of geometry on your object then it's a way for it to calculate things faster now you've got some simpler options like for example box now you can see we get a box around the monkey and if i go back to beginning let's run the simulation with box you can see it behaves as if it was calculating with just this box so these different shapes allow for different types of results and say basically they're there to simplify the calculation so if you have a lot of objects let's say and maybe they're a bit complex but you don't need it to calculate exactly for every vertex in your object you just wanted to calculate just the basic bounds of the object then one of these is going to be a really good option now if you also conversely want to go super detailed and use every single vertex in your mesh and it's they're all important for the collision then you can switch down to this one here which is mesh and that will actually take the literal mesh of your object now when you switch to mesh you do have a couple of options so like if i was to come in here and add in a subdivision surface and maybe a uh let's see a displacement and i'll create a new texture and i'll jump to my texture tab and i'll just create a clouds texture and then go back up here and just turn it right up so it's a really crazy crazy looking thing now if i go back and run my simulation with mesh turned on you can see that i've got mesh actually popping through the bottom of my plane so it's not really calculating with these it's actually just calculating with this base mesh because you can see if i run this it doesn't cut through so the issue is coming from these modifiers well if i come back over to my physics tab i have this option here called source and if i switch this from deform to final and then run the sim you can see it will actually calculate it with those modifiers in place so this is the slowest process to go through so this setting is the slowest one to calculate because it has to consider so many things so what you want to do is find a nice balance what's going to give you the right kind of realism and how can you step it back enough so that you can have a nice speedy simulation with a lot of things going on now there's a couple other of options if we open these up here we can talk about these really quick so we've got surface response we've got friction and bounciness if i was to turn bounciness right up my surface if i click on my surface i've got .5 friction and zero bounciness on the surface so if i crank it up on this one as well i'll come back i'll actually get rid of these modifiers just to simplify my uh my sim i'll come back over here and switch this to deform so now i'm going to take my surface and i'm going to turn my bounciness up i will go to one i'll go all the way up to three make it really a really bouncy surface you can see that suzanne bounces off it a bit but i can get even more of a response if i make the object itself bouncy so so you can see i got a nice result here with a really funny bouncing suzanne and that's with suzanne set at the bounciness of two the friction of five and the ground plane set to a bounciness of one with a friction of five now sensitivity we've got collision margin this allows us to kind of build in an extra margin so if i was to turn this on and crank it up let's pick it up high actually you can see that if we run the simulation suzanne is going to be bouncing as if she's not quite hit the surface now if we have lots of different objects we want to be colliding things with but not every object colliding with every object you can use collections to sort that out so if i had a cube here let's say and i want the cube to sit here on my plane as a rigidbody passive but i don't want suzanne to bounce off of it you know at the moment she's going to hit it and i'll just move it over actually so at the moment susan's going to hit the box and kind of fall off but let's say i don't want this box to actually behave that way so so now with this cube what i can do is select it and i can just switch it over from this first slot to the second one and now you can see suzanne's on the first and so is the plane if i run the sim suzanne is going to now ignore the box even though it has rigid body in it so now what i could do is i could create let's say a uv sphere grab it up here and i could set this to rigid body as well and then i could say actually i'm going to hold down shift and click the second button now the sphere is in both of these collections so now when it runs the sphere is going to actually react to both the ground and the keyboard suzanne's just going to react to the ground so that's a really helpful way to kind of pinpoint exact collisions for different types of objects and have a bit more control of how everything's going to interact together so i'm going to do rigid body stuff let's do something really fun with it all right so i'm going to take a ground plane here just create a normal plane i'm going to turn it under rigid body i'm going to make it passive i'm going to go shift a create a cube i'm going to grab it up on the z a little bit i'll go into edit mode and grab the top face and i'll just grab it up like that there we go so i've got myself a little building uh very cool now i'm going to scale my cube right up okay so it's really big and also make sure it's not intersecting my ground plane i'll just bring it up so it's just sitting right there all right now make this ground a bit bigger got ourselves a tower now there's a great uh add-on in blender that you can turn on if you go to preferences and just type in fracture into the search box and you can turn on object cell fracture i'm gonna go into edit mode and i'm to go f3 and type subdivide and then i'm just going to turn this right up so we've just subdivided this thing a whole lot i might even do it one more time so i'll go f3 subdivide again so now i've got a very subdivided mesh now i come out of edit mode i'll hit f3 and i'll type fracture and hit enter and just with the base settings here i'll just click ok and fracture will run and it starts to create this really cool shattered version of my object now i'll turn off my original cube so all i've got now are all these guys i'm going to select all of my cubes and i'm going to drag them into this collection here and then i'll drag my main cube out of that collection and then i'll hide it so i've just got these guys now that they're in their own collection i can right click on it and select those objects we'll select all of them together i'm going to select one of these guys and i'm going to turn on rigid body and i'll leave all these settings just as is and then i'm going to right click and say select objects in the collection that will select all the different objects and then what i can do is shift select that final piece again the one that i set my rigid body on so it was the last one that's active and now if i type f3 type in copy and you can see this third option object rigidbody copy from active if you click that now it's going to copy over this rigid bodied system to all of these pieces and now if i hit play you can see we get a fantastic collapsing structure oh how cool is that now if we really wanted to have some fun we could have shift a create a uv sphere grab it up stick it right in the middle of our tower right turn on rigid body make it passive and now watch what's going to happen boom now if you take your sphere and just come right over to your object properties and go to visibility and you can just hide it in the viewport and your render now one thing you'll notice is that there's no cache button here like we usually have for whenever you want to save a simulation with rigidbody it's actually found in a different location it's not actually in the physics tab here you need to come right up here to the top to scene properties and underneath that you've got this rigid body world drop down if you come over here you can open up the cache or cache depending on where you are in the world and you come right down to the simulation starting in this we can set how many frames you want to cache and then you can click bake and that will run through and bake the simulation this is a really stable way of viewing your uh rigid body simulation is to bake it first especially if you've got a lot of pieces uh if you're just playing in the in the viewport you're gonna get unstable results sometimes especially when you go to render so if you start seeing weird results or things aren't making a lot of sense i would come over and hit that cache button just to make sure that you've got it just right now i really hope you enjoyed this tutorial today please hit that like button and don't forget to subscribe to the channel and leave us a comment as well let us know what you'd like to see in future tutorials until then thanks for watching i'll catch you in the next one see ya [Music] you
Info
Channel: CG Cookie
Views: 14,267
Rating: undefined out of 5
Keywords: make an explosion in blender, blender explosion, blender vfx, blender rigid body, rigid body dynamics, blender tutorial, cg cookie, How to use Rigid Body Dynamics in Blender, Make your own explosion in blender
Id: 9lDY5YN3SEA
Channel Id: undefined
Length: 12min 13sec (733 seconds)
Published: Wed Aug 04 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.