Tutorial - Super Satisfying Pill Simulation in Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi there it's dr. movie motion now I really appreciated the response to my last video where I showed off this pillow simulation and as promised because the video got over 200 likes I'm going to be showing you exactly how I made it in this tutorial now if you'd like me to share the blend file that I make today and check out this other video I'll link it up there and down in the comments and if you can get that video to 200 likes I'll share the blend file for free for all my followers so without further ado let's go into this tutorial so we've got a new blender file I've got screencast keys down here in the bottom left so you can see exactly what I'm doing and we're gonna leave the default cube actually we'll be coming back to this we're gonna make a new sphere the new mesh UV sphere and we're gonna grab it off in x-axis by 5 and we'll look at it from front of you now this sphere is going to be the basis for our pill we are going to go into edit mode wireframe we'll press B to select a box and we'll delete this top half but make sure you leave this middle ring and zoom into this ring we're gonna select it with alt and selecting I'm using left mouse to select but if you had the old right mouse click to select you would use that instead now we're going to zoom into it and we want to scale it down just slightly so it lines up with this ring below it so you can see what I mean I'm gonna press shift to make sure this is a really fine adjustment and just there you can see that this line goes straight up and down now this is gonna be the bottom half of our pill to make the top half we're gonna add a mirror modifier mirror in the z axis and not the X well back into edit mode now again what press be and select this bottom half and vertices this time again you want to leave out the middle ring to make sure you don't select that now we're gonna press G and Zed to grab this downwards and you can see it's looking like a pill and you'll have this around there okay perfect now we're gonna uh Nick merge because we want these two halves to behave differently so if I show you a real pill you can see the two halves are separate and one of them is actually inside the other we're going to get it to look a little bit like that and to do that we all need to keep these half separate so on tip merge now we have to leave edit mode to apply the modifier and once we've done that you can see these vertices are all real so it's applied that mirror modifier to our pill now we're going to select half of our pillar make it slightly smaller just like you can see that now you might think that's difficult because these vertices overlap but there's a really cool trick so you select any vertex in Bodo half press ctrl + + and this will expand the selection until you've selected - just the bottom half so we're going to leave edit mode and press shift s now we're gonna move the cursor to selected and you can see the cursor is right in the middle of our panel now and that's important because now we want to change the pivot point to the 3d cursor so that when we scale this down very slightly it kind of a lines and this is what you'd expect that to look like so you have scale it down by pressing s 0.96 and that looks about right the only problem with this which you can see if you go into solid mode like this is this the gap so these two sections aren't drawn together now this is really easy to fix they'll go back into wireframe mode to help us see this more easily and we'll select adjust this outer ring by pressing Alt alt I'm clicking and then alt shift and clicking list and I select both the Rings now we're going to use Glen's with edge tools with ctrl e to bridge the edge loops and you see it's connected now if we go back into solid mode you can see that the two sections are connected as you'd expect great so now we have our pill and its basic form we're going to get started on the environment that we're going to use to move the pills around so let's go back to our cube we'll move this pillow even more out of the way let's say 25 more will move the cursor back to the middle and we'll add a circle I'm gonna scale this circle 16 times to make it nice and big I'm go into edit mode now we're gonna go into front of you extrude it and we said access and we'll do this about twelve earth too much let's move it up just there and this is a total of eight now we want to fill the bottom so the pills don't fall out you can do this just by pressing F that fills the bottom I find that geometry isn't very good and you can get weird physics later on so we can fill it by extruding and sizing down the extrusion to 0.6 and then if we press shift all that repeats that and now we can press F and this will be okay now in front of you we'll go to wireframe mode and we'll move this cube up so it sits just on the bottom of our container now we're going to edit mode and scale our cube in the x-axis let's say 14 so now it doesn't quite touch the edges but it nearly gets to the edge of our container and this cube is going to rotate to move up hills around now we're not gonna keyframe this we're gonna use a really cool feature of blunder that lets you program in different movements very simply so we select the cube we go to object properties and rotations ed we're gonna type in hashtag frame and you can see it's moved and now if we play our animation you can see that's going to move around by itself now it's moving too quickly but we can adjust that really easily by doing frame divided by a hundred and now it slows down the movement a hundred times so you can see you get a really nice smooth movement now one rod rotating around doesn't give enough movement I want a kind of cross that will rotate around to move the pills around and I'm gonna do that super simply by duplicating this cube and offsetting it so here frame a divided by a hundred now we're gonna offset this by a quarter of a turn just really easy to do we just add PI over 2 which is equal to 45 degrees and you get the opposite now you have a cross that's moving around and it's gonna move up hills around let's save our progress so we don't lose anything and let's create a few thousand of these pills to make it more interesting I'm gonna leave this here in case we have to go back and make some changes so I will duplicate it with shift d and move it over here it's way too big so let's scale it too first let's move this pivot point back to medium point and scale zero point four I scale it zero point five now we have a good sized pill now we're gonna move this to a corner I want to make sure it's the same length across as it is down and that makes sense in a second so I've moved it back to the middle I'm gonna move it and you can watch on the top right there it says how much I've moved it so in the x-axis I view the Cross tent so now I'm gonna move it down 10 in y-axis no it's exactly on a corner that that's great I'll move it down slightly and we're gonna use an array to make a lot of these pills so let's go to the array tab add one fire array you can see me two of them we want more than that let's do 20 we do 21 that works up nicely and we're gonna make a second array modifier this time is gonna move it in the y-axis and again we'll have 21 and you can see we made a large quantity of these pills now at this point you could add a third array and make more of the pills stacking on top of each other and this add access but the reason I'm not gonna do that because I want to keep an eye on the number of objects in we see at the moment blender still thinks this is one object that's why in the bottom right it says one object is selected only so I'm going to apply the modifiers and then use duplication to make the layers of pills and that way I can keep track of how many objects are in the seat so I'll apply this then I'll apply this and we have this array but you can see it's still recognized as one object so we still need to split these apart we'll do that by going into edit mode pressing a to select all and now and now you go to mesh separate by loose parts and you can see the object numbers jumped up to 441 that we have selected here so we have 441 capsules we're gonna do something now to save us a lot of render time disk space and it's going to make everything run more smoothly in the simulation as well we're going to make these instances of the same object so blender doesn't have to calculate everything 441 times we're going to tell blender that these are the same pill and that way process everything much more efficiently so first object set origin origin to geometry now we're going to press ctrl L to make links and make things in object data now these are all going to be instances of the same object let's select this container hide it with H the time being and we'll use this as a chance to make the materials on this pill and you'll see that it'll set the material to all the pills and that's how you know the materials are all linked because the objects are linked let's focus in on this one pill let's go to Tyrael preview mode and we're going to go to the materials tab and we're gonna make a new material now the base material we'll use as the orange so let's just make it a bright orange for the time being to help us see what we're going to do I'm gonna go into edit mode wireframe to select this bottom half you can see is selected the bottom half of all of them because they're the same object and we're going to press ctrl + + just once to select the entire bottom half and here we're gonna press add it's gonna make a new material fees I'll go back to material preview we'll assign this new material to these faces [Music] we make this nice blue color you can see you've made the material for all the tablets I'm gonna play with this later but this is the base we're gonna use so we have 400 tablets let's make at least a few thousand let's move this light out of our way let's go back into wireframe mode and select all the tablets I'm going to miss the camera so don't select them now you would use Julie duplicate with shift d but that doesn't keep the links that we've made that's gonna make us seen one more efficiently instead of shift D we're gonna use alt D and now it's made a link to duplicate I'm going to move this up in the z-axis just above the first ones now we press shift our to repeat that and as I do this I'm keeping an eye on this object count let's do two thousand and if we need more we can learn more so this will do for the time being now we have all our pills let's select our camera maybe tricky and then select it from here instead and we'll move it out of our way and I'll press alt H to bring the box back and now we're ready to add the physics into our scene let's select all the pills unselect the container by pressing shift and clicking it twice and you see you only have a pill selected now we're going to select one of these pills to make sure that is the active object and we'll go into the physics settings right here rigid body we're gonna keep these as active let's bring the weights down let's bring the mass down to one gram and we're gonna and this is super important we're gonna change the collision shape from convex hull to capsule and this is gonna make sure it runs super efficiently we can leave the rest of the options as default and if we zoom back in you can see this object changed shape slightly because the physics is now being applied to this it's not being applied to the other pills yet we're gonna fix that by going to object rigidbody copy from active now it's going to take the physics settings from that one active element and apply it to all the rest of the pills this takes a little bit of time who is taking those same properties and applying them to every single pill so we're gonna have a little bit of patience while it does that so now it's finished copying over the physics properties you can select any one of these objects any one of these pill objects and you can see that it has the same properties as before so it's active it's zero point zero zero zero it's a graph it's a capsule shape and same for any of the pills and now if you press space will simulate our scene you can see the total for we haven't set a properties yet for these container and that's why it fell straight through so let's select our container we're going to add a rigidbody property to it this is going to be passive which means it's not going to move it's not animated the shape we want it to be a mesh now this is not efficient but it's the only way to get that convex kind of shape which we want from the container now if we press ENTER you can see our pills fall and not collide with our container and they'll stay inside they're still not reacting to these school and stirrers so that's all I'm next so select one of them rigid body will keep it passive because we don't want it to fall around in the scene but we're going to take animated and we'll change shape to box because box is much more efficient we'll do the exact same for the other stirrup rigid body passive animated and box now let's look at our scene from a slight angle like this let's go to solid view now save our progress in case the simulation crashes blender it's got a slightly more top-down view so you can see what's happening and let's run the simulation so it's a bit slow to start there just crumbling into place but you can see as it goes on these stirrers on moving the pills around and you get the same kind of satisfying movement I the original clip perfect let's go to our camera let's select our camera as well I'll do that mother camera properties and I want it to zoom in a little bit more 85 millimeters back that's a bit too much 75 and that works well and let's look at a preview of this render now we're currently using a V which I personally I'm not a big fan of let's switch back to cycles yes and you can see the lovely realistic materials that applies that it's got a white frame to save my computer now there's just a few things left that'll help us polish off this see and those are the materials the lighting and the camera effects so we're going to start with the materials let's open up a new section of our blender window here we'll go to shader editor select one of these pills and now we can edit the nodes of this material now we're going to go into this shader and we're gonna make our material nice and plasticky so we can increase the specular 20.9 will reduce the roughness to 0.05 and I'll just play with this or any material so nice and bright you can see it gives off health a nice shiny orange material now we're going to do something similar for the blue material where they're selected from down here again increase the specular to 0.9 decrease the roughness tis red light one you can see the blue is also nice and shiny now now our materials look a bit odd and that's because this geometry here right in the middle while the two ends of the capsule meet is a bit odd so we're going to fix that we're gonna go to edit mode on any one of our pillars now we'll press ctrl R to make a ring cut and you bottom half of the capsule and then move it up very close to this seam between the two capsules and we'll apply there you can see the bottom half now looks much better than the top off and we'll do the same thing on the top so ctrl R to make a ring cut move it down very close to the seam as close as you can and even this first one we're gonna move it even closer so selected with alt click gravity this is air access these shifts to get a nice and precise and now we go out of our camera we'll go run the simulation again to get some nice movement in that and we'll get you rendered you can see the pills look much better and there are a few things we're gonna press alt H to make sure everything is back in the scene you're gonna go here which is rigidbody world cash well extend it a little bit 500 to make sure we get a nice life scene we'll make sure the blender scene also goes to 500 and we'll bake the simulation you can see the progress there this is pretty fast and the reason it's fast is because we set the collision ship to capsule if it was the default which is convex hull but if it was mesh it would be much less efficient who and that's done now we can go to any frame let's go to the last one with Shift + right arrow and the simulation is ready baked for us there so now let's fix the lighting and the camera first thing we'll do is select this light I don't like it being behind the camera it looks it a bit odd to know move it to the other side and get a top view or to write off as a camera there now let's render again it's gonna spree view and you can see it's much darker because I'm moving it further away but unlike the reflections where they are now we're quickly going to press control B and draw a box around here and that way we only render what's in the middle and I'll speed up my renders now light is still selected let's go to the light settings here to turn up the brightness let's try 10 thousand that's much better already I'm also going to increase the size to make the shadows and the reflection softer so instead of 0.1 users it's 21 meter meters nice you getting some really good reflections here it's still a bit dark and I'm gonna do what I did in the original scene which is to add an area light grab it up and we're gonna make this really big so five meters note the Lyga 10 meters you can see it studies its soften up the lifestyle but still really dim just 5,000 watts and there you go it starting to look good now this is the Lighting's that I had in the original scene but I think we can do better we have choose to ellipse I'm gonna change this to 10 times 10 both sides of the circle and this should soften up the corners of the reflections and you can see it's done out there and we're very close to being done let's just add some depth of field to a scene select the camera make sure you're in the camera settings take depth of field and now reduce this f-stop let's try one point eight one point four this is the most you can get with most real cameras let's reduce it even more let's say this is not a real camera so we can afford much more expensive lens of that we can otherwise zircon for these lenses don't even exist you can see we're starting to get this lovely depth of field or missing in the movie distance ups right into about 12 and we're done all you have to do with your scene is render it out as an animation you'll have this lovely satisfying animation that pills moving around you can also try different angles so the one we use was the tight angle you can have a nice wide angle like this that lets you see more of the pills you can have a top-down view like this there's lost you can do to play around with the steam you can try to three colors of the pills that's something I didn't do yet I hope you've enjoyed this tutorial if you want to be lent while that I created make sure to check out this other video that I'll link above and down below and give it a like if that video reaches 200 likes or share those files leave a comment down below what video tutorial would you like to see next subscribe for more and I'll see you next time thanks for watching now this tutorial is based on this super satisfying simulation by dr. Tom Tron who very kindly gave me permission to make this tutorial based on his animation I'll have some of his links down in the description below and on-screen now so check those out to see his work
Info
Channel: Moby Motion
Views: 69,651
Rating: undefined out of 5
Keywords: blender 3d, blender beginner tutorial, Blender tutorial, blender physics, blender physics tutorial, Rigid body physics, hardbody physics, Moby motion, Dr Mohamad Zeina, Satisfying, satisfying video, blender satisfying, CG Geek, Ducky 3D, Blender Guru, Blender, animation, video, 3D, CGI, VFX, tutorial, easy, beginner, cycles, oddly, 3D animation, blender 2.80, blender 2.8 tutorial, Remington graphics, Remington creative, intro to Blender, Blender breakdown, CG cookie, Blender 2.82
Id: 67jBz8pzMcg
Channel Id: undefined
Length: 26min 16sec (1576 seconds)
Published: Fri Apr 24 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.