Tutorial: Tipping Over Stacks of Cubes in Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Polyfjord is the man

👍︎︎ 2 👤︎︎ u/shniggzz 📅︎︎ Sep 23 2021 🗫︎ replies
Captions
[Dramatic music] In 2013, I did my first rigid body simulation in Blender and ever since, I've been completely hooked on all types of physics simulations because in Blender, you can simulate liquids - - particles - - cloth - - smoke - - and even fire! But the one tool that still gives me the most joy eight years later is Rigid Body simulations. Blender has a built-in physics engine where you can specify any solid object's mass collision shape, friction, bounciness and then you just press play! [Music intensifies] This way of animating is such a refreshing  alternative to working with keyframe animation and I think it really changes  the content you create too! Like, we tailored the main plot in our bachelor's film to involve as many simulated stacks of cubes as possible just as an excuse for me to play around  with rigid body simulations for an entire semester. [♪ ♪] So in this tutorial we'll set up a simple rigid body scene where we can tip over a stack of cubes and then we'll have a look at some of the  possibilities using this free and amazing tool. [Dramatic music ends] So right now we are just two clicks away from  making this cube into a rigid body object   so first let's go to physics properties  and then just enable rigid body. Now you can press play, and the cube just falls to the ground. So let's get rid of this other stuff and let's scale down our cube and let's hold down  control. Let's do 0.2 is nice. and let's move this on the Z axis. So press G to move, and then Z and then hold down Control Shift. Let's do 0.2 So now our cube rests nicely on the ground. Let's make a ground plane. Shift+A, and let's make a plane. Scale it up, but the problem is, now when we press play, our cube just falls right through the ground. And that's because we need to make the ground a rigid body object as well. So enable Rigid Body, but now they both fall to the ground. So we have to set the type of the floor to passive, so the cube can rest nicely on the floor. Now let's make more cubes. Let's press shift D and move it on the Z axis. Hold down Ctrl+Shift to make it 0.4. Now, what we just did was just one action, so you can press Shift R to repeat that action. And then just-- you can hold it down even. Brooop! And then you have a lot of cubes. There we go let's interact with  this. You can use anything. You can use something else from a different blend file or you can make, like, a cylinder. Or you can maybe use both. Let's do this, uh-- there we go. And it doesn't really matter what object it is, just have an object and   make it a rigid body object, and set the type  to passive, and under settings make sure you   check the animated button. So now we can press play and we can interact with our scene. But I think this moves too slowly. So let's go to scene properties and under rigid body world set the speed to 2. So now it's going to move twice as fast. But there's a problem. Our stack of cubes tips over before we interact with it. And we can prevent this by deactivating the cube before   it is interacted with. So select all your cubes make sure one of them is highlighted. Move down to the physics properties, and under dynamics and  deactivation, we're going to click both those two buttons. But before we click them, make sure you hold down alt so that all the cubes are going to   be affected by this change. So click 'Deactivation' and 'Start Deactivated'. And now when we press play   it doesn't fall over. However, when we interact with this, it behaves really weirdly. The cubes roll around on the ground in a really weird way, and the deactivation might not even work in some cases. There is a mistake we have made here. And that is that the scaling of these objects are wrong and let me just show you what this means. If you were to reset the scale of these objects   Blender is trying to calculate this mess that  is sort of what's going on beneath here. So let's   take all these objects and just apply the scale  by pressing Ctrl A. And this is really important   that you keep in mind when you're changing the  scale of rigid body objects. So now our animation   plays smoothly and it works as intended. And this is where things get interesting, because now let's take our stack of cubes and let's duplicate it Shift+D on the X-axis, and hold down Ctrl, let's do 2 meters. And now we can use Shift+R to repeat that, and then just hold down Shift+R  and you have a bunch of cubes! So let's take our ground plane. Let's scale it up on the X-axis let's move it on the x-axis as well. Remember to apply the scale, Ctrl+A, and now we can   press play and we can just destroy  all these cubes. How satisfying is that I can do this all day. And I have, on several occasions. So you can keyframe this animation   by selecting this object pressing insert, location keyframe and then go 200 frames and   let's move this over here, and then make another  location keyframe. Let's just destroy some cubes! Okay so I want to show you one more thing. Select  your stack of cubes and the ground plane. And then   go 'Select', 'Invert'. So you can just delete all this  other stuff. And let's scale down our floor on   the X-axis. Let's move it to the center. Remember to  apply the scale. And this is sort of our base scene   where we can just have fun and do whatever we  want. So press Shift+A and let's add an icosphere. Let's move this on the Z-axis. Make it a  rigid body object. And let's just press play! And I'm not super happy about how this moves. You can see it's sort of like low poly and   to fix that you can set the collision shape to  'Sphere'. So now you can press play and the sphere   moves like an actual sphere. See that? So let's make  our stack of cubes a little bit more interesting. Select all your cubes, and then move them one  meter on the X-axis. Hold down control to snap   it to the grid. And now we want to duplicate our  cubes in a circle, like this. So set the 'Transform   Pivot Point' to '3D Cursor,' press Shift+D, and then  rotate and then press Z. And now it's rotating   around like this. So let's hold down Ctrl and do  30 degrees, and then you can just press Shift+R   repeat the action and we have a much more  interesting shape. So let's have a look! Interesting. Let's try and increase the  mass of the sphere. Let's set this to 25. That is really satisfying, it just goes through all of them. Now before we end the video I just want to   show you one last thing that is [Chef's kiss] it's so good. So zoom out, and let's move our sphere higher. There we go. Now this sort of demolishes this  entire thing, right? So now we're going to go   to 'Scene Properties' and under 'Speed', which is  the time scale of the simulation, let's go to   right before the impact, there we go, you can  use your arrow keys to move back and forth   and let's right click insert a keyframe. And  then advance by two frames or three frames   it's going to look really weird, and then  set this to 0.1. And now we can insert the   keyframe, and what we just did was that  first this is going to go fast and then   it's going to be super slow motion, and it's just  going to take your simulations to the next level [Suspenseful music] Now that we've gone through the basic setup for  rigid body simulation, it's your turn to take   things further. Here are some quick suggestions  if you want to keep going on your own. Make an   interesting shape and set the 'Collision' to 'Mesh'. And if you set this as a 'Passive' object it could   work as a ramp to easily give your 'Active' object  some horizontal speed. And then if you bake your   simulation to keyframes you can parent your  simulation to new objects [Ctrl+P]. This way you can add  a layer of animation on top of your simulations. So  in this case we can bend this a little bit and the   object just feels heavier! It can really help your  narrative to add animation that doesn't interact   with the simulation. They're just conveniently  timed keyframes. Maybe you can make a little   hatch or something so there's room for a surprise  at the end. And remember, when you're doing rigid   body simulations, if you try and tweak tiny values  over and over again you might get some results   that are really unpredictable, and I think that's  what makes this whole workflow so fascinating. [Mysterious music] One final thing: If you want to support the  channel, I just started a Patreon two weeks   ago, where I have prepared different types  of project files that i think might be   interesting for you to play around with. It's  not that much content there yet, but i'll try   my best to come up with ideas for project  files that I hope you may find interesting   So now I've plugged it, and now you know about  it, and I'll get back to making more tutorials   because these past three weeks of making  these two tutorials has been so much fun. [Increasingly suspenseful tone] [Robotic glitch noise] How cool is it that you can just keyframe  the time of the scene? I just think that's   really interesting. And I just-- I just love  rigid body simulations [awkward chuckle]. Thanks for watching!
Info
Channel: Polyfjord
Views: 2,524,741
Rating: undefined out of 5
Keywords:
Id: 2Dnks7C2q9U
Channel Id: undefined
Length: 9min 23sec (563 seconds)
Published: Wed Aug 18 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.