Blender Physics Tutorial - Rigid Body Simulations - Chapter 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey guys this is ram from cross mind studio welcome back to another tutorial which is about rigid body simulations inside the blender rigid body simulations are quite fun thing to do especially if you're starting with this whole 3d thing and animation so while the animation animating things manually will take quite a lot of practice and it's quite a deep subject to study rigid body simulations can help you quickly achieve physically accurate simulations with the help of just a few clicks even though the blender's simulation system at this moment is quite limited and there are no ways to achieve very elaborated effects which you might have seen in the houdini or 3ds max thinking particles and all that but there are still few quite interesting things you can do with body simulations hopefully in the future when we have everything known we will be able to do much complex effects so so what you've seen in the tutorial trailer that's what we are going to do we are going to create four different scenes and discuss four different things about rigid body simulations including very basics of the rigid bodies then using the force fields using the fractures and also combining multiple things to achieve something realistic which is like a totem what you've seen in the trailer so we'll also talk about material breakdown so let's get started [Music] so over here i have this scene which is quite simple there's nothing much going on it's just a ground plane there are a few balls over here so we are going to create the scene into much more complex one later but let's just talk about uh very basic stuff first without actually making this one heavy so by default when you play any animation unless you have any key frames on that on the timeline so let's say if i auto key this one and auto key this one over here so this is going to play i mean other than that there is nothing going to happen to any of the geometry any of the objects in the viewport so but there are quite a few fun stuff with the rigid body you can do rigid bodies concept is quite uh similar across all the 3d packages but there is one active rigid body and one is the passive rigid body so if i want this ball to behave like an actual object which has mass it should fall down and behave like there is a gravity in the scene like how everything behaves in the physical world then uh what i'll have to do is assign this object of rigid body and make this one into active so by default it's set to active now if i play my animation it's going to fall right across this plane and for as long as my timeline lasts over here now what i would want here is basically this plane to work as floor so like i said there is a one active body and there is one passive body passive rigid body so active rigid body basically going to uh if you want to have some motion into any object you can use active rigid body on that object and if you want any object to stay stationed and only work as collider then you can use a rigid body and change this into passive and keep in mind i'm in the physics properties over here so as soon as i do that this thing is going to fall down and when it hits the ground it's going to just stop over here now even though this is interacting with the gravity and falling down but the motion of the ball is not quite convincing i mean it's just falling down in the real life the motion is much more different i mean i expect this ball to roll have some secondary motion and not just to stop when it collides with the plane so now for that what we can do is basically change the shape of the rigid body so if you go to the properties of rigid body over here you can see the collision by default it sets to convex hull now what this means is doesn't matter how complex the geometry is it's going to wrap a very simplified mesh around it and use that for simulation so let's say if this had 50 000 polygons then the rigid body convex hull is going to create a very low resolution mesh around it and that will help the simulator to solve the simulation much faster but at the same time it's it could over simplify the motion sometimes so what you can do is you can change this into many different shapes so there are there's a box sphere anything which resembles your shape of the object you can do that from here and if you don't find i mean if the shape is very organic or anything then you can always change this into mesh so let's try sphere for uh over here and see if there is any change in the motion so no i don't see any difference so let's change this into mesh now as soon as i do that you can see now there are much much more points being calculated and now this behaving much better than before now other than that now over here on top of everything there is mass and this can actually change the behavior of an object so if it's a very lighter object so if i make this one into 0.1 kg or 0.001 kg then the result is going to be different and if i change this one into 1000 kg then it's going to drop much faster now if i select this ball over here and increase the bounciness [Music] you will be able to see much more bounce going on and let's do the same for the ground plane i'll increase the timeline all right so we have at least a bouncing motion the ball so let's talk about the very basic parameters over here what we see and what this all means first so the weight the mass over here basically means the weight of the mass of the original body and the heavier the object is it's going to behave like a heavier object and the lighter it is it's going to behave like a lighter object so maybe so let's say if i have one uh this this one is 0.1 kg and if i make a duplicate of this one and make that into 1000 kg so i hope i will be able to see the difference yeah so this 1000 kg is bouncing less and this point one kg is bouncing more and now similarly if i show you a better example over here so for if i move this lighter object on top of this one play my animation so it's just going to bounce on top of this and fall down but if i bring the heavier object on the top then it's going to actually kick that ball after the scene because this is almost like a thousand times heavier so the behavior is quite significantly different so this is one of the example and now other than the mass we have there are two different things and we'll talk about the animated uh later so basically what animator means is if you want one animated object to participate in rigid body simulation then you can enable this one so let's say okay i'll just give you a quick example i'll make one copy of this and change this one into animator and as soon as i do that you can see all that animation is gone now right now it's uh shooting away and okay not sure what the reason is i think it's uh to do with this one so if i move this away yeah so [Music] let's change the sensitivity to margin to zero maybe yeah so if i create one key over here let's say over here if i press i and click on the location and go over here and again move this over here and set another key then [Music] by default if i disable this then even though this have key it's not going to actually move this way because uh it's not it's working as a dynamic object over here and not animated object so for for the simulator to keep that animation which we just created over here you will have to enable animated over here and as soon as i do that you can see how this one is working as an animated object but still colliding with this one all right other than this and this dynamic one is quite basic uh if you want to just quickly toggle on and off whether this object is dynamic or not you can do that from here now in the collision properties over here as we just discussed there are a few presets which can actually give you a basic shape for your basic primitives if you have but uh for more complex geometry i think you will have to either use mesh convex hull like if it's an organic geometry then these are the options uh for that and let's let's bring some complex shape over here let's bring one uh suzanne model over here [Music] so i'll just uh apply a rigid body preset on this one and play our animation see what's going on so by default as expected it's just going to fall down and behave like a rigid body now if i increase the number of subdivisions into this one i just press ctrl 1 and that brings up a subdivision over here and then we can just apply this one and shade smooth so if i animate uh if i use this now for rigid body it's a much smoother mesh but even then our result is quite similar to previous one i mean there is a very less motion and uh doesn't matter how many polygons i add over here it's just going to give us the same result because there is a proxy mesh going on around here which we can't see so if i change this from convict hull to mesh then you might be able to see much more motion into this one yeah as you can see over here it rolls much more and it have much more it has much more uh detail in the shape so that is not the only use for the mesh or uh or the convex hall now i'll show you another example so basically convicts hull is like let's say if you have glass if this is a glass then the convex hole is just going to wrap one geometry around this one and and just pack it nicely so this this is going to just wrap it like this all right so if the geometry have like holes or inward shapes like it if it's a hollow object then that is actually going to not work in the rigid body like if you expect any ball to fall inside this object then the convex hole will not provide you that effect because uh it's just wrapping a very proxy mesh around everything now let's say if i bring one uv sphere over here and delete half of these uh and assign this one a rigid body i bring this over here so we can see what's going on so by default uh i'll just move this one slightly above [Music] yeah so by default the convict hole is going to just pack any holes or the concave shapes and nothing is going to actually fall inside this hollow object so we can solve that by using mesh over here so if i change this into mesh then you can see the rigid bodies are falling inside it alright so that's one of the use for using mesh now using mesh for collision geometry will not always be a practical solution so if you're using for something much complex if there's a character model or maybe a skull or maybe mountains or rocks like if there are like hundreds of thousands thousands of pieces then the mesh for uh for the collision source is going to just slow down the process performance of the simulation and might would even give you something which is really unstable and not usable so if i have to give you an example then uh using a really high resolution geometry for simulation it's not a great idea so if i make a chain on this model set origin to in geometry and subdivide this one a few times let's say two times then i can just apply rigid body on this one change this to mesh [Music] i'll make a few copy copies of these [Music] so trying to solve high resolution geometry with the rigid body [Music] is going to basically give you a much slower performance so as you can see over here there are quite a few models now imagine if there were hundreds of these [Music] then the simulation will take quite some time to solve each frame [Music] as you can see over here it's already struggling to keep the simulation together [Music] so instead of using a mesh data for high resolution models what you can do is you can create your own manual proxy model and use that for simulation so let's say if i bring uh if i delete these sorry i just clean this up and create one duplicate model [Music] and decimate bring the resolution down to something usable yeah something like this so we have this mesh and i'm going to parent this mesh with a high resolution one and now in the high resolution model we can change the shape to compound parent now this parent objects child this low resolution model is going to convert into compound shape now over here you can see this object is part of compound shape so it's going to automatically pick it up the parent object and the child that configuration and assign this one as a proxy mesh now if i select the lower resolution modeling make sure this one is set to shape uh the mesh and create a chain similar to the previous example [Music] now let's try to solve this one you can see the performance is much smoother and it's almost like a real time [Music] so that's the use of compound shapes and it can actually give you much more control over how you enter your simulations with the high resolution models so you're not always limited to these shapes or these presets you can always make your own shape and use that for simulation [Music] so let's talk about the next thing all right so the further parameters are quite simple to understand if i select the ground plane you can see there is a friction and bouncing so by default if you play this animation you can see uh just like before we have a very standard animation going on nothing much so if i increase the bounciness on the ball over here you should be able to see a bounce so at this moment i think the ground plane doesn't have any bounciness so if i increase the bounciness on the ground as well you should be able to see bounciness on this one now if i change the shape to mesh just like before for the for the both of the parts then i can see much more twist now let's bring down the bounciness a little over here for both of these objects and let's talk about the friction so friction basically means how much the object resists the motion so as you can see the resistance of the object to movement so the much more friction you have the much faster the object is going to stop like if it's rolling then it's just going to roll less if i if it has more friction so if the ground have a zero friction then i should be able to see for the ground and for the ball so let's just uh tilt this plane slightly so we can see what's going so now this plane is tilted and you can see the ball is rolling in this direction now if i increase the friction for for the ground and for the ball you can see it's rolling less but at the same time uh there is much more realistic motion to it it's like the motion and the rotation is in the perfect thing so so it's uh without the friction it was uh working more like a slippery surface so even though we had a tilted plane there was more motion but less friction so with the friction [Music] you can see as soon as i increase the friction on this one it's like a rough surface and uh the ball is rolling more but at the same time resist there is a resistance in the motion let's increase the bounciness [Music] and uh tilt the plane slightly further so i hope you get the idea what's going on over here [Music] and the next one is the margin so margin basically means how much margin you want to keep between between the geometries so if i increase this one to something like 5 then you will see there is a gap in between and like this one and if i make this one zero then it's going to make a perfect contact unless the other object have some sort of distance sensitivity as well so that's about it that's everything to know about the rigid body's basic parameters away and then there is another section which is in the scene properties over here from here you can control the speed of the simulation if i make this one into 0.2 then you will see a kind of slow motion shot [Music] if i make this one into 5 then yeah it's going to be faster simulation and split impulse basically means sometimes you will see some extra velocity building up between the object and like if the objects are much closer to each other or if there's some tightly back geometry or something like that then uh that could give you a very unstable simulation so if you enable this one then split impulse basically is going to subdue that velocity and give you something much more usable so after that we have a solver iterations so by default this number is set to 10 and if you want much more uh much more accurate results then uh try increasing these numbers if i increase this number i don't think for for such simple example we will be able to see much difference if i make this one into one yeah so i'll explain this one later uh maybe when we are working with the fractures and all so more solver iterations just like when we were working with the amount of flow so for any simulation more iterations means means much more data is being fed into much more sub steps are being fed into simulation and after that we have a simulations uh simulation cache settings so you can bake from here extend your animation simulation timelines and that's about it and then the standard field weight settings from here you can control the force field parameters any force field which you have in the scene you can use the you can control the influence of those four spheres from here all right so now just to conclude this chapter we are going to add much more objects to this one create a finished render out of this all right so here i am in the final file and there are multi multiple copies of the same object with the varying sizes so now we are going to discuss one more final thing before concluding this chapter and i'll talk about the material breakdown in a moment so when we have multiple objects so instead of trying to apply a rigid body on multiple object and trying to transfer it there is no way of transferring it so what you can do is basically select everything and from the object menu you can click on the rigid body and click add active and this way we have rigid body applied on multiple shapes so ground basically needs to be static you can change this from active to passive and then if i hit play [Music] then yeah we have a very basic simulation going on so the way to manage multiple object is basically you can either right click hold alt so let's say if i want to change anything on this one uh if i want to increase the friction for all of these then i can hold alt and increase it from here that that way the friction is one for rest of these object as well or you can let's say if i change this one into mesh and then you can right click and copy to select it and these are the two methods of applying and changing the properties of the multiple rigid bodies so let's apply bounciness on the ground change this one into mesh and parsiness on the balls [Music] and friction all the way something like this and let's hit the play and see what's going on so i think there was a some sort of overlapping between objects for initial frames that's why it was taking a few seconds for earlier frames to calculate but later frames are much faster now over here you can see i think we have around 50 or 100 100 of object uh in the scene and uh even though these are quite decent resolution like low resolution these are like it's still taking some time to calculate now i think i may have increased the sub steps so by default these are set to 10 yeah something like this so let's try to solve this one with the default sub steps should be much faster yeah [Music] so we'll set up everything and for the final sub steps we are going to increase the final result we are going to increase the sub steps for this simulation what i want to do is basically bring up force field so i have this force wheel over here uh it's a very basic force field which is set right behind the the pile of the balls over here and i have enabled the max distance for this force field to be right uh to cover the initial burst and the influence is still over here so i just want the initial kick to happen the the strength is set to quite higher and since the rigid bodies have a weight so the lower strength in the force wheels might won't show you any significant result like evident result so try working with the higher number the strength and that's about it and this way we should be able to see all these balls moving in this direction yep so that's what i was expecting [Music] there you go now if you want you can always create sort of a boxy wall around it and use that as a mesh collision shape and that way anything which is falling out of the scene will always bounce back from those colliding walls and stay within the scene but i don't think we are losing much over here so i won't bother much about it there you go so i think we have quite decent result and the only thing i would like to do about this is just to be sure we are getting a good good simulation i'll just increase the solver iteration and solve the sub steps and uh yeah then hit the bake and it's going to freeze all your simulation so there i have it the final final simulation and uh yeah now i i quite like the result i think i could have spent some more time on it but there is no particular aim i had i just wanted to give you a very simple example the only thing which is uh which i forgot to mention so the source shape over here so if you have any sort of uh i'll give you a quick example file general so if you have like a geometry where the shape of the geometry is like kind of deformed so let's say if i have a displaced modifier with any texture like distorted noise and this one is a side to point to something simple shade smooth and over here let's bring one standard uv sphere oops so if i set this one to rigid body and set this one to rigid body passive give give this one slight tilt now let's scale this up now even though it's colliding with this plane it's not quite uh respecting the shape of this geometry so so if i yeah so if i change this one into mesh then uh you will see all those bumps uh bumpy ride going on for the ball but the thing is like sometimes if you don't see that effect just make sure this is set to final the source shape is set to final if this one is set to base then anything which is before the modifiers that that shape will be considered for the collision and if you want the final shape which is after the collision uh after the modifiers to be taken into the account then the final shape from here you'll have to change that so just a thing to keep in mind that's about it so let's go back to the file and uh talk about the shader now for the material i'll give you a breakdown what's going on so for these balls i have a very basic material it looks quite messed up over here but i'll give you an example of what's going on so for the color of these balls basically what's going on is so basically i used a gradient texture which is set to linear and with the generated coordinates and then on top of that i used color wrap just to make some hard lines around around the center over here so you can make as many lines as you want now on top of this color ramp over here i'm using a a hue saturation node so basically what's going on in this hue saturation node i just pick any color which you want and then in the in the hue over here just bring one uh input object info node and select random and plug that into hue and this way you'll get random color for each different object all right and you combine that one with this ramp over here and you'll get a colorful stripe for each of the ball and you can control any any aspect about aspect about this one like how you want to change colors anything like hue saturation value if you want to randomize the saturation as well you can do that from here if you want to randomize the value you can do that from here so just pick any color and randomize it with the object info node and uh yeah that's about it for the base color and then i believe there there is one texture which i'm using for this overall scene it it's a very standard um pbr shader i downloaded from the hdr uh detection texture heaven and but i want want it on top of this plain flat color i wanted to mix this one with a hint of like a rough dirt so i just used a random texture so i was quite lazy to do this so i just used the same texture which i'm using on the ground the roughness map from that one and multiplied this into a mix node so there you go you have some sort of scratches going on and the same node i'm using uh in the roughness and there is one normal map which i'm using into the normal map so the ground plane basically have a pbr shielded so these maps basically uh i just dumped it on top of the balls over here [Music] all right i'll leave this file on the gum road and my patreon users can use uh will get this file free so you can just study this file if you want there's nothing complex i'll just enlarge the view in case if you guys want to study this all right so basically there's a color going on over here create one basic stripes with a gradient and uh color ram post that you can just use a randomized color with object info node and uh just so that you get some dirt on the balls but bring any any random texture which have some sort of scratches or roughness you can multiply that with the you can mix that with the base color and uh just to break the roughness of the specular i'm using a roughness map which is this one and also a normal map from the ground i'm using on top of this ball i just wanted these balls not to exactly look like uh flat uh like i mean uh if i disable everything and keep the color uh these looks quite boring all right so you get the point and once you have everything you have a such a beautiful animation going on just have fun with this bring the different cameras so for the final render i used 128 samples with the optic x or denoiser with the cycles now with the cycles you can see the result look much better however for such a simple scene you can always use ev so i have a hdr in the background which is let me just bring one hdr node so i don't think i'm using any hd hdr over here so it's just blank node so for the lights for the lights i have quite a few lights over here so multiple colors colored light shooting from different angles and i have a blue light from here and then there is a source light on top of everything which is just creating this uh main centered bright lit area that's about it and all you can always use uh some sort of abstract shapes to create interesting shadows in your scene and cut out lighting from unnecessary parts just so that you have a certain focus in certain area and after that just uh bring your cameras and record the view from different views uh different angles i have multiple cameras going on over here camera number two camera number one and then edit your shots render it out for each frame it took me around one or two minutes on my configuration you can see my configuration in the description and uh yeah for depth of field i think i have depth of field enabled for all the shots so [Music] and even though i have used cycles for this one i think you can use ev and uh even with the ev this scene looks quite beautiful and nothing will ever look bad with such colorful things going on in your scene all right so even with the ev you can see we have almost everything all right so just play around with the file if you want and uh or maybe create your own version i would love to see it so tag me on the instagram share your scenes with instagras mind the next example we are going to discuss is this one so basically instead of creating a simple animation we are going to use uh negative forces and uh we are going to talk about a method to create abstract negative forces uh and this way you will have this uh nice simulation so over here you can see different attraction points and sometimes the simulation attracts on the top left and the bottom right so things are moving in a chaotic order and it looks nice all right so we'll talk about this one in the next chapter so i'll see you in the next chapter stay tuned subscribe and do check out my patreon i'm planning to do a one-on-one session with my first 10 supporters first first 10 patreons so there are uh i'm open for the feedback and i'm doing this for the first time and i'm quite nervous but open for this edition so if you guys have any suggestions of the subscription or the features you want to suggest i'm other years and uh let's make this work yeah so i'll see you in the next chapter the links are in the description stay tuned bye take care [Music] foreign [Music] hey
Info
Channel: CrossMind Studio
Views: 36,750
Rating: undefined out of 5
Keywords: blender, rigid body, simulation, rbd, fracture, realistic, ball, pingpong, blender tutorial, blender realistic animation, animation, blender houdini, blender vfx, cycles, eevee, blender advanced tutorials, blender physics, dynamics, lighting, blender free tutorial, blender full course, blender product animation, blender realistic render, snooker balls, blender pool, 2.92, blender 3d, blender basics, basic tutorias, blender fundamentals, blender fun tutorials, crossmind studio
Id: XcIZQb2b1FA
Channel Id: undefined
Length: 39min 22sec (2362 seconds)
Published: Sun Feb 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.