Cinema 4D Tutorial - Intro to Rigid Body Dynamics

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
everybody's EJ from Ida's I'm calm and today we are going to learn a little intro into dynamics and how to create some fun compositions inside a cinema 4d let's learn how all right so in this tutorial we're going to get a little intro into dynamics and create a composition not much unlike this little composition so what's going on here we have a bunch of dynamic spherical clones that are filling up a volume and creating this cool little shape so you replace this with a logo or whatever you want to do but we're going to get a nice little intro to dynamics and learn how we can fill up some volumes and create this cool little like logo reveal let's go ahead and create a whole new composition and let's just start off by just discussing what the heck dynamics are work well dynamics are cinema for these real-world physics engine so it applies things like gravity and inertia and balance and friction to objects so what I'm going to do is create a sphere move it on up and where we can actually apply real-world physics or dynamics to objects is by right-clicking them going to the simulation tags and this is where we're going to be living in this tutorial basically these two options the rigid body and collider body we're not going to cover soft buddy but if you want to learn about soft body has a whole tutorial dedicated to soft by dynamics but we're just going to deal with rigid body and collider body for now so rigid body dynamics is what we're going to use and when you apply a rigid body dynamics tag to an object by default you see as I hit play our sphere just kind of falls and drops so it applies real-world physics it applies gravity to my object and so my object just Falls so this actually can interact and collide into other objects as well so what we're going to do is create another object like a plane or a floor to collide in to this fear so what I'm going to do is hit play again you're going to see that our sphere just falls through our plane and that is because we have no dynamics tags on this plane object so it's excluded from the dynamic simulation so what we need to do is right-click this plane go back into our simulations tag and fly a Collider body to it and the collider body is very aptly named basically what a cloud or body is is it allows other dynamic objects to collide into it but it does not apply fit physics or gravity to the object so when I apply a Collider body to this point you're going to see that my plane doesn't fall there's no gravity of flat applied to the plane but it allows other dynamic objects to collide into it hence glider Bunny so very simple easy stuff very basic level we just applied some dynamics to our scene to move the sphere up even more have more of an impact hit play but on a very basic level that is dynamics it applies gravity in real-world physics to objects in your scene we also have Collider bodies to have objects collide into objects so very simple let's take this a step further let's rebuild this and again fill up like a box with a logo inside of it with clones or spheres all right so let's go ahead and do that so the first thing we need to do is actually create an emitter that emits dynamic spheres that we can then use to fill up that box or that cube and reveal that logo of that little diamond shape so what we're going to do is we can find emitters underneath the simulate menu go all the way down to particles and we'll grab this emitter and if you're familiar with particular in After Effects trapcode particular this is going to be very not unlike that so right off the get-go we have particles emitting they're going to notice that when I hit render nothing is going to actually render because these are just little placeholders little particle placeholders what we need to do is actually define a shape just like you would define a shape for a particular we can do the same thing and define a shape for the emitter so we want to omit some spheres go ahead and create a sphere and let's just make this sphere a little bit smaller something like that and to make a object you met from an emitter we just simply have to place it as a child underneath our Mitter and then go ahead and say show objects because we say we don't have show objects on it's just going to emit these little placeholders but the moment we say show objects we're actually going to use that object that is the child of emitter as the emitter geometry great so we have some of these basic options here we have the birthrate editor which is how many particles four per 30 frames that will emit and then we have the renderer and basically the difference between editor and render is is that if you have a thousand of these you're actually going to bog down your system a little bit and you can see that we're really blogging it down so what you want to do is this is just like a viewport optimizer so what you can say is you know what in my viewport I just want to have a hundred show up but when I actually render I want a thousand to render so that's just kind of like a scene optimization thing but for this tutorial sake we're just going to make sure these numbers are the same so when we are looking our viewport we're also going to render the same amount of particles and you see that we're still getting kind of slow feedback in our viewport this render instances is going to optimize and save some of this stuff in RAM so it's going to speed up the simulation you can see that when we go and do that 1000 again you're going to say that it's much faster so I like to work with this render instances on it optimizes your RAM and just makes it way easier to work with a bunch of little particles fears so we're going to do bring this back 200 and let's just cover a few more of these options here so we have the lifetime which is basically the lifetime of your sphere or of your particle so if I say a lifetime of 50 it's going to admit and then after 50 frames these particles are going to die or just disappear for this composition we're just going to leave this at 600 because we actually don't want these particles done want them to live and be happy so what we're going to do is what one thing we are going to manipulate and change is this stop emission so start a mission is where the where the particles start emitting and stop emission is the frame that our emitter stopped submitting frames so if I say stop emission its frame 20 I'm going to have mission of particles and that frame 20 it's going to stop so this is one thing we're going to be changing very shortly so we'll just leave that 150 for now so what we need to do first is we have our spheres we have them being emitted but they're not dynamic so we need to apply a dynamics tag to our emitter and what we're going to do is just go ahead go to the simulation tag is again rigidbody because we want gravity and all that good stuff to be applied to our emitted spheres and we're going to hit play and see what happens you can see that by default we really just applied gravity to our emitter so emitter just Falls and drops as it's emitting but actually what we want to do is go a little bit deeper in the dynamics tag settings and say hey actually want all these spheres that are being emitted to actually be dynamic so we need to change a few settings in this collision field right here so right now we have this option called inherit tag and what this allows you to do is apply the dynamics options to children since we have our sphere as a children we're going to want that inherit AG to apply to children and then this individual elements we also want to have all these spheres that are emitted to be recognized as individual spheres with their own individual physics or dynamics applied to each of the spheres so you can see that if I just have that off nothing is happening our spheres are still not dynamic we need to do is say recognize all of these objects underneath the emitter as individual dynamic objects once we say all we now have this happy joyous explosion of spheres and just puts a smile on your face doesn't not like popcorn popcorn popping and we have all these really nice dynamic spheres one other thing we can do is we can then duplicate what if we wanted different sizes of spheres what we can do is just say alright this is going to be the large sphere we're just going to hold command click and drag and duplicate that and what this can be is the medium fear we can drop this down to 13 and then I'll command click and drag again make sure that's underneath the emitter as a child and just make this 8 centimeters so we have three different sizes of spheres and now what's going to happen is you're going to see all three different sizes of spheres being emitted so we have a little bit more contrast a little bit more interesting particle emission they're looking really nice and let's just rename this small so you have a large medium small and what we can do is then just rotate this emitter so it's facing downwards and now they're just kind of falling so this is perfect this is looking good so far what we can now do is with these dynamic spheres that are being emitted from our emitter is we can use them to fill up a volume so let's go ahead and rebuild this world composition here so what we had was basically our cube that was filled with spheres and then we had a little like diamond shaped inside here and we had clones filling in all three of these shapes so we have the outer cube the inner bit and then this little pink diamond so let's just go ahead and create all those things so let's just create a cube and we'll make this just do 400 by 300 and we'll make this 100 centimeters deep and let's go ahead and create our little diamond inside so we're just going to grab a tube and make it face forward so negative Z and you can see that where I can't see inside of it so what we're going to do is go into our cube and for a things like this where we've got overlapping objects we actually want to see inside an object one handy option is in this basic tab we actually change this to x-ray so we can actually see through it a little x-ray of the cube we can do the same thing to tube here but you'll notice that we can since they're overlapping it's hard to tell where the overlap was in this outline so what we can do is distinguish the tube like going and saying use a color and we can actually use the color that is different from that Greg so we can actually make it a little bit better and since they're both 100 centimeters thick what I'm going to do is just make this one centimeter thicker and we won't have that weird glitchy overlap now we can actually manipulate all this stuff without actually turning off of objects or anything like that so now we can just just these rotation segments to four and we can create that diamond shape again and let's just make this a little bit bigger something like that I hate decimal so I'm just going to round this up to 65 and 120 cool and now we can apply those Clyde ER tags right to these two objects so let's go ahead and our cube go to simulation tags Collider body and then we'll just command click and drag to duplicate that to the tube and we'll just move this emitter up right and let's just make this emitter long enough so it's emitting in a wider space so we'll go to the emitter settings and we adjust the X size of the why size so we'll just adjust this and we can actually shrink this down a little bit so you can see we're just sitting inside there and let's see what happens let's hit play and you can see that what happens is not what we want this is not filling up the inside of this cube and the reason why is because of the default settings on our dynamics tag here so by default we have this collision shape which is basically set to automatic and what automatic is is just the fastest guess of a dynamic simulation for the object that you're using it's the fastest but it is the least accurate so it doesn't take into things like hollow objects or divots and objects or you know bowls inside objects it just creates like generally like an outer shape mesh but we actually want this to recognize that this is a hollow volume and to do that we actually need to change the collision shape to something more accurate more accurate simulation and the accurate well the option that we actually want is de static mesh and this is one of the most accurate options it also slows things down a little bit so but you know that's what we need to do so we're going to go and choose static mesh we're also going to do the same thing for the tube as well because we're going to eventually emit some spheres inside of the diamond so we'll change this to static mesh and once I do that I'm going to hit play and you're going to see that now whoops undo that go back to our main view here you're going to see that we now have fears being emitted inside that cube volume which is exactly what we want and that is all due to the static mesh so what we want to do is make sure that we have enough spheres that actually fills up this volume so let's just make our composition a little bit longer say 180 frames and let's just see where our cube is fully filled with our little spheres here so stay around like frame 130 and let's actually have this fill up a lot faster so what I'm going to do I'm going to rename this emitter to just cube emitters we're going to have a few different emitter one for the outer bit of the cube one for inside of this diamond and one for this little space here so the cube emitter let's have this fill up the volume faster so let's go to our emitter particle settings and let's bring this up to say 150 and let's see how fast that fills up so fill in a much faster in it say frame 100 is where it's fully filled so what I'll do is say okay this is fully filled this cube is fully filled at frame 100 that's why I want to stop a mission so no more particles noble particles allowed after frame 100 so if I hit play again I'm going to fill this up and then at frame 100 emission is going to stop we had one little escape that little tricky rascal of a cute of a sphere just popping a you does not want to join this party but we can fix that when you have objects dynamic objects kind of popping out of objects and it's not you're working very well that is due to again the default settings of dynamics trying to be fast but it's also not very accurate at the default settings so what we can do is go into the dynamics the project dynamic settings so the dynamic settings for this entire project that we're in right now and to do that we're going to hit command-d and go into our project settings and then our project settings we have this dynamics tag and under expert we have this option right here and basically what this steps per frames is is the calculations per frame or steps per frame and right now it's fairly well at 5 but we have a lot of spheres being created and being emitted every 30 second or every 30 frames so we need to up this a little bit more because it'll be a little bit more accurate so what we'll do is we'll crank this up to 30 and what this should do is hopefully prevent any spheres and kind of popping out and you see that actually by upping that steps per frame and since there's so many spheres being calculated or emitted it's actually picking up a lot of those in-between frames that weren't recognized before so what this is actually doing by upping this calculation is we're actually being closer to emitting the amount of spheres that we actually wanted in the submitter so what we'll have to do is actually bring down this editor because when there's so many so many particles being emitted at the lower settings sometimes some frame some of the particles get skipped so when we up the calculation to being more accurate we actually have all of those spheres or all those particles being accounted for not being skipped over because we have so many being emitted all at once so we just had to bring down our birth rate a little bit and we just change it from 150 to 130 and I think we're filling out pretty good we could probably get away with 132 because I'm seeing a little bit of gaps at the very top so we're doing this and we're stopping a mission at frame 100 and let's see if we have that that rogue sphere he doesn't pop out anymore so this is good and one thing to also notice we don't have anymore that jitter happening either so before we had a lot of fears kind of jittering around and still moving after we stopped the mission but actually upping I'm going to hit command D again go back into our dynamics particle settings and upping that steps refrain helps tame those a little jumpy little jumping beans a little jumping fears that we had before so this solves a lot of problems maximum solve our nation's per step also helps up the calculations as well but again also slows things down so if you're having a stuff still pop out of the cube you might need to up this as well but I think we've solved that I don't think we need to change that value at all because all of our spheres are staying inside and they look pretty happy to me so what we'll do is this is looking good we'll then go ahead and we'll command click and drag and just duplicate this whole emitter and I think what I want to do is just move this down and position this new emitter and this will be a diamond emitter let's go back to frame 0 and move this down and then go when you actually fit the emitter shape inside of our little diamond shape here so let's go to our mitr shrink this guy here and shrink it in the Y move this up just a tiny bit we don't want this dinner stack because then we'll have emitter it will have spheres emitting outside of that diamond shape so what I'm going to do is just turn off our first cube emitter here and just deal with this diamond emitter and immediately I know because this of course is a smaller volume we won't need as many emissions won't need as many particles emitting so what I'll do is I'll just play half it or almost assets by just changing this to 60 and then just hit play and you're going to see that we have so many of those larger spheres that we're having a little bit of an issue with too many of these big spheres popping up and I just want more of those smaller spheres to to be in here so I'm going to do is to have more small spheres show up I'm just going to create more small spheres and this will then almost double how many of the small spheres are being emitted versus the other tube medium and the large and I think what I'm going to do is just totally get rid of the large sphere there so we just have the medium and the small so let's see I think that's filling up still too quickly let's just play that again what I want to do is because it's hard to see here even with the x-ray what I'm going to do is just turn off visibility on the cube by clicking this little stop light till it's red and what I actually want to do is click this bottom stop wait till it's red as well because this top one means that when this stop light is red it won't show up in the viewport but it will show up in the render if this is not red so I'll just hit render you can see that even though our cube doesn't show up in the viewport it shows up and render but if I turn this bottom button to red and hit render you can see that also doesn't show up and render it as what either so this is exactly what we want let's do the same thing for the tube with diamond let's just rename this diamond because we can keep this naming structure straight and we'll just turn this off so we can actually still see it in the viewport but when we render we don't see we only see the spheres so perfect so let's just turn off the visibility in the viewport as well and let's just see how this looks to frame 100 it'll stop and I think that looks pretty good we don't have any Spears escaping or anything like that I think that's I think that number I chose of sixty might work out just perfectly so let's go ahead and turn on turn back on our emitter and then all of our spheres for our cube back out here and so we have the cube emitter we have the diamond emitter and let's actually first create a couple materials so we can actually recognize both of them so for the cube emitter I'm just going to make a white material but for the diamond material I'll make that like pinky magenta color let's just go ahead do little something like this so these are just you know placeholder materials will develop these materials a little bit more later on I just want to see the differences the difference cubes or the different spheres being emitted here so you see this is looking good no gaps are nothing happening here this is looking really nice and now we got to do is a fill in the little gap right in here so what we'll do is we'll take this a diamond emitter and we'll duplicate it and we'll rename this inner cube emitter and what this is going to be I'll just apply this white material to this for now and what this is going to do is just go to frame the zero and turn back on our cube and our diamond I'm just going to place this emitter inside of that little gap that we need to fill up and let's just turn off the emitter and the spheres for a diamond emitter in our cube emitter so we just see the inner cube bit and this is going to fill up really quickly so we're going to need to bring down this birthrate editor to say 25 and let's see you know let this plate will frame 100 and see if that fills up completely and see it doesn't so we still have some gaps too let's just up this 30 go to frame 0 let it play I got this top it up and this is filling up and we got filled up pretty nicely maybe 29 because we still I think it's packed so much we have that little jitter happening so I think we have looking pretty good there we have less of that jitter because our spheres are left packed in and that's looking nice and it stops coming through a rest no more jitter on those spheres so I'm liking that if you have too much if you have too many spheres being jam-packed in that space number one you're going to have all these fears pop out but you're also going to have a ton of this jitter right so you need to walk that fine line between two little spheres and too many so I think 29 was the one that worked before silver sup boo boo boo boo boo boo boo cool and it's not jam packed too tight we got nice rest no more jitter almost fears Matt's looking plea fit so let's turn back on all of our spheres and let's hide the cube by clicking the little stop stop sign traffic light things to read so this will not show up in viewport or render as you can see and let's hit play and we have all of our three emitters so we got our cube inner our diamond emitter and our inner cube men are playing and they're all stopping a mission at frame 100 that's looking good I'm digging that I see that a we have a little bit of movement here but it all stops once it gets to about frame 1a so that's good I think this is looking pretty dang good so let's go ahead and let's start developing us out a little bit more with that some lights let's add some textures nicer textures then I got here but before that what I want to do is actually just bake this simulation so I don't have to keep playing this and what I want to actually see what this looks like fully formed when I'm getting my lighting and my texturing right I want to actually see that without having to waste my time playing through this simulation I actually want to cache it and basically what a dynamic cache is let go and select all of my dynamics tags here and go to the cache field I can bake all of the caches of all my dynamics by hitting this bake all button basically when I hit this button it's sort of like Ram previewing in After Effects where I'm just storing this dynamic simulation to my RAM or to my memory so this is a perfect way to once you've got the simulation down you like the way it looks and you don't want to deal with it anymore you just want to bake it and save it cache is what you want to do alright so we have our dynamic fully cached so we can just hit the play and we have full speed ahead full cache we don't have any of those jerks fears jump out or anything and now we can again go ahead and just go all the way to the end here and we can actually see what this looks like at the end and now we can start lighting and texturing and seeing exactly what this is going to look like so perfect let's get to uh lighting and texturing so let's just create a Airy light and just go to our for up view click that button right up there and just move my light this is going to be a light up right over to the left and just kind of angle it so it's facing our scene let's go ahead and add some area shadows let's go ahead and create some fall-off so it actually behaves like a real light source where it doesn't actually light source doesn't go to infinity actually falls off a little bit and you can see just in our viewport here that the lighting is kind of hot so let's just bring this down a little bit see what that looks like go we got our shadows but it's too contrasty so what we're going to do is let's create another light and let's just make this more of like a rim light so we'll put this right back behind it a little bit so you see just a nice little backlight let's turn off shadows for this one so we only have one light with shadows and let's see what this looks like I'm liking now we have this nice back highlight here this nice little rim kind of light and right now we just have normal diffuse textures let's go it let's add some sexy reflections let's go ahead and go and add some Beckmann reflection we don't want any specular strength in here and we just want a little 20 bit of reflection say like 7% of a little bit goes a long way and we're going to change the attenuation you additive and then also add this on top of our specular and let's just make this specular a little more sharp or something like that and let's add some luminance to this I'm going to copy the color Channel to get that pink and load it into luminance and what this is going to kind of do is almost give this like a glow er like it's being lit from the inside so let's see what this looks like you can see that looks nice you can see that the shadows are a little bit lesser they're almost looks like these are these little spheres are glowing a little bit digging that so I think that's good what I'm going to do is just duplicate this and since I like the reflection and everything instead of just bloating in the stuff - the same - this white material just rename this white and change this to a gray change this luminance to great as well let me even bring this down a little bit more bring the luminance down and then just I'm going to hold option and drag that over and that will replace that white texture and we can hit render you see that the white spheres are a little washed out I like how the pink ones look so let's actually get rid of some of the luminance there maybe make this a little bit darker darker right like that and what we can do to make this top a little bit more is adding some ambien occlusion that'll add nice little shading where our objects are close together so let's go ahead to effect let's go to ambient occlusion and since our spheres are so small our biggest fear is let's see 17 centimeters so 100 centimeters is a little bit overkill because 100 centimeters is like the pretty thick right so it's about one of these grid spaces here you see these little square grid really what we want to do is not make the shading much bigger than our sphere so maybe we only have like 15 centimeters so that's how much it like blurs out so we can render here you can see a little bit of shading that happens especially in the pink sphere you can definitely see that definition that nice contrast where our spheres are touching with us that little nice amat occlusion shading that's looking really nice we can probably get away with making it a little bit layer so it's not so contrasting it's looking a little bit nicer but Abney occlusion definitely makes things pop I think what I want to do is maybe up the aluminum's a little bit just so that shading on that spheres so dang harsh render here I'm liking that a lot more one thing I'm going to do is add some nice highlights and reflective highlights on my sphere by going into my lights both of them going to my details I'm going to turn these into soft boxes so right now our lights are showing up in a specular but they're not showing up in the reflection so I'm going to do is turn that on and what's going to happen is these little square shapes are going to be come soft boxes that will show up in the reflection and what I'm going to do is just up the visibility multiply all of the strengths of that shape to like 1500 and what you're going to notice is you're going to start seeing you're going to see a little square it's very faint you can see a little square highlight where that little soft boxes and you're going to see it much more noticeably if I actually make this soft box square a little bit wider and bigger just by dragging these handles out now let's see what this looks like you're definitely going to see a huge rectangle right there being reflected in our spheres and you see that this is kind of like creating a nice little soft box there this is a little too overkill so what I'm going to do is just move this up and let's grab our handles here just shrink that down I just want a little tiny soft box shape but for this back rim light I'll make this a little bit bigger now hopefully this will show up on our Sears they put a hitch render you see just a little bit just a little nice little highlight looks nice looks like a little bubby bubblegum or something like that and then you can also see kinda like right here on this sphere you can see that back soft block shape as well so got that nice little rim highlight look in there you just rotate this up a little bit alright see what this looks like we've got our nice soft box reflection in the front and then of course all these spheres are reflecting each other so we got these really nice reflections and I'm digging that we've got that softbox nice little rim highlight off the back there I'm liking it so what we can do now is I don't want a black background let's just create a background here we'll just make it white so I got my background let's create a new material apply it and this will just be a solid white color just by loading solid white in maybe a little bit grayish and then luminance and that will actually show up in our render the white background and we can actually do is we don't have any color introduced into our light so we can actually do that maybe pump some yellow into the one light and maybe some blue into the back just to give it a little bit more contrast because no light is really purely white really so that's looking good I think that's a little bit too yellow I'm just tiny tiny bit cool and that's looking a little bit more realistic and since we have our dynamics cached basically we can just go ahead and just render this bad book thing you're going to notice is that since we have this cache we can actually just render a random frame in the middle of our composition and see what this actually looks like we can again go into our filter here and start playing around with some of the curves and all this stuff see what this would look like if we need to adjust any of the shadows or anything like that or if we can just fix some of this stuff and post to make this look a lot nicer up to the saturation there a lot of cool stuff you can do in the filter tab here but can render all this out and get this really nice dynamic emitter kind of thing here all right so hopefully that is a nice little intro to dynamics that can equip you to make your own nice little dynamic compositions we learned a little bit about dynamics a little bit of an intro to it how to create an emitter to admit dynamic spheres that we can use to fill up volume and create a nice little like logo review so if you have any questions by anything I covered in this tutorial please leave them in the comment section if you create anything using this technique of filling up a dynamic volume please share it with me on Twitter on Facebook in the comment sections I always love to see what you guys are coming up with if you like this tutorial please hit the like button I'd really appreciate that in other words they really appreciate you out there watching all of my tutorials and I'll see you all in the next one alright bye everybody
Info
Channel: eyedesyn
Views: 106,256
Rating: 4.9735975 out of 5
Keywords: rigid body dynamics, cinema 4d dynamics, c4d dynamics, cinema 4d dynamics tutorial, cinema 4d rigid body dynamics, cinema 4d rigid body dynamics tutorial, learn cinema 4d, cinema 4d tutorial, c4d tutorial, c4d tut, tuts, c4d, cinema 4d, motion graphics, eyedesyn, cinema 4d collider, c4d rigid body dynamics, rigid body tutorial, rigid body dynamics tutorial, dynamics tutorial
Id: E1ipKGj5qFQ
Channel Id: undefined
Length: 39min 35sec (2375 seconds)
Published: Tue Jan 17 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.