Applied Houdini Rigids I version 2.0 - Fundamentals

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back to apply to Jeannie for rigids one version two fundamentals in this lesson we're gonna talk about really understanding in a deep level how rigid bodies work and are represented in Houdini well start with the foundations of packed instancing transformations fracturing go over constraints and important dynamics properties and work up to using Houdini's RBD toolset to tackle more complex setups faster than ever before as usual the goal is for you to understand how and why things work the way they do so that you can further customize and problem-solve on your own by the end will even render it so it looks kind of nice hope you enjoy it so first things first we need to talk about what how rigid bodies are represented in Houdini rigid bodies in general are you know individual objects that collide with each other they're constrained to each other and all that good stuff but in Houdini by default whether or not you're familiar with Houdini yet you need to know that when you're working with geometry you know they're a bunch of individual polygons and points and and all that stuff and that's fine when we're doing geometry manipulation but when we have multiple objects say like here we go I now have eight of these pig heads like so a little small but there you go these are not really individual objects still in Houdini it's still just a pile of polygons you know before we had 2,000 or almost 3,000 polygons now I've got a lot more it's still just a bunch of polygons and points and they happen to be separated by distance and things but unlike other software packages let's say like Maya or Max or blender or whatever in those packages usually you're dealing with objects that have geometry but they also have a transform which means where the individual object is in space how its oriented meaning its rotation and all that jazz and so Houdini has a notion of packed geometry so if I were to take my original pig head here again polygon points and I'm going to turn on this pack node now you'll see it says only one point one primitive one pack geo so what at where does the geometry go well clearly nowhere it's still here but it's now inside of a package literally you could take the cue from the little icon the geometry now lives inside of a briefcase it's going on its little trip to rigid-body world and what's really nice about this is it does two things one is that now that it's one point it'll have one position in space and it'll actually store its orientation as well so if I were to move this around I could make a transform node for example here and I could move it rotate it you know it's still obviously one thing but now it is baseline it is the original polygons points and then packed up move to new location and all the polygons of points move or inside of it they are inside the briefcase remember and now they're here in fact if I unpack it I'll get them back and they'll just be now in their new location but now it's not a object anymore now it's just back to the just general pile of polygons and points so let's turn this off again for a second one of the nice things about having this not only do we get an individual orientation and location we also get to instance this thing so if I were to have two of them or three of them it still only has a memory footprint of just one of the pic heads and then in the new locations and orientations Houdini just knows what should this look like I'll just look back to the original definition again this before it was packed look back to that definition and then I'm the same as that one so we don't need to duplicate data so what do I mean by that well here I am as we started to say we have eight of these things and we have eight times as much data because we have to store all of it in fact if I were to split this top and bottom and set it to they reorganize this here new Jeany 18 go to inspectors geometry spreadsheet here is the data there's so much of it we don't really need it a lot of its redundant it's the same definition of a pig head over and over again but we've restoring it eight times and it's not necessary so if I were to let's say have more of these so I'm using a box and I'm instancing or I'm rather I'm copying these things that's the problem writing copying them onto that so as I increase this box and have more points I get more and more these pig heads more and more data I'm going to open up my task manager here go to memory so if I go to I'll bring it back in so again let's say they make this 25 by 25 by 25 watch how the memory it's still thinking about this it's gonna take time it's a lot of work for it to do it's taking it more and more memory more and more memory look at that it's just you know it's unnecessary to have this much duplicated memory and this is going to matter for rigid bodies too because in rigid body sims a lot of times you have duplicate pieces if you have one wall that you fracture into fractured components but you use that same wall many times we don't need to use more memory and that allows us to have way more detailed Sims because we're not actually using more memory still still use processing power to see where they all collide but saving memory is important so there you go we've just jumped up and if I look at this we now have 50 million polygons 250 million points it's just a real huge waste of data and again just imagine all this data being saved into memory we don't have to imagine it's right there so that's fine but if I pack this you'll say it just kicks all that RAM out and it's done immediately look how fast it did it to it we didn't the wait all that time so we have a few things going on here so we're seeing instances of one memory footprint one pigs Worth and then it's just stamping it everywhere and you see all these black cubes that's another nice thing that we get to take advantage of because it knows that these are individual items each with their own bounding box which is a cube you could draw around the piece we can do scene optimizations like that where we don't have to draw them all so I can turn that on and off press D in the viewport go to optimize you can turn off distance paced geometry culling and then when I move the camera again it still moves pretty fast so you must keep it on we get the same idea much faster so again faster less memory and essentially is the same when I render this out of a render these won't be cubes these will be the actual thing so that's what packed geometry is in a nutshell the one little tricky thing about it in terms of your just being comfortable through Deenie and the data management side of it is if we look at that geometry spreadsheet again the position is obvious P P for position x y&z where's the orientation the orientation is actually stored in this other place over on the primitives themselves they're actually stored redundantly the position and the orientation in a thing called the packed full transform so packed we know what that means transform means the rotation scale translation meaning position and also shear meaning like a warped thing that nobody ever uses that's stored here Wow what does that it's crazy it's 16 numbers it's a 4 by 4 matrix a grid of numbers that stores all the things that I just said let's actually talk about what's let's try to visualize that and talk about and appreciate what that is now in the next chapter so it's very important to understand what a transformation is is not important to understand what the math is or anything like that so fortunately you're not gonna have to learn any math here that said identifying and understanding what it is is still very important because this is the data I always imagined it's like a little card it's like a business card that says the address of where this object should go which again is gonna be the the size of it the translation of it and so on so I broke it down by what the components mean and color so this by default with all the zeros and the one down the diagonal it's called the identity matrix which simply means just stay where you are don't change don't change sides don't rotate don't move now the green right here is the translation meaning the actual gist location in space so if I were to move this you'll see it changes and not applying any rotation or anything so nothing else really changes here now what else you got these numbers down here or rather the whole red box is the rotation of it but the diagonal also in the box is the size of it so if I were to make it bigger and smaller so here I am making it bigger you'll see those numbers change then that's because I'm making it bigger and smaller on all three axes X Y n Z if I were to make it bigger I'll just on the x axis here just this one changes and isn't that interesting just this column here seems to represent just the X changing and this one's just the Y changing and so on now that's going to matter because when we rotate it so I'm going to put this back to one 101 they rotate it everything's changing but it still is actually in terms of x y&z so what do I mean by that well if I were to take a look at this so see this is the Y so again Y is the green one here and we said this is the Y so what is this saying XYZ so within the Y component the Y is pointing straight up so zero one zero means point up along the y axis which of course is what the Y axis does so again X is 0 Y is 1 and so on now if I were to rotate this to the right let's say I rotate it all the way to the right why am I in wireframe mode let's say I rotate it all the way there right 90 degrees now we're back to some nice easy to understand zeros and ones again so the y axis which is still this column is now says 1 0-0 and look at that the x-axis points to the right which that Y which used to be appear now points to the right so it's cent what that what this is saying is it's saying when you apply me the old y-axis now points this direction the old x-axis now points this direction and the old z axis now points this direction and in fact the old x axis 0 negative 1 0 we can see that it's true the x axis which used to point over here now points down and those are easy understanding unit vectors meaning they have a length of 1 as we rotate it around and such they're all still unit vectors really but now we're now looking at this it's just hard to really see it we're seeing and again we never really need to do the math but that's what this is it's a very succinct way of saying this is your new rotation you go from your old one to being oriented this way now each of your axes you actually literally exist in this new spot and perhaps you're bigger or smaller now like so so that's pretty cool now that's us just changing these numbers around if we were to actually run the sim that's this is why it's important is that this is what the rigid bodies solve is doing on every frame it's coming up with a new location for the pieces and then it settles so it's not surprising that when it lands the y axis is pointing straight up and down again if it's resting on the ground but it still has us 1.4 because remember we we scaled it up to 1.4 so there you go so that's that's the whole thing so that's being stored internally we don't need to manipulate that ourselves but we can use it this is why it's important to know that these things exist the whole point of apply to Deenie is that you understand what's going on under the hood side effects is always gonna keep changing and updating their software which is great but it does mean that you can't just rely on a tutorial whether it's or any of them to be you know whatever the news tools whatever the newest RBT RBD workflow thing is those things will change or you'll need to just need to make your own thing in general and that's even more common you have a need to make your own tool so the point is you need to know ultimately what is going on here and then you don't have to wait for side effects you can fix it or build it yourself so what am I saying here I'm saying we can take something like this so here's a pig head right I can move it to where this is right because remember this is it's just an address this is just an address of where to move a thing to so I can move even though I calculated it on the cube I can move anything to that so here I am moving the pig head to that now I know you might be getting scared if you see some code over here and we're not gonna learn this code today so don't worry this is just a demo but you want you understand that we can move anything to anything else and if you are interested I'll say real quick remember and I said packed full transform is what stores that I'm simply saying get it store it in the letter M and then say the positions move to where m is that's what this is saying we multiply the position times the matrix in fact just for fun you can see how it's doing it per point so as I you know for some reason I just thought it'd be fun to do it this way it's doing it per point it's not you know an individual object in this mode it's just points in primps as we said before but that's ultimately how an entire object gets moved into another space every single point gets moved into that space and so on and so forth so that's what's going on here I hope that makes sense if you don't understand all that that's fine you just basically need to understand that there is a thing called a transform it stores the size it stores the she which again we don't usually is the location and the rotation and then we can use that transform to move other things the most common way this comes up is almost what you're seeing right here see it looks like the pig head is being simulated but it's not a proxy object so if you're used to other packages you'll understand that notion at least you often simulate a simplified version of something and then simply apply the high-res one there it would be very difficult to fully accurately simulate this pig head there's so many little polygons that would all have to have their own collision detection but we don't need to do that if we simulate a low-res version again the cube and apply the transform to the high-res version and that's literally what we're gonna do in this lesson and that's why you need to know about pact pieces and that's why you need to know about transforms so now let's get into the actual fun part of the lesson alright so here we are actually now gonna do it ourselves by ourselves I mean yourselves so go to project set our new project we'll call it something like bridges one version too in case you've been with me since rigids one version what you'll need a unique name for it now let's save it as rigid it's one version one no first do everybody's confused myself very good and then so here we go we have a 240 frames and that's ten seconds and it's too much so let's bring that down to like 96 frames because we're gonna render it later and honestly 96 frames is a fine so there you go we have our projects 96 frames long we are in the object context here which is what we want let's make an object let's make a geometry node just gonna store our rigid bodies in it it's going to store pretty much everything we're gonna do in it today in fact I'm gonna call it the sin so now we're not actually in the simulation context now we're in the place where we can build up our our nodes and our geometry and such but we'll we'll get obviously to the simulations so pig heads of his tab Pig spell Pig correctly there it is so there it is again just like from the demo easy enough I'm going to say let's let's pack it immediately I'm going to use an assemble node here can we just tend to use these and rigids for a variety of reasons they have some convenience stuff inside of them but ultimately they do create pack geometry if you turn that on you'll notice the texture disappears in the viewport don't worry renderer is like management and things we can still set it to to render that material later but just so you know it's okay that it disappeared obviously we can see the geometry anyway so we middle click and hold we have one packed fragment which is the same more or less as a packed piece I'm not going to get into the technical difference it's a memory management thing but as far as we're concerned it's still impact thing so it doesn't really matter still as a packed full transform and all that stuff okay so there we go we've got a pig head let's move it around so I'm going to make it transform now remember we need to move it after we pack it I'm gonna move it up for I'm turn this back on if it was off for some reason so we're gonna have it fall and simulate it like that easy enough to make a dot Network and I might hear you screaming out there yes there are there is a new there are new convenient ways of doing this and we will get to them in this very lesson maybe an even a half hour from now but for now I need you to understand what is going on under the hood that's the whole point of this so we're gonna make our own top Network and do it ourselves so go inside of it and we're gonna make an RB D packed object the geometry source is first contacts geometry fact if I look at it I click on this there it is first context geometry means this first input here very good so that is a container as an object as a container that stores various simulation things in our case there's a geometry sub data which is what we just read into it and that's gonna be the thing that is simulated now the way it is simulated like if I press play now nothing happens because there's just an object but nothing to move it around or as we often say evolve it in the simulation so put a rigidbody solver down connect that to this we can look at that press play now it takes a little bit longer to do but there's still nothing to do although it is technically simulating it there's no forces there's no gravity or anything so here's gravity now it'll just fall forever into the void and let's give it a ground plane which is kind of a convenience thing as a collider and we can define our own custom colliders later but you often just want a regular infinitely large ground plane so it's just a nice thing to have so I made a merge node here by default it says collide and the left affects the right just change this to mutual because we just don't want to we don't get to order wrong and then it doesn't work so there you go that's it so we made our first sim pretty easy wasn't that scary we didn't need to rely on the built in our beauty tools to make this it was pretty straightforward again to recap we had geometry we put it inside a little box we packed it so it has a transform we moved it to some arbitrary starting position we loaded it into the sim into the simulation object we said we haven't have gravity it doesn't matter where this like some of these things are kind of malleable where you can put them like this could go here and it wouldn't matter we're just setting up a relationship in here where we say this is solved by this thing same thing I could put this here which is then saying this object and this object are solved by this but the ground plane doesn't do anything so it doesn't really matter but so this is solved by this this has gravity if I had gravity here it means the ground plane is subject to gravity but again it can't move so it doesn't matter is it just it's just an interesting way of saying how things are related to each other the ground plane collides with any objects that come in from this this is the only object coming in so this is colliding with this because of this and the output of course means that this is what comes out of the sim this is what you usually want to have your little orange flag on you keep your orange flag on something else that is the output of the so if I want to just the ground plane to the output of the sim it could do that but why so there you go so that's that on our sim itself it's going to object merge back in everything I would probably only want anything with RB d in the name which is this I don't want the ground plane on its own the ground plane was coming in so when this said star we were getting all the objects that were in there to be clear the ground plane is also an object it's just not being solved for so there you go we've got a simulation now one last thing I would like to say is the object itself has a variety of things that are interesting about it so for example if we go to the bullet data tab on the our Beauty packed object you show guy geometry what is this crazy thing this is what's actually colliding in our solver it's not colliding this crazy high-res thing remember I was saying with the box and all that bullet uses whether it's called convex hulls as you can see the geometry representation by default is a convex hull and that's what this is you could change it to other things you could have a box and you can see it's only that that's being solved I can make it be a cylinder and you know and the high-res is just moving a along with it because remember the transform is just being applied to that thing there's all kinds of stuff in here these are actually very useful to use if you have spheres they solve very fast or the fastest thing that can be solved they're very simple they're just a point and a radius convex hulls are still pretty fast for reasons I won't get into you can do concave but it doesn't work that well I mean it works fine I guess for one piece but once you have a lot of stuff it's gonna slow to a crawl and may not even work at all really you should be setting your things up with a mind towards being convex hull which is why it's the default a convex hull means that you never have a concave angle meaning you never have a dip or a depression anywhere obviously this is a big dip coming around here but it's just flattened out so that's what's going on to the hood and later in the lesson we will make our own proxy geometry that better represents the piece but it's still not as high-res as this but any case so that is what's actually colliding under the hood and you should also know there's various properties that individual pieces can have things like bounce and friction we'll talk a little bit more about those but they do what you'd think they would if I turn this up quite a bit we good bye does crazy stuff I mean you know the default of 1 is or 0.5 is probably fine but sometimes you know if you really want something to thud against the ground you want to do zero although even zero will still bounce a little bit you'll need to use drag and things like that if you want to completely get rid of a bounce friction we can't really see right now we'll see that later but that's where it is and the mass itself we can either explicitly say how heavy it is or we can have it computed for us based on a density again we'll talk about that a little bit more later but there you go we've made our first sim and now let's talk about how break this this thing up to make a fractured set with the Voronoi so for knowing is one of the most commonly used fracture algorithms out there we're still going to use it here mostly to create our proxy geometry but nonetheless still super and super important because Voronoi fractures create convex pieces as we just saw convex is what bullet wants so how does Voronoi work basically we have our geometry that we want to fracture we will put points scattered points in space usually inside of the object itself and those points will define where the what we'll call cells what the actual resulting fractured pieces are now how that works is interesting so if I put two points into this we can kind of see how that works we have two pieces now it's not that the points define the center necessarily the pieces like as you could say this is clearly not the center of this piece but as you maybe you've been in can kind of see all the space in the in the object that is closest to this point is this points piece so like all this area out here obviously this area out here is closer to this point than it is closer to this point so it's all being tagged essentially as this points piece now as you get to the halfway distance between the two points obviously this area right here is closer to this point so it's tagged with him so all this becomes heads and as we add points to it like so we get more complicated results but it's still true that all of this region here is closest to this point all of this region here is closest to this point and the dividing lines are always going to be at these halfway points between the various points so have these lines here too to help you visualize it you can kind of see how it's it's always the line is always perpendicular to that line even when that line crosses over other things here it's still this line here down here that's being defined by that so the point is once again you don't need to do this math yourself but it is interesting to see if you cluster points over in one area you'll get smaller pieces in that area this is a common thing if this had to fall on that corner we wanted to fracture in that area more than out here we would cluster our points over there so if you really wanted to go for it we have 20 points and again as it moves through you can see how the this the cell moves with it pretty cool these are all convex again they don't have any tips or anything like that and the same applies to the 3d one so if we were to look at the 3d them in ortho mode there we go actually very foreign a 3d anyway here we go apply to a 3d object you can see all these pieces are convex and the way that we came up with this is we had a box we turned into a volume which is a common thing the volume we then put points inside of it so you can see the points live inside the box that we're fracturing and then we fracture it then there you go you can see how the points are more or less they're kind of roughly in the center but not always as we saw but the point is more that there you go as we change the amount of points that we're doing here it's a very fast algorithm it chops things up really fast and the more of these things that we have the more pieces that we get pretty cool so that's how a Voronoi it works so let's actually use that now to do our first fractions back here in this world let's put this to use so I'm going to continue working in an area that we were before so come back up to the pig head itself we need to make that volume the one that we scare the points into that we just saw we can do a video from polygons like so a VDB is a kind of volume turn off distance V to be we want a fog V DB it's kind of hard to see if you like you can press D go to background tab and change it to dark like so we can make this the voxel size smaller when we talk about voxels for days over in the volumes one lesson which is also free if you want to know more about volumes but we're not gonna do deal with volumes that much right now other than to get a better representation of this we need to make this voxel size smaller but now we're done with it already so we're gonna scatter into this I'm gonna make twenty just twenty because remember these are going to define where our fractured cells are gonna be so we have 20 points drop down a Voronoi fracture this is one of the bigger changes since the last ridges one Ridge it's one apply to geni lesson let's let this node got redone and now it's it's a faster it's newer and actually has less options now they split it out in just a few different notes in any case like before drop it in put your pieces into it and there you go we now have it fractured my okay but it's smooth shaded I want to see those lines okay so there it is it's kind of it's kind of hard to tell that it got fractured there's two things you can do you can click on this which will make a visualizer which is right here it made a name based visualizer the Voronoi fracture makes names primitive attribute so the name is a kind of data that every single polygon because it gets is not packed yet packing comes later right now we're in regular geometry mode every polygon that's within the same piece has the same name so if I again split this top and bottom and set the pain tab type to be inspector geometry spreadsheet this is the point data here if I move over to buttons to this one here is the primitive data I mean the polygon data so you can see many polygons have the same name there are about 20 pieces it's apparently more than 20 pieces but that's fine so there you go if I drop down an exploded view the exploded view uses that name attribute and you could change it we could change the name of the attribute but it's we miles just use the defaults okay so there you go so there's our broken up thing now I'm gonna come back I'm gonna put our color scheme back here so we can see an issue there's black faces on the inside here because this material the pig head material that we can see these are new faces now on the inside they didn't use to exist you know back when it was this obviously there was no inside but now that there's an inside it's trying to apply the pig head material to the inside but the insides UVs which is kind of a if you don't know what UV czar don't worry but all I want to say is we have new faces we want to create a material and not use the pig head material with the texture so as a quick diversion go to the material palette create a principled shader you don't know what that's about and that's enough well we'll call it will go to the mat area here and we'll call it inside that's that's enough and then we can go back with obj into here and say if a material saw let's overwrite let's not use the pig head for the inside literally there's a group called inside the Voronoi fracture made that group for us interior group so all the new faces on the inside are there so if I go here or rather let's let's look that exploded view up to our material and let's set that new material we just made that's in the mat area and now we can see it's just this white now and we'll be able to control that material but it's way better than that and it'll actually render and it looks like something nice now so let's save that and if we look at the assemble we now have 22 packed fragments there are 22 pieces in this thing it made 22 because once again it's going to use the name or actually by default it's going to look at the connectivity it's going to determine that there are 22 different pieces let's turn this create name attribute off we don't need to create a name it already had a name I would rather use the names that the Voronoi fracture came up with so again 22 pieces either way it we're moving them all up when we do this and if we just look at the top Network here when it falls they now fall and they break now technically they were always all broken they're not even really connected to each other but they're all falling at the same time and they're not really colliding with each other in any way that matters so but then when they actually have to hit each other when it hits the ground playing if you want to see the ground plane we can come back into our our sim itself like so kablammo so now you made your first fracture now the issue here is that it was two issues one issue which we'll deal with one at a time is they don't stay together at all every piece breaks off the other issue is these fractures are straight lines they don't look very realistic we can fix both at first let's deal with the thing completely falling apart so the bonds that will keep these pieces together are called constraints there's lots of different kinds of constraints there Springs there's glue there's soft there's hard there's slides there's hinges there's cones there's lots of stuff you know that's what the later lessons are for but in this lesson let's deal with the most commonly used one which is the glue constrain a glue constraint basically says this piece is attached to that piece entirely they don't ever move apart from each other until it's broken until some threshold of powers is forces them to break apart so glue constraints are going to be made constraints are polygons lines that connect one piece to another or more accurate they are polygons lines like you know here's a line I can make one myself if I want but here's a line it has two points if a middle click and hold it's still a polygon but it is a line the polygon line where the two points define what two pieces are held together so if we have name attributes on these two points and the names will be the names of the actual pieces and the fact that they're hooked together like this means that that is a way of saying these things should be bound to each other let me show you what I mean don't take my word for it so here we go let's start from here let's start from our assembled packed pieces and they have a name attribute they already have point name at so we're actually already halfway there anyway the most commonly used most common way of doing this is a connect adjacent pieces so let's make a branch off to the side we're always going to have the pieces themselves come into the first input of our sim but the constraints is a whole separate bit of geometry that's going to go into a different input so here we go Connect adjacent pieces so I don't see anything yet that's because the search radius is quite small if you middle click and hold and I increase this you'll see we'll see some stuff now so that's something so what am I seeing here we're seeing some of the pieces are being bound to each other so that's cool if I were to take an add stop but you don't actually need to use for this but it'll help visualize it an add saw paradoxically we can say delete geometry but keep the points this is a fun way of saying these packed pieces the packed fragments they are represented each by a point as we know it's the it's the centroid of each of these fragmented pieces these are the points that are actually connected together by the connect adjacent pieces so by the time we get here what do we have we have a bunch of polygon lines and you can ignore this warning here we have a bunch of polygon lines that connect two points each and those points are the names of the things that are bound together so if I were to take let's say one of these so I'm gonna click click it I'm going to delete it say delete non-selected so now I just have the one it's one line with two points and those two points are the nicknames the two pieces that I want to keep it's a two and five we can literally take that knowledge and say something like I'm gonna take a making another one of these blasts coming from this this is not to make the sim work or anything but I can say name equals peace 2 & 5 lean on selected points and there you go so these are the two points to the two pieces that are being held together by this hope that makes sense I'd have to go back into this to actually see that see there you go say we can see it we have the two different pieces here and those are the ones having held together just has an example but any case I think we've made that point clear by now so all of these are hooking together lots of different pieces I'm gonna turn this visualization back off there you go but it's still only like kind of a scattershot amount of them like it's not a very strong thing where every piece is connected to every other piece back on here we can increase the max connections each piece is only allowed to connect to one other piece so let's bring it up to like four you can go beyond five this is just you know you can make set this number to whatever you want but I'm just gonna say four is fine so that's pretty cool so now we've got a nice little radical looking thing in there and the last thing we need to do here is actually give it a name the constraints because again there's glue there's all kinds of things we need to give it a name so that we can associate these lines with the constraint that we want inside the sim so make a attribute create and we'll start using Bex soon but I figure in this first lesson we'll use an attribute create is a primitive attribute it is a very specific name constraint name it has to be constrained name and it has to have this underscore and it has to be lowercase the primitive type it is a string type and this part you could call whatever you want I'm gonna call these glue that seems to make sense to me so we now have primitive attributes ease this constraint name there if I click the I there we go so the name is a point attribute the constraint name is a primitive attribute and to that I can plug that into the second input here that doesn't inherently do anything until we actually have somebody ask for it so I'm gonna make a constraint can't spell day go straight network make a constraint network here that takes this in on the left input and then it wants to constraints themselves here so let's make a glue constraint relationship that goes here the data name has to match up to what we typed before when we tight when we had that constraint name attribute we set it to glue the capital G that's what has to go here the strength and all that stuff is all here but there's one more thing we have to do second context geometry see now it shows up so that is this because this is the second context cool now we have an issue the constraints are down here whereas our object is up here technically it works because all it's doing is saying the two names of the pieces but it looks insane so let us actually fix that we transformed this up but we never transformed this up so what we can do for now we'll do a better way soon we can say actions and take create reference copy and put that here one of several ways we could have done it but probably the quickest and dirtiest this is just a whole bunch of expressions pointing back to this one so it basically is going to do the same thing so now if I go in here you'll see the constraints are inside of it and you better see these if these don't show up that means something is wrong so like if this is wrong if they don't show up if this is pointing to the wrong thing they won't show up so you have to actually point to the geometry and it has to hook up here based on the constraint primitive string name so anyway we just ran it a few times I didn't really remark on what we saw it is working you can see a lot of the pig head is remaining together because it's the bottom that hit and broke and a lot of the stuff at the top didn't really receive enough force to break it you can play out this if you made the glue super strong you know it'd be less likely to break as you can say if we made the cou really weak that is probably all gonna break anyway if you like you can make it negative 1 which means never break no matter what that can be very useful to cluster things together for now I'm just gonna keep it the default great so you maybe made it a sim we made a fractured sim but like you said the other issue is that these lines are too all too straight so let's fix that too so obviously the Voronoi is very fast at making many pieces and the pieces are good themselves for simulation because they're already convex but they make convex pieces and not much else so you can cluster lots of convex pieces together to make more interesting shapes but nonetheless there is a better way for making higher quality looking fractures and that's called the boolean boolean is something that has only been really kind of mastered relatively recently there used to be an older boolean in Houdini called shatter that didn't work very well so this was introduced into 1816 in any case there it is we take cutting geometry and then throw it all at a piece and then it will create it'll cut it along those lines so totally arbitrary art direct Abul stuff so in our case I had a box I took a grid I rotated two different ones I noise them up with the mountain top I put them together but then the boolean actually set to shatter mode cut it as you can see and then we explode it there you go so obviously that just looks great why would we not just use that well first of all it's slower than Voronoi although still surprisingly fast but another issue is you know remember kept saying convex convex convex now we have dips in here so this would be easier to see with the light now we have these dip areas and that's an issue when we make convex hulls you know they will still intersect because these are the convex hulls that are created from that but as you can kind of see they're gonna plug they're gonna they're going to interpenetrate each other here in fact you can see if I clip inside of it you can really see the interpenetration now say so they're colliding with each other already now bullet well does a good job we're on the frame that the pieces are first initialized normally the sim starts I should say it will say Oh am I already intersecting like are these points on my convex hull intersecting another convex hull okay well then don't count that collision because they're already intersecting at the beginning of the simulation you are excluded from the actual collision detection so other points outside will still collide with the other with their neighboring objects but the points that are inside won't so that is a good enough way of doing it but still problematic because maybe they should collide like you know I don't want these to just fall through the bottom ones so boolean is good for getting a nice high quality look and you can throw it at your sim and maybe you know it'll work good enough and might but it's it's nice to be able to do both where we do a Voronoi fracture and to make low res geometry we take those Voronoi pieces noise them up with mountains or whatever and then use them to do boolean cuts so that we have high quality cuts that resemble more or less the lower quality Voronoi and that's how we end up getting the best of both worlds and that's what you can either again make your own setups to do that or we can use the one that comes with Houdini now which is the RBD material fracture node okay so back in our scene here we're gonna talk about basically rebuilding this network but better using the RBD workflow tools the RBD tools are here the press tab they're all just listed here there's a bunch of them we're not going to cover all of them today we're gonna cover some of the more basic ones to make a straightforward sim basically to do this and then some so we've talked a lot about how convex pieces rule the world in the bullet sims and how we can make nice cuts nicer shapes with the boolean and that we can maybe marry the two together by having these be the proxy pieces and the boolean's be the high-res ones and that's exactly what we're going to get with the RBD material fracture and the RVD material fracture does a lot of stuff a lot of convenience stuff for us and I should also mention you know right now it's December of 2019 and this is the state of the art BT tools they're gonna be changing all the time they've been they were introduced in 2000 in a Houdini 17 and they are always being improved sped up more features are being added or reorganized I expect that will continue that's that's the fate of a high level tool such as this what I mean by a high level is that if you open it there's a lot of nodes at a lower level in here and in fact not only are there this many nodes but you could probably pick almost any of them and jump into that and then there's even more nodes so you can you can kind of like you know keep falling into it well that wasn't that impressive but there's there's a lot of like sub stuff so and then here's another sub thing and so there's a lot going on here so this is a high level tool because it combines a lot of low level stuff these are low level things when I actually make a volume why is it still showing that all right well anyway making points doing the fracture that kind of stuff if you ever get this happening again for the record sometimes you can go back in and come out of it to make it fix itself sometimes you can do this if nothing else works destroy the scene view and then create another one and now it's gone just so you know any case so these are all low-level notes the things that do the packing the things that do whatever whatever basically if you can't go any further inside of it that's as low as it gets so that's the whole apply to anything as I want you to know all the low-level stuff so you can make tools like RVD material fracture if they change you can understand what's change and why you can modify it to get exactly what you need but in the meantime we might as well enjoy it because it does do a lot of stuff that we want and it's better than setting it up ourselves every single time so without further ado let's set up using the same pig head from the start let's see what it can do for us so by default it's going to make two levels of fractures because there's two tabs here under this primary fracture thing and what its gonna do is it's going to make the pieces it's going to make the constraints which you recall we did down here it's of high lines and it's gonna make proxy geometry meaning the ones that are actually going to be sinned the proxy geometry is going to be Voronoi convex pieces that snugly fit together very nicely and then the high-rez geometry is just going to go along for the ride they'll have the same names as the corresponding low-level proxy ones so let's see what we got here I'm going to turn off for a second this second fracture and this is look at the first one so what are we doing we're basically saying we have a fracture ratio which says all incoming pieces fracture them because it's a 1 if I said to zero no incoming pieces would if I said 250 percent half of them would be fractured half of them wouldn't be how are they fractured well they're fractured there's five of them so this is the same thing member cells Voronoi cells it's gonna scatter five points into a fog volume which again is everything that we did over here already it's just all rolled up into one package now so before we even continue with that let's make another note here at the re BD exploded view whenever we have this three output 3 input thing or however many you can click on that one output shift-click the next one shift-click the next one and then put it into any one of these and you'll see it automatically does it so here we go it's an exploded view not unlike our regular exploded view over here but this exploded view will allow us to show the constraints also and again that's one of the things this makes for us this purpose pink line is the constraint geometry and we can see how these pieces are connected to each other now right away we have that same issue from before which is the material so let's copy that over under here and there you go so the high-rez geometry now has the material fix the low res geometry does not but it doesn't necessarily matter okay now I said this is high res geometry but this kind of just it looks like Voronoi and that's because it is however there's this thing here called detail detail edge detail it's referring to these edges along like the outside it's only along the sides of the pieces now we can see there's more there's like the waviness there's the dips and things that normally wouldn't be allowed in a convex representation so I'm going to go back here for a second I'm going to turn off proxy geometry so now you can see a little bit easier then we've got controls on this this waviness can be controlled with the noise height so I'm going to make it a lot bigger I'm gonna make the whole feature itself be somewhat bigger so that it's not as crunched together what else we got we got interior detail which will affect the surface kind of away from the edge a little bit more there I have a pretty high res looking fracture there which is nice because again the actual simulated geometry is this the proxy geometry or if we want to look at a little bit easier we can look at it like today because I could just do in an exploded view the actual proxy geometry is still just the Voronoi pieces and that's important because they're gonna be again they're gonna be snugly together colliding each other all the time but in a way that they don't overlap each other so an easier way is really just to have it be turned on here so what's nice here too is we have this visualized thing we can visualize say the geometry outside of the proxy now if you try to turn this on you don't see anything that might be because you have a different visualizer still on so look at this Google Maps looking upside-down teardrop thing and make sure that it's on but make sure that the other scene visualizers are off in any case so what do we see here the red areas is the high-res geometry when it is outside of its corresponding proxy piece it's not an error or anything necessarily but it does mean that this if let's see if this was resting on the ground this part would be sticking through the ground because really the simulation only the proxy thing is actually being simulated and this is just along for the ride so we might if you look closely later on we might see inter penetrations between the pieces but the hope is is that they be so small and so slight where the cameras moving or if there's a distance so there's motion blur or the shot is too short or it's too dark or a million other things that we usually hide little mistakes will be good enough and we won't or ever really notice so I'm going to put this back to the default so that's cool now what else does our buddy material fracture do I mentioned before we have two layers here you're gonna add more layers to you have as many as we want but what they do is just like I said before the fracture ratio this will take a certain percentage of the lower levels pieces and fracture those so I could say for example don't fracture any of them and we have the same amount before but if I did this fracture half of them apparently by some random chance it didn't even end up fracturing any just move about 2.7 surely some of these so now we can see a few of them exploded and as I keep making this higher more might explode until we finally get I just want them all to explode so that's pretty cool now it's nice about this is if I were to do these the let's say visualize the name here and again if that's not there you can always click the I here and click name here to turn it on and off what's nice is if we get these t-intersections that wouldn't happen normally with regular with one level of fracturing if I turn this level back off again we just have well we have a little bit I guess technically because of our edge detail here but this is you really what the underlying proxy pieces are going to look like so we get these junctions a lot we get them they come two points but by turning on the second layer well your subdivided the pieces so you get these really harsh T intersections which I like so that's looking pretty cool and I'll turn the edge detail back on it has to refracture everything pretty much every time we make a change on here so sometimes it can be nice to turn off edge detail get the proxies meaning get the regular Voronoi to where we want and then turn edge detail on at the very end there you go so we've got our pieces now what else can we do here one other thing that's really nice about the RVD material fracture is this idea of chipping this is also introduced as the hole node was in Houdini 17 but enabled chipping is really great for adding in 18 anyway it was improved about a lot that it makes all these little pieces that tend to be around like corners and other sharp areas so if I were to bring this back close a little bit you can see you get pieces like right here where it's some other ones all meet so we get these nice little pieces here and there and they are great because you want like a variation of sizes on here let's first turn these both off for a second so we have big pieces and we have small pieces we have a nice variation of pieces and especially we want a bunch of small ones so that's pretty cool of course there are you can you can mess with the corner break off and and all that kind of stuff I'm just gonna keep at the defaults for now it's it's pretty much fun sweet now that we have our pieces we need to assemble them right we need to turn them into packed pieces so instead of using assemble though there's another thing here called RBD configure like a lot of these high level nodes it includes some of this stuff so it includes an assemble node amongst other things the other things are mostly properties that you can set up on the pieces themselves so like the assemble node from before you angry about weird like the assembly load from before we don't see the material anymore but it's in there it will be there when we render it later at least it will in mantra and depending on your renderer but so we middle click and hold we have one hundred twenty two pieces now it will transfer velocity and angular velocity up from the regular plug little geometry if it's there we're going to talk about those attributes and us in the next or the next subchapter we can set lots of different parameters like bounce and friction and things like that in fact let's just go talk about those right now so a lot of times whether it's with the RB d configure or whether you want to do it yourself via it actually be create as I'm doing it here a lot of times you want to modify very key attributes that are understood they're recognized by the RB d or by the packed rigid body solver you saw earlier on the object itself on the physical tab we set things like bounce and friction and mass but sometimes we need to customize that per piece we might want to have slight variations of friction or bounce or we just have very different materials that simply should just have their own frictions bounces masses and so on so let's go through some of the most common ones so I've got a pig head of one rigid pig out here and a one rigid thing here X cubed like thing and let's go through them so if I just press play it just Falls nothing special yet so first thing is V V is for Vendetta and V is also for velocity so if I press play now we created an attribute on the pack geometry that simply says go up one and go to the right 12 the right meaning the z-axis which happens to be the access to the right if you see that blue Z pointing to the right down there cool but these numbers correspond to meters per second I remember a second is 24 frames right now and other things can influence that from happening for example hitting something or drag in the air or other stuff but apps than anything else that's what it will try to do so that's V W is similar it's the angular velocity it's the spin so the V just moved the whole thing but the angular one will make it spin around itself so here I'm saying rotate ten around the x axis so you can see now it's kind of cartwheeling into it we pretty cool if they turn to the V off they don't need one or the other it was just cartwheel in place and looks like it'll get over there anyway there's a will there's a way so that's fun so we got V and W what else we got mass this is an important one I'm going to turn the mass on on our one on the right also because if one thing has an attribute they all have to have the attribute and it will initialize things to default values that they all don't already have it so here I am saying this thing the cube keep saying it's a cube I would call a domino the domino has a mass of a thousand we'll say it's kilograms and this only has a mass of one a rather it has a mass of 20,000 that's too much let's start with one boom nothing happens it's like throwing a pillow at an iron wall one is just much denser and has more mass we would not expect just because of their size that they should necessarily that this is necessarily win so bunk at 1 nothing happens at 10 bunk if you look really closely it kind of moved just a little bit oops if you put out 100 now it just got it over this is a very key way of expressing weight because I threw it pretty hard BAM and it just knocked it over so you can feel it that this has this is a heavier thing each is bouncing on the ground won't tell you much because the weight won't prevent it from bouncing but it being knocked over that very much it being moved by something else with speed that is that's different so once I get up to like a high number is it's just going to annihilate it it's that looks insane in fact it pushed it into the ground whoops so you know you know a lot of times people just have everything be the same mass and fine it'll literally work but it won't feel right this is a common complaint about CG in film is that it's like it feels weightless because people ignore properties like this then make a huge huge difference and we just saw the difference between two different ways this can get pushed over it the weight matters quite a bit if they both had the same mass I mean they might both have the same mass but I don't know it would depend all too often though it all has the same mass anyway you get it so no more mass turn that back off what else we got we got active active is pretty straightforward if activists set to zero that means it is inactive it doesn't mean that it's ignored by the sim it means that it's not moved it's not solved it's not evolved by the simulation it still is interacted with though so if this has a active zero and this has an active of one where's my active there we go bunk now it doesn't matter how high the mass is on this thing this thing is just never going to move it basically has mass of infinity but it's also not subject to forces and things so this is often used to anchor like a building to the ground where the bottom elements of it will be inactive but then still glued to the rest of the building for example it's also how animation works if you have animated rigid bodies that are not active yet they might just be inactive until they become active and then are allowed to interact with the rest of the sim or rather be moved by the sim so that's cool I'm gonna say turn the actives back off again by default they are just active you don't have to make active the one or for them to be active friction friction is one of those things where you don't know what you I have until it's gone so there you go actually let's let's let us actually turn this one let's have this have super inactivity so it doesn't move okay so now we're back to this and you should be active also okay so let's just take a one last look at what friction looks like when it's normal so it kind of got stuck here on the ground we could have no friction though it just slides away like it's ice because that's what ice is like it's frictionless same thing is is really important to express what the materials are is to get to friction right and then bounce if I have a very high bounce value as I do here boy there it goes ten quite a bit we can have it be a normal number we could even put it at zero you know so bounce though so that's a common issue is that people don't want to bounce at all and they put at zero and it still is moving well that's just one of the limitations of a rigid body sim usually things that you don't want to bounce at all are because you know the impact is being absorbed through the ground which is not actually a solid object it should it absorbs energy it's or technically a crazy soft body but a case bounce roughly corresponds to how bouncy it is though so don't usually if to change this too much but it would it'll depend so they go so those are some of the more common properties that you might say so here we are back in our scene and one of the last things I needed to do now that we've you know turn these into packed geometry we've got the constraints and all that jazz we just need to move it up and then simulate it now moving it up that was gonna be hard there's this all it had two transforms already and that was kind of enough to have that now we have three identify don't want to do three of these so fortunately there's a nice convenient thing here called our beady pack doesn't do that much it basically just takes these three inputs and turns it into one output in a way think of this as an asset it's as though this is a whole little set up where we have our proxy geometry with the constraints and the high res all pack together now as one thing now we can do something to it all at once and then RBD unpack it once we're done with it and it'll come back into being the three things that were used to so in our case I'm gonna grab this put it here and now you can see everything was moved and then unpacked pretty cool we can then from there jump right to our BD solver our BD bullet celebration say for the first time now in Houdini 18 the bullet solver has a soft meaning surface operator meaning geometry level representation we don't need to build it ourselves as we have here so there's a lot there's a bunch of inputs on here but as usual we only need the first three the other ones we'll talk about later they're not necessary so we just start with this go to ground add ground paint add ground plane I don't see it ah there it is press play and there you go it's beautiful and I was technically working we can see we know that there's multiple pieces in here and we can see the constraints still it's probably just too strong the defaults were back up here on the material fracture under the constraints tab we can knock off one of these zeros here and you can see the chipping actually gets a separate a separate thing I'm gonna say considering that this was 10,000 and the chipping clue strength it was half of that when I'd knock this down I'm gonna say copy parameter paste relative references here oopsies and then I want to I'll say times 0.5 so I'll just keep it keep them in sync with each other cool so now coming back down to this let's see what happens now there you go now it breaks and when both more importantly is it doesn't all break apart it's just largely broken you still have some big chunks up here cool so that definitely works so the RBD bullet solver has an insane amount inside of it if you double-click on it it brings you all the way down into the bottom into the dungeon here into the forces area this is where you would add like wind or other forces and things like that the force fields explosion fields we'll talk about that in the next lesson but for now I want to show you the dotnet itself we built our own version of this a minute ago it's all still the same thing here's the RBD object which was the container that stored the geometry here's the constraint network that had that would took that and then we had the glue constraint which is sitting here and then you know comes into the merge and comes out to here what else we've got the ground plane the ground plane has the merge with the collision relationship here's our gravity here's the bullet solver it's all here and it's also just a lot more stuff in this way we don't need to set up all of the stuff ourselves I mean I often like to set it up anyway because I don't want all this extra stuff and I know that I'm gonna need to do custom stuff anyway you'd have to unlock this node and it's just would be kind of messy but for many common things like this you don't need to do that so we might as well take advantage of this RBE bullet solver thing also if you're interested you look in the constraints subnet here you can see all the different constraints that are available glue soft hard pinned slider cone twist spring those are all all of our friends so that's pretty cool the other nice thing is if you are studio you know Houdini effects license is much more expensive and you need that license to do modifications here in the dynamics area so that's the same as over here when we were building this you need to be able to manipulate things in here and to do that you need to have an effects license or just a regular Indy or whatever but I think it's usually it's called the effects there's a cheaper license that a lot of studios get that does not allow you to do stuff in here but side effects has graciously allowed you to still do dynamics by having them abstracted here out to the top level so anyway it's just a little fun thing for you to know about cool so there it is that works and let's do one more thing and then I think we ready to render so the last thing I'm going to do is really take advantage of the fact that these are packed one of the great things about this system in Houdini is not just that it's in your Deenie and it's easy to manipulate things it's the packed idea that it is shared memory that is an instanced memory remember that whole crazy cube of all the different pig heads and how they didn't actually really take up any more memory than one of them well we get to take advantage of that so I have this so-called asset here of all these unique pieces in this pig head but what if I had many of these fracture Bowl pig heads well now I could have a crazy sim of tens of thousands of pieces but it doesn't actually take up much more memory than just one so we have an insane sim but they are still even the rigid the simulation pieces are still sharing memory so let me show you what I mean so right when we got to this point where we had our asset all packed up I'm gonna say let's copy let's duplicate he's a bunch of times so here's a box I'm gonna put some divisions on it and I'm going to use these divisions to copy these onto so there you go so so there you are looks amazing let's actually make this box a lot bigger so I'm just gonna say like you know something like that doesn't really matter let's see maybe it's too much I kinda wanna keep them a little bit closer to guy so something like that and we can move the whole thing up because it's still kind of intersecting the ground so I'm gonna move the whole thing up to like up here so that it can actually fall from a distance we can rotate them some crazy amount like that so there you will all fall and while we're at it let's orient them randomly so I'm gonna do a attribute randomize you know when we have when we just have these points it'll just put them on that point but if we give it a normal a random normal it will have it orient to that random normal so I'm gonna say give you a random normal inside of a sphere which is basically a fancy way of saying just give me a vector that points in a random direction and that's the direction that this pig head faces so then again we move it we move it up like so like there's too many of these I'm gonna do like that that's good you know even if it doesn't take up more memory having more pieces is still something that has to be solved they sell to collide with each other so it'll still take up processing power so just be aware of that looks like I lost my bar on the side cool so that's pretty red and we can unpack them all and we're back - we have 4300 things here now here's the rub though if I try to sim this it's not going to work in fact we can already see it not working what will happen eventually when it gets down there is that these pieces all a lot of have the same names so any let's say there's a given fracture piece in this pig head here it might be called fracture or piece 25 there's going to be a piece 25 in each one of these pig heads but the constraints if you recall the constraints are based off of the name of the pieces so that doesn't work they need to have new unique names so let's see what happens here it's like go and do the ground well that I can't even explain that but it's it's gonna be it's wrong either way so come back all we need to do is go to enforce unique name attribute per instance that's it so let me show you why that's all we need to do so if you don't have a geometry viewer I mean my Houdini crash before so I lost mine somes gonna make mine again so again set pain type few or rather inspectors jamish your spreadsheet so here's the names with this on with it off it loses that last number so looked at another way we have 36 points in this box that were instancing to so as you can kind of see there's a whole there's a lot of pieces with the same exact name in fact there's probably around 36 of them if I turn this on you'll see they all get a unique name now and not only that the constraints also do yeah yeah which is important because the constraints point to the original pieces so it's nice that we just have this very convenient thing right here to automatically update all their name something that we used to have to do ourselves and in fact we did almost the exact same thing in the original apply to Jeannie Richards one but now it's even easier so cool so it with even so with fewer top-level notes as you can see here then this side we've accomplished something much more complicated so let's see let's run this and see what we get I'm gonna go to here click and hold this go to flip book with new settings a flip book is like a play blast in Maya or whatever else it's just a preview animation of our viewport and as long as it looks fine if you want you might want to make your the size of it smaller or something to take a less memory just depends on what you need to do so it's good click start and we'll I'll let this run it'll probably take a minute or two and then we'll take a look at the result and there you go it only took a couple minutes actually maybe only took one minute yeah two minutes anyway so yeah so it worked everything worked great yeah looks cool smash smash smash I like the you know you get the big chunks you get the small chunks I like seeing this one come apart in the air that's pretty cool that's what I mean yeah rad so good enough I would point out a few little things like see these little pieces down here they move in a little funky it's probably because their collision their actual proxy geometry doesn't quite match up with them it's like a little off-center you might just want to delete pieces like that rather than worry too much about it you can delete them like right when they when the crash happens you wouldn't even notice them going away do it all the time yeah but any case looks pretty good so let's cache this out I'm gonna do a file cache on here there are technically more efficient ways of caching this out but this is the most straightforward way so we're just gonna do that it's a job slash sim slash smash cache dot cache dot smash jaunt version 0.3 member dot V geodesy bgallagh SC is the Houdini's file format so it's probably still in memory anyway so we click Save the disk gonna probably go by pretty fast it does in fact it did it so fast that it couldn't write to the disk that fast I love when that happens and there it is so now you click load from disk and we just read it from the disk and set it from the sim I'll put a null here after it it will point to this later when we do rendering in fact we're gonna do that right now so save it and I'll see you in rendering check so we're gonna render this now obviously this is Houdini 18 which means that Solaris is with us the aka the lighting operators that live over here in the stage area this uses the universal scene descriptor to lay out scenes in a different way than what is normally here in Houdini land it's super cool it's gonna be great for rendering lots of stuff at once lots of different assets karma is the renderer now over there it will I'm told be replacing man over time but that said not yet karma is new it's in beta at least as of the time of this lesson being recorded and there's really no reason to use it in this chapter in this lesson rather it's missing a lot of stuff right now it's not any faster than mantra in fact it seems to be a little bit slower it's going to get there it's gonna be GPU enabled so something like redshift maybe where it's taking advantage of that to render much faster but all this is saying we're not going to use it I mean for all I know you want to render this in redshift anyway I don't know so this lesson is not about lops as the point it's not about Solaris it's not about Karma this lesson is about the rigids and you can render them however you want now I am gonna show you though how to render it in mantra because mana is still pretty good and will do this job quite nicely so let's do that let's turn this off we never want to like we're actually know let's start with let's start with it I was gonna say we never want to render directly from the nodes that we do our work in because we might accidentally keep our display on something else like this and if I then if I rendered this note I'd just be rendering that so that's useless so let's make a geometry node and I like to even prefix these with R and D are and acting like I'm red makes them go faster if I do object merge I can go get that out node here and now this will always render the right thing because it is only a node that points to the right thing like so so that's cool so we got that we also want a ground plane actually what we really want is camera so before we would make our ground plane let's think about our where we'll be looking from so you figure by the time we get to the end of this sim it's about here so something like that and I want to make sure that it done of them start in frame they probably don't actually control click now you can see they're in the gray area there we've got control clicked on camera and there you go that's pretty cool we got a camera what else do we want we want a ground plane so make another like let's say working node so I'll call this ground plane make them green because that makes them work better to the grid down looks like we're already pretty well lined with the camera actually which is was not planned but normally I was just say put a transform node down after that rotate it so that it is aligned with the camera there we go and more importantly make it bigger so I'm gonna put this into smooth wire shaded I want to see those lines we needed to extend past the sides of the screen and pass the back of our sim because I want to grab in point selection mode s to grab the points press T to translate them up and turn the grid itself into a NURBS that way it curves up like this so now I look at the camera I have a background essentially great so much like this node connect let's just copy and paste this one we'll say render ground you can press like you can hold the Alt key down and yeah there you go so you can hold the Alt key down and click and drag to duplicate things - that's pretty fun anyway so the ground here will point to ground plane oh I never put an out note there I can hear some of you screaming that man I didn't hear you sorry there you go so copy that so you can always just copy a node and it'll it will copy the node but it'll also copy just the path to the no.2 so I can just control V that here so now the things we're seeing are the two render nodes cool save that what else we need to do we need to make a material and you can make a material here and you can rename it up here so I'm gonna say this one's called ground we'll figure out a color soon but let's just we just have it for now so I'll assign this here so there you go so this is a ground material this doesn't have a material here but the pig head has one internally and we created that other material that goes went on the inside of the faces so you'll see how those all come together in a minute before we finish go to sampling turn motion blur on or rather velocity blur on the pigs one grand plane does really need it and because we are using mantra at least in this example go to the out context here put a manor note in get there there it is the Metra notes going to use our camera it should have a frame range that is our scene we need to have a path here so do it in terms of job again which is the project that we set up earlier it's a job / render / cool frames version 0.3 member dot X are this time the XR is the kind of industry standard image format at this point so that's pretty cool and under rendering we want to do physically based rendering we don't allow motion blur and the objects should be not to turn off candidate objects turn on RDR star so that it's going to find the to render ones and render those only no matter what is on or off so even if these were off it'll still render those too great so that's about it and now let's actually light this in the next chapter so let's actually start rendering it and do that we can use the render view so click render and while we're waiting we can click this thing I can zoom out a little bit so we can see the whole image as we go we'll take little snapshots with this little camera down here so we can have a bunch of things we can compare and see our progress as we go so there you go not bad for a first shot so I'm just gonna turn that click that so we have a snapshot first thing we know we need is a light there are no lights in here yet it's just making a default light for us right now so make an environment light I'm gonna say clip to positive Y Hemisphere so it's like a dome light we don't care what's below ground right now it's white which is something but let's actually go to the gajini filesystem HDRI area choose the garage or whatever else I just like the garage because it has like a nice light coming just from the top so you can see we look looking better already right you can click and hold in an area if you want to focus the thing on it the the rendering power on it cool so click that that seems alright let us we don't see the actual material though from the pig head so that's an idiosyncrasy of mantra although I suspect it will affect most renders the material for the pig head is kind of locked inside of the pig head specifically if we go back to the pig head note here you'll see it's all the way inside of it down here in this subnetwork as opposed to the like general material area here where we have our ground and inside shaders so we need to do is go to the metro node go to the rendering tab then the render sub tab and go down to the bottom and change this to save all materials and shaders so we need to actually click this render button in order for that to to take effect most of the settings on the renders themselves the mansion or anyone in particular if you change the actual settings on here that affect the geometry and how it's saved out you'll have to do that so okay so we've got that yours may look different than mine depending on what the default settings came in on for the principled shader but basically we want to be white we want it to not be reflective we want to be very rough so it looks like this so it has a kind of a ceramic look I think it looks pretty good for this set seems alright it's kind of dark though the whole image is kind of dark the press I I can bring up the inspector and see the luminance values are pretty low depending on what I'm looking at anyway so I'm going to go back to our light make it twice bright so that's looking better I mean it's blown out in some spots but I think it's looking more interesting overall so I'm gonna click our snapshot again so we've come from here to here to here I'm gonna say the ground for one should be blue it should not be reflective so right now it has kind of like a plasticy metallic you look to it so I turn reflectivity down to zero here I'm gonna go to this I'm gonna say make it a little more sophisticated like periwinkle look something like that that seems fine the interior is too bright now I'm gonna bring it down like not you well that happens so you can see that the the background changed that can happen because you either accidentally had them both selected or in our case it's just wrong I'm gonna come back to this again you can see the background the base for the ground is still blue but it's not here you can sell that in two ways you can either just go to a previous frame it's something to do with the caching and there under and you can see it's right now I don't really know why that is or you can click the render here and actually redo it in any case it's largely fixed so we made the interior darker oh it's probably too dark now all right good enough and then the last thing we'll need to do is no it's actually pretty good it's a little bright that's okay though cool so what else we want to do here we want to make sure that their motion blur is working that's for sure snapshot so I'm gonna find like a frame where they're still falling and I want to see that the motion blur works I mean I imagine it is but let's just make sure that it is good so I'm going to come back to this the last thing we want to do is these renders pretty fat this bread is pretty fast there's not a lot of geometry in the scene this is pretty reasonable so we can spend some time we can spend some render power on the idea of Bounce lighting so right now there's no like reflective light coming back off the ground so especially in areas like this this is pretty dark but it really shouldn't be so I'm gonna say go to the mantra' node go to the where are you rendering limits and make the diffuse limit go up one in fact I'll go back here let me go to the frame that we were at so we can compare it easier the diffuse limit is the limit of how many bounces we can do we probably only need one bounce it's very expensive but again considering how fast this render is anyway we can afford it pretty easily so there we go whew summit one - now it's lighter over here so if I go back here you can see how much different it is you can see it happening everywhere in fact you can see blue splashing up onto the bottom it really helps integrate things into the same universe like so you can see it happening all over the place not so much happening on the top because they're not they're just facing the air there's no splash coming from too much else but a lot of these darker underbelly's here are looking much better so it's pretty much it I think maybe this is a little too bright so I'm gonna bring this down a little bit more so knowing that you have to do that any rate yeah now it's not quite so blown out but still pretty bright so good so we got there we didn't really do that much craziness here but this will look really nice to make our actual render I'm gonna render this now you might you know delete some little errant pieces if you want but I think it's probably fine we'll talk more in the following lessons about how to control little pieces that are moving too much or they're rolling too much or all kinds of little things like that but I think we covered a lot already in this first lesson so let's just keep it there and look how far we came in I render I always like to have at least one of these little progression things I just like the way they look cool very good so we'll stop it we'll go to our out area I'm gonna save it frame range remember it's all set and that's it just click render to disk and then we'll look at it and we'll be done all right all done and there it is pretty cool I'm glad we spent the extra time on getting the bounce lighting in the diffuse limit because these these only took a minute a frame on that computer here so certainly worth it we can see kind of what we said would happen or if you look at this piece here right on that frame in fact you can see how it goes below the surface of the ground because the high res is sticks out from the proxy geometry apparently the Voronoi edge was there we can't usually tell though you could always tweak that piece a little bit using I got transform chop or something if it really really mattered most of the time in film we don't have shots that are even this long or the cameras moving or who knows what else like I said earlier would be hiding it but we'll talk about strategies to deal with some of that stuff over here too we can see like the way this piece is moving it's because it's not really quite matching what the proxy piece looks like you know it's close but it's not quite the same that's always gonna be the trade-off between the high res and the proxy is that they don't quite match up but for the most part we can't really tell now especially in the smash-up area which is where most of the action is we can't really tell so it looks great though I hope you enjoyed learning about transformations and packed geometry and instancing verrano and boolean's shatters and RBD workflow and proxy pieces and constraints glue constraints setting up top networks doing all kinds of stuff probably other things that I didn't think of we covered quite a bit in this lesson and we even had a chance to render it so it looked kind of cool - yeah one little bonus thing before you go obviously this was a render and mantra but now that we have a light here our viewport can actually benefit from this light we can go to here or even here this is the high quality rendering mode in the viewport it's actually pretty fast I mean here that is without lights and it's pretty much the same speed because it has still actually you keep reading all this from the desk but the high quality mode here almost the same speed so that's pretty cool I went ahead and make it made a flip book of it too so if you're into that this is a flip book result pretty crazy what a day to be alive that it looks that good yeah and hopefully karma will be even faster once that gets going but in the meantime enjoy our manchuria renders while we still have them so I hope you enjoyed the lesson and yeah let me know if you have any questions contact that apply to Dina come I always respond to you take care
Info
Channel: Steven Knipping
Views: 27,479
Rating: 5 out of 5
Keywords:
Id: 1Dsld-W2zk0
Channel Id: undefined
Length: 106min 14sec (6374 seconds)
Published: Thu Dec 05 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.