Cinema 4D Tutorial - Simulating blowing bubbles with different shapes using deformers

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi my name is pappy bedard i'm a retired engineer and a cinema 4d hobbyist i don't really have a job with this stuff i just have fun with it and one of the things i was playing around with was see if i could make a simulation of blowing bubbles turning into different shapes so i came up with a video and posted it on youtube on facebook and i got some comments and some requests for a tutorial so this is what i did i made this tutorial uh what i'm showing here should be compatible with uh version 20 and up because i did use a field at one point and the fields weren't available until r20 the uh it could be maybe before r20 uh but you'd have to use leave out the part that has fields so here i am in cinema 4d release 23 and i've already created a new project and i've saved it as bubbles tutorial so let's start by creating a cube and i'm going to turn display on to show lines and i'm going to turn on the fillet change that to 12 and in the segments i'll select all of these and change that to 17 control enter to change all three so that's a nice distribution of points now we will grab the spherify and put that under the cube and i'm going to show the top view here and display it as wireframe so we can get a sense of what that's going to look like so it's strength zero well it fills these four squares strength 100 i want to shrink this radius so it stays about the same size so the radius will be of 100. so it'll transition from sphere to cube with the same overall size next i will put a melt deformer in there and i'll put that underneath spherify and let's see what it looks like at full strength well that's way too big i want it to stay around the same size so i will change the melted size down to 100 percent that's still too big so i am going to go to spherify and change the radius down to well let's see about 55. i'm going to set a keyframe on that radius at time 0 and then at time 60 which is two seconds later our melt is going to go down to zero i'm going to set a keyframe there and go back to zero and change melt at 0 to 100 so let's see as i go up to 60 yeah it gets too small so on it's verify which i've already set a radius at 55 at frame 0. i'll set this back to 100 and set a keyframe there and let's just see what it looks like halfway between it gets a little too big so at frame 30 i'll shrink this down to 60 and a half instead of keyframe there now let me just scrub through this between 0 and 60. yeah it stays right about the same size you can see in this top view go back to this view and take a look at this and maybe it gets a little bit too pointy so i'm going to the melt back to the melt and change the radius let's say to 400 so now i'll scrub this again and see okay so uh that doesn't look like a bubble yet but what we're going to do is start moving this out and changing where the melt deformer is located but before i do that i'm going to rearrange this a bit one way you can apply deformers is to stack them up underneath an object but another way is to create a null object put your deformed object under that and stack the deformers above it so this will have exactly the same effect as you can see but this will have an advantage that later on we can replace that cube with some other object and everything else will still work so clicking up on the null i'm going to let's go back to frame zero let's change the let's see the pitch now let's change the banking to 90 degrees and we're going to go ahead and add a disk and make that positive x so that's going to represent the hoop that we blow the bubbles from so as we scrub through here you can see that it'll look like it's it's coming out of that that plane of soap so let's see so maybe around well let's say frame 45 we're going to start moving this bubble outwards so at frame 45 on the null i'll set the x coordinate to 0 and set a keyframe and then maybe 100 frames later so 145 uh we'll make it 500. set a keyframe there readjust my view a little bit so now if i play this you'll see it blows up the bubble and then continues on but obviously what's wrong here is that the melt deformer is following the null and i don't want that to happen i want the the melt to stay right where this plane is so the way i can do that is uh well i already know that the null goes from x 0 at 45 to x 500 at 145 so i just need to make this kind of the opposite so it at 45 i want melt to be zero in the y and at 145 i want it to be minus 500 and the y so uh i can show you that in the let's see if i go into the window timeline f curve and just look at the null x and the melt y and frame all you can see that they're the exact opposites so one the melt will always stay at zero so what's what's cool about that now is that you can see that as it moves out it will stay clipped right at that plane okay so next we want this to slowly transition from this bubble this sphere-shaped bubble to the cube that we created so we're going to slowly diminish this verify effect so let's start that around let's see maybe frame 72 and we'll set this verify strength to 100 and then maybe at that 145 we will set it to 0 and set another keyframe so let's play that through so it slowly transitions to a cube um it stays a little too straight i'd like that cube to sort of drift around so i'm going to rotate this null so going back to 72 i will set the null coordinates um i'm gonna leave the bank to 90 but i'll change the heading and the pitch so we'll make them zero here but at 145 let's see what we can do here so maybe set this down to 114 minus 114 and yeah maybe 80 yeah so we'll have it end up here so we'll set those two keyframes now scrub through this so it slowly turns and turns into a cube but this looks a bit too rigid to be a bubble so in order to give it that rigid look we're going to apply a displacer deformer with a shader so with null selected let's see i will go into displacer deformer i'm gonna hold down shift to put it underneath but i'll put that underneath melt and over on the shading i will choose noise now that's a bit too rough so what i'll do is i'll go in here and i'll change the global scale to say uh 1000 maybe eight hundred and then what we'll do is add um some animations so we'll have it the animation speed will be one second and let's give this a slightly bigger timeline so let's go to 240 and i'm just going to hit play from here so now you can see it kind of wobbles like a bubble okay finally what we're going to do is make it make the bubble pop so let's start the popping at around 210 and the way we're going to do this is to apply an effector there's one called poly fx which allows us to modify all the polygons i'm going to put that below the displacer and right now it seems to have no effect because what we need to do is give an effector so we'll add a plane effector now that definitely affected the polygons but it's not quite the way we want so in the plane effect of parameters we're going to turn off position and turn on scale make it uniform scale and negative one that makes them all disappear now how can we control them disappearing well clicking on the polyeffects object we can then go to the falloff tab and add a let's say a linear field now let's see what do we have here let me check the coordinates of these things i'm going to zero out this and zero out the linear field all right that's already zero but you can see what happens when we mod when we change the linear field it makes those polygons disappear so i'm gonna adjust this a little bit so on the linear field we'll make the heading minus 45 and the bank minus 45. so now if we can control this you can see that the bubble will kind of unwrap it's kind of the way a bubble bursts it just doesn't disappear it sort of unwraps but what would be nice is at this edge that maybe we could have it curl up a little bit so going back to the plane effector parameter we're going to add a position but we'll zero out the y and we'll just give it enough z to make it look like it's kind of unwrapping yeah so maybe maybe about there now let's see how we see yeah so it looks like it's kind of unwrapping until it disappears so right at 210 which is where the timeline is now at 210 i'm going to set the linear field coordinates and click on the p for position to select them all and then click on any of these that sets that keyframe and then let's say maybe 10 frames later at 220 we want it to be right there so we'll set that keyframe so now if i scrub through this you'll see that it'll disappear pretty quickly if i hit play bang it's gone so let's watch the whole thing bubble turns into a cube slowly turns and it pops so there's a couple more things we could do to wrap this up one is that when it pops we want some droplets of water to fall so the way we're going to do that is with a cloner so i'll add a cloner and look i'll make a sphere to represent a drop of water and we'll put the sphere under the cloner and we're going to make the sphere really small maybe uh two centimeters and for the cloner we wanna create a object clone so it's gonna take points off of an object and the object we want to refer to is a is the cube so you could see there's some there so let's go to about a hundred drops all right so that might be enough and then finally we want those drops to fall so on the cloner we'll right click and add a simulation tag rigidbody and apply tag to children but we don't want that clone to create those raindrops until it pops at 210 so at 210 on the cloner basic tab we will set enabled a keyframe we'll go back one single frame to 209 and disable it and set another keyframe so if i just scrub through here you could see that the the rain the uh water droplets will fall right as it pops play it again okay and maybe one other thing we need to do we take a look at this disc it's just a flat thing i kind of want to make it look more like it's soap so and and let's create a ring around it so we'll uh create a torus and uh we'll set that to point in the x direction maybe make the pipe radius nine that looks good and let's see if we play this okay one thing i'd like to change is the displacer on the cube i'm going to make the intensity maybe half as much so it won't bulge out so much when it's when it's there okay so just to get that out of the way for now i'm going to turn off the the null object so we can concentrate on this first of all i need to add a few more segments into the disk so let's see maybe about like that and like that so now there's plenty of segments to use for the deformer and i'm going to use a displacer deformer on this one also so shift click and then the shading is going to be noise for this one let's pick a different noise let's say dense obviously that's way too intense so let's increase that global scale let's try 500 okay but it's way too extreme so we go up one level uh let's see click on displacer object and shrink this down maybe two three but i want to automate this i mean animate it but not in the same way i did the cube this one i want it to appear that this soap is drifting downwards so go back into shading and i'm going to leave animation speed at zero but in movement i'm going to make it one percent and then well let's see i'll try i'll try one centimeter and see how fast that looks that's a little too fast let's make that 0.3 in the y so now it looks like uh it's soap and it's slowly drifting downwards let's turn back on the null and let's check out the full animation now turns to a sphere and then a cube and then it drifts and then it blows apart so that is basically it for how i did this animation other than the materials which i'm really not going to cover because there's so many different ways i mean so many different uh render engines that people use and each one has their own way of creating bubbles and lighting and everything else so i'll let you do that research for yourself but the final thing i want to do is to show you how i've used this to make bubbles not just in the shape of a cube but in any shape so let's pick a different shape how about a taurus let's make it a little bit smaller maybe a slightly less pipe radius and we're going to drag that underneath cube and we're going to drag cube out of that null parent and turn it off so now taurus should behave the same way let's see what happens whoa it's way off so let's see what happens here let me look at taurus i'm going to look at the coordinates i'm going to reset all these to zero including the angles and i'll just slowly scrub through this so as it comes out oh it looks like a ring not a bubble well that's because of the way this spherify object works what it does it radiates a point from the center of the sphere out towards all the points on the object and it moves those points to a sphere well in the case of a taurus if the center of the serify object is in the center of the torus in some directions there are no points that it can see so what we need to do is take this taurus and move it so that some of its points surround the point in the middle of this verify object so let's continue from there and see how this unfolds yeah that looks pretty good and then this should also break apart now it's a little too rough because i don't have enough segments on the torus so let's fix that by maybe adding a few more ring segments and a few more pipe segments so that that tearing looks a little cooler now also the cloner right now is referencing the cube as its object we can change that to the torus by dragging that in and let's see if it's going to work yeah so that should work so let's play that one through and let's try one other object so let's say i go into the content browser and let's see how about sculpting base models about this female bust now that came in really small so what i would do is scale that up so it's about the same size as that ring and move it down and then go back to my objects manager and drag that here under the torus drag the torus out uncheck it let's scrub through this and see what happens okay but i don't like the way that ends up so what i will do on the female bust is go to the rotation tool rotate this around [Music] rotate this around and then move that roughly in the middle there now let's let's go scrub backwards and see what happens yeah so it's kind of difficult to see if that's going to look like a nice spherical object with the lines on so i'll turn the lines off and yeah that probably will render just fine it slowly converts into the female bust and it's got that little bit of a wobble from the displacer deformer and then finally it rips apart and again what we need to do is go to the cloner and this time the female bust will be the object and as i single step through turns to rain so maybe another thing i could do here is in the cloner with the cloner selected i could do a random effector and for the parameters do no position but we'll make the scale uniform scale just so we have different size drops yeah maybe make that about 0.42 that looks good so that about wraps things up for this tutorial obviously what i did next was to apply materials and environment and lighting and rendered it out what i did is i rendered each of these separate bubble shapes out individually as separate videos and then i stitched them all together in an after effects project and added a little popping sound when the bubbles burst actually in the video i posted i used x particles instead of a cloner to represent the drops of water falling because i could have them blast out a little bit looked a little cooler anyways so i hope you were able to pick up a couple of tips in this tutorial and what i'm going to do is make the project file for the that i just did here for the tutorial available for download for free on my gumroad account so you can download it and play around with it should be compatible with r20 and up because i did use fields and fields are not available and were not available until r20 anyways with that uh thanks a lot and i will see you next time bye-bye
Info
Channel: Pappy's Tutorials
Views: 1,443
Rating: 4.9682541 out of 5
Keywords: C4D, Bubbles, Deformers, Tutorial, Project file, Free
Id: mG2W3NHDQS4
Channel Id: undefined
Length: 29min 24sec (1764 seconds)
Published: Sun Mar 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.