Advanced VFX Simulations | Houdini Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
i'm assuming people um already have some experience of houdini um because we did the basic one last week so i'm gonna just literally talk about um dynamics and uh vfx and houdini because houdini is used for a couple of things it's used for sort of procedural modelling layout and procedural tools and stuff um and also for simulations which is what it's famous for and it can do lots and lots of different types of simulations so we're going to look at a simple sort of destruction and then we're going to add some smoke and dust bits to it so to do that i'm going to start at this top level here which we call the object level and i'm going to create a geometry object by hitting tab and typing geometry which will create a geometry object here so i'm going to double click that to dive inside so in here i'm just going to hit tab again and create a box so i'm going to go slow hopefully that you might be able to follow along but if not you can watch it and learn hopefully some tips remember to answer ask questions in the q a if you want to ask anything on me to clarify anything or you can type in the chat but i may miss it so i'm going to make a box and this is what i'm going to break break up so in houdini we've got some amazing tools called the material fracture tools and these will allow us to create simple shapes things like glass concrete and wood so most of the basic materials are used for um destruction but there are ways to create custom shapes as well if you want but we're going to stick with the basic ones have a quick run through of those so first i'm going to start with the box now the important thing about all simulations is you want to make sure that you're working at the correct scale the scene scale is important because physics is physics you know big things um appear to move smaller than small things because often they're far away and moving large distances you know think of an airplane traveling hundreds of miles an hour it looks like it's slow in the sky because it's big and far away you know if you were close to it it was past you and you know if it was small but close to you it would also look like it was going slower that kind of thing so well the point is physics is physics you know you need to build things to scale for it to work so houdini treats one unit as one meter so this is one meter by one meter by one meter so let's make this a bit bigger something like three meters by one point five meters by point one sort of ten centimeters so we've got a thin wall there maybe make that a bit thinner five centimeters thick or something there we go we've got um the proportion of our wall set up i also want it to sit on the floor or the grid i could translate it like i do in other softwares but i'd like to build um a bit of a procedural element in here what i mean by that is i like to make things um automatic so if you're building tools in this that's a great way of working we'll do a webinar one day on procedural modelling and approaches for that but i like to use this match size node it uses the about the objects but the input objects bounding box to move it around you can also use a reference object to move it around too so you can match other objects bounding boxes with another with another object so you can move them to the same position basically so here the justifies where you can do it we can say put it on the minimum or the bottom of the bounding box and you'll see it puts the pivot i mean if i hit enter you'll see the pivot is at the center here and then on the match size the pivot hasn't moved we've just put the pivot on the bottom so that effectively moves the object up like this so now it's sitting on the floor the advantage of this is i can change the size of the box and it always stays on the floor and if i actually plug in some test geometry like a pig head to the same node you'll see that also sits on the floor the original was under the floor so it doesn't matter what you plug in it's always going to set it to the origin for you it's also actually setting the x and the y to the center so even if i offset these let me offset my original pig you'll see the match size puts it back to the origin so this is awesome it means when you build tools people don't have to model it around the origin they can have it anywhere and then you reset it to the origin so you can do clever stuff with it anyway let's plug the box back in anyway um we've built some behavior in which is really cool it's a good idea to save these things so let me just um save this basically have a crash so um i'm going to hit tab and what we're going to do is actually look in these rbd tools the rbd stands for rigid body dynamics and uh there's a whole bunch of tools here these are basically high level digital assets excuse me that create create the geometry and can create the attributes and create the constraints the three things you need to do interesting simulations in houdini so these are what i mean by digital asset is it's like um a collection of a node network that's been flattened down and just gives you controls at certain certain points i mean if i look inside the match size you'll see it's made of other nodes these are sort of um just a network like the one we're making but they've been encapsulated in what we call digital asset which has just given us these controls for the features and this is what you make when you make tools later on so these are a high level tool which um saves you having to do all this stuff manually back in the day we had to do it manually so this makes life really easy and they're moving this way for people to get into houdini and be able to create some cool stuff a lot quicker without having to get very technical which is awesome especially for people getting into it because you can set up cool stuff and then you can kind of investigate what you've done and start to work out the attributes later obviously if you come on the course we teach you all about the attributes from day one so you can build these kind of tools yourself if you want to do extra custom stuff but the bit i want to use here is called rbd material fracture and it takes a second to load in because it's got quite a complicated behavior to it now actually if you go to the model menu here if you click on shatter this will actually break up your geometry using what's called voronoi noise and this is a very simple version of fracturing stuff this tool will encapsulate that plus that plus whole load of other features to give you realistic shapes when you break stuff so the idea is that we're going to break this up we're going to give relationships between the pieces to tell them how to stick back together again like glue and then we're going to use a simulation to make it fall apart naturally so what we can do is just simply plug our geometry into the left input here and turn this fracture on you'll see it takes a second as it processes and then it breaks up my wall well it creates these lines we can actually preview that using another one of those rbd tools we do rbt exploded view we plug in the three inputs what you'll see it separates it out and we can see what the pieces would look like well if that fell apart so we can see the shapes we're making so it's a great way to preview what you've done if this doesn't make too much sense so what we've done is we've actually got two levels of fracture it's doing the big shapes and then fracturing those again into these small ones i only want one level so i'm going to click minus so we have one level now and you'll see we just get these big shapes on there so the thing about this tool if we go up to the top we have presets we can crack this like concrete if we choose glass we'll get glass like patterns you can control the number of points etc and if we choose wood you get wood light patterns now what's interesting about the wood this is not what the wood looks like if i just go to cluster and turn on the visualizer it'll actually break up into these shapes but if i turn on the exploded view you'll see that's what we'll get with the wood so you can create some very interesting fractures let's go back to the concrete for now doesn't much look like concrete so what we can do we can make this look a bit better so what i like to do is um i like to first of all go to one of my fractures and increase the number of points it's breaking basically what it's doing is putting a point here and then it's drawing straight lines around it and then it creates this cellular pattern from the points so the center of each of these cells is where a point is and you can see we have very few points here and we'd have a lot of points around here they're not distributed that evenly across the surface and that's because down here we've applied a noise which is black and white so where the air is white we're getting more points and where it's darker we're getting less points and you get this non-uniform distribution if you make the noise a high frequency then you'll get a much more even distribution of your fracture if you bring it down then you'll get a less even distribution now the thing about natural fractures is they're not very even you tend to find you get a few big pieces you get quite a lot more smaller pieces and you get even more tinier pieces and then you get a huge amount of microscopic pieces so the smaller scale you get the more you get so you want to kind of reflect that kind of distribution so this kind of looks cool i've got some big pieces i've got a few more smaller and a few more smaller again so this might be a good starting point i might increase the scatter points just to make that more complicated let's maybe try something even higher so we've got some very distinct areas where it's going to break up so again we can check out what our noise pattern would look like so we can make those areas bigger or we can try and make them smaller maybe something like that might look a bit more interesting and that we can offset the noise so i can put more of the uh broken bits in the middle if i want let's try minus so let's try minus two or something there we go so i'm getting many more here in the center which is what i'm going to break up so maybe something like this would be interesting let's just bring that down a bit there we go oh want negative numbers there we go let's maybe put three by three by three so the other thing we can do here um is let's just bring that yeah let's put that there is to break up these shapes this doesn't look very natural as the shape goes so what we can do is we can click on detail and add edge detail and if you watch these straight edges here this will take a second because we've got a lot of pieces i might reduce the number of pieces for speed actually there we go can you see they get a little bit wobbly it looks a little bit more natural let me reduce the number of pieces let's maybe go for 200 for now let's see it takes a second while it will but there you go you can see the wobbly edges so in the detail here if i increase the size the height that'll make them more wobbly there we go so that's looking much more like the concrete i'm after there's something else we can do to make this even more natural and break up the distribution of these pieces even further by adding chipping if i click on chipping look at the corners now you'll see the corners will break off and we'll get lots of tiny little chips everywhere there we go can you see we got these little um on the corners there if i increase the um corner ratio they'll go in deeper and if i do the chipping ratio we'll get more more of the corners chipping so i'm just going to increase that a bit so we get a lot more finer pieces so when these break apart we'll see small pieces coming out from the big cracks and that looks a lot more natural to kind of how a concrete will in my mind obviously you're going to use a reference can break up so this tool's got some very very good controls for concrete um so what i'm gonna do actually is um yeah let's turn on the uh fracture namespace and let's call this wall break so what this will do it'll just give it a name that we can use later on when we try and control control stuff so what i want to do now is it's actually if we have a look at this exploded view you'll see we've got these big pieces and you'll notice this white line around them the white line actually is what we call a proxy and that's out this third input the white the white line object is what the simulator is actually going to simulate because it can't handle these complicated shapes that's how it's able to simulate hundreds of pieces now in this visualize uh where is it in the um [Music] there you go bullet sim geo let's turn that on see the blue one is actually what the bullet is going to see and you'll see it does an approximation of the best it can of some of the shapes if we turn on uh show constraints you'll see that they're all connected together from the center so this is um our look we can do the uniform scale actually to bring that back but they're all connected with these these lines and that's what comes out this pink one if i create a null i can show you that actually so out this first input we get the high-res geometry with the wiggly edges at this last input we get the straight one which is the bullet the proxy for bullet and out the middle one we get the network that joins them together if i template this you'll see it's from the centers so this is our constraints we call it and this can build behaviors between the individual pieces like they can snap like glue or they can pretend that they're still connected with like a rubbery glue and stretch a bit so we'll look at how we can control these constraints in a moment so what i want to do is create a constraint property node so rbd constraint property because i want to be able to change the properties of these constraints so let me plug this in and this just adds attributes to those white lines let me plug that in you'll see there's no change we can do things like change color so you can see we're affecting that and we can change values here so at the moment it's defined as glue and it's got a strong strength we'll come back to this in a minute so now that we've broken it up and we've configured the constraints what we want to do now is actually give it the physical properties for the simulator so tell it how much the density is and how much bounce there should be in friction and stuff so it has the physical properties we need so for that we use an rbd configure node so we configure its properties again let me plug this in as an extra input we'll talk about that in a moment so this now if i look at the attributes um let's plug that one in you'll see we've got bounce and density and we have these attributes that the next node we're going to use will um we'll be able to use you'll notice that we don't see the breaks anymore if we're going to wireframe they're still there that's because we've changed the geometry type for efficiency so we've set up all the physical properties and assault we're going to use what's called a solver now and what a solver does it takes all those physical properties and it does the physics expressions and calculations and works out how these pieces should move frame by frame and then we get our simulation that's basically the gist of it um can you create a fracture pattern off a image um yes you can on this node you'll notice there's an output here where you can add extra points or cutter geometry so you can add in your own if you created the geometry in the pattern that you wanted from an image there is a trace stop which will bring in a black and white image and create some geometry you could extrude that and use that as a cutter and then it would cut the shapes that you wanted so you can do that with this node um actually what if i can just demonstrate it with a grid actually just uh let's just pop the grid up here for now so let's put the grid there let's um disable that fracture let's turn this on so yeah oh there's my grid so i need to add a fracture here and then [Music] on the input points turn off the scatter hello there we go want to do that what's going on here just wait about to reevaluate so yeah you should be able to put you can plug in your own points here um i'm not actually done it with geometry but i've done it with points but we are using a geometry grid there that's not really fracturing it very nicely i'm going to turn that one off yeah i want some impact points cutter geometry oh yeah we've got to set this to custom that's why input cutting geometry there we go so let's set that to zero so that there you can see my grid here now it's cutting it see the line in the middle there if i rotate the grid you can see that's slicing it in two if we look at the fracture you'll see it's doing it and then what you can do is you can add a trace stop the traceup takes an image a black and white image and creates geometry for it so you could you know great black and white image of it create the geometry and then use that and then use this in the custom mode here to then um fracture up your geometry how you wanted no um i've broken this now enable fracture there we go hopefully that answers your question there um darren no problem there's lots of features to this node so you can really customize um what you need to do there cool so we've got our constraints uh defined we've got our configured our geometry configured there we go so let's add our solver rbd solver plug this in this will do the physics for us so basically all we have to do let me turn the clock on so it runs as close to real time as it can so i press play physics kicks in and it drops because there's no flaw there so we can go to ground and turn on ground plane so again this is a digital asset of a proper complete dot network here saves you having to set it all up which is really handy and it has lots and lots of features here so people say um some people are snobby about it and saying this is for people that don't know who do you need i don't care know have you suddenly for years i think these are great to do 90 of the work you need to you can just get on and have fun and create cool stuff rather than worrying about setting up these complex networks all the time so i really like this kind of approach now i'm going to click this little icon here to maximize this window and tap p to get a floating parameter pane because now my network's getting a bit bigger this will be easier to manage stuff so we've got our ground in there and that's just sitting there let's create an object that we're going to whack this with so i'm going to create a couple of attributes first i'm going to create a name attribute here which will help houdini partition things um that's going to have to run through the fracture and let's call this wall and i'm also going to make a group node which i'm also going to name wall just so i've got a name attribute so i can get access to this geometry later and a group node so i can get access to this geometry later so what i'm going to do is i'm going to make a sphere to chuck in it chuck at it so there we go there's our sphere let's make this 25 centimeters big see it doesn't always update until you hit enter let's move that to about here let's make it a polygon with lots of um um resolution there we go something like that so let's also uh create a name and a group node here so we know what this is let's call this ball it was a good idea to make um these kind of these couple of attributes because then you can do stuff later and this time i'm going to do an rbd configure i'm going to do it separately and we're going to this time come down here instead of being concrete let's set this to metal and choose the preset that says steel so we can give it the physical properties of metal and still on this configure here which is my box it's concrete let's set this actually to concrete so there we go we've got different materials now how do we join these together well we could use a merge node and we've got all these branches so what we do in houdini we use an rbd pack node it's got nothing to do with pack primitives it just flattens them into one branch so you can merge them easily so you can make multiple branches of lots of different objects like this you merge them all together and then you do an rbd unpack so it just basically merges all the data streams for you and then this is what you can plug into your solver now now we've combined our ball into our sim and then i can merge in other streams like this with a configure node and a pack at the bottom easily just join them all together so if i press play now not very impressive let's add some velocity well we can simply add it to the geometry so what we can do is just create a point velocity node let's just pop that here and we can give it a velocity in a direction of if i look at my little axis down here i can see the negative zed is this way so let's put negative 10 in in the z so that would push it this way we can actually uh press play and see that go there we go oh it knocks the wall off the floor because the walls are not attached to the floor so let's fix that so these are the kind of issues you typically get so um in a simulation we can mark objects as active or passive the ground is passive meaning it will collide with stuff but it can't ever move whereas this guy is active which means it can collide with stuff but then it can get affected by it what i want to do is turn the bot a few bottom pieces down here into passive objects they'll never ever move it's like they're permanently glued to the floor but then the rest of the stuff will be glued to them so it can snap off at that point but it will give it something for the ball to fight against when it hits it and again we can do this with the configure node let's turn on the configure node and uh in here at the top we can turn on the active as a visualization now we're not seeing anything because we need to turn on the attribute here now it's created an active attribute which shows up as green if we set that to zero which is off then the whole thing's passive so i'll show you what happens if it's off if it's passive if i press go down here and press play you'll see it just bounces off the wall will never ever move so in here if i set the attribute to one so it's all active then that's what we started with so what i want to do is make some of these points here passive the ones at the bottom and i can do it with this little toggle here it says use bounds so what what are the bounds well let's make a bound node what this does it makes a bounding box around your object i'm going to plug in this last output and you'll see it just makes a box that's not broken that fits around my wall i can bring up the lower padding so it comes up from the bottom here now if i plug this into this last input this is for the bounds let's turn this back on and i turn on use bounds you'll see now these guys are now passive they're not connect they're they're no they're never going to simulate so if i hit it hard enough it'll snap in this like this across the bottom okay so let's see the effect of that let's go back to the solver now if we hit play you'll see it bounces off the wall but um the reason is our glue is too strong let's go and reduce the glue and see the effect of this we go to the constraint properties here this is the glue for the wall because it's in the wall branch so let's bring the glue strength down now you'll see my ball is able to smash a bit of a hole through the pieces now there's a slight issue what i like to do is go to the solver advanced and then open up this dot network and i like to increase the sub steps to two this means we're going to solve sub frame and it just makes it that bit more accurate if i press play now you'll see it actually pushes all the way through which is what it should have done so we get a slightly more accurate result with an extra sub step there so i always work like this there we go so now we've got it properly punching its way through and you'll see we've got an interesting different range of scale of pieces which makes it feel more realistic but big ones small ones and really fine ones now there's a thing i don't like this is this break here it just kind of explodes outwards like this now in real concrete um you've got you know it's held together so you get a sense of it stretches first before it breaks there's what we call ductility and you get a different kind of stretchiness with all materials that's what tells you it's a different material when it breaks like this this is incredibly brittle so this would suggest porcelain or something because porcelain doesn't really stretch it just breaks a brittle material but most other materials and concrete as well is a bit ductile so we should see a bit more of a stretch shape here so we can affect that with the constraints and this is how you want to make it feel more realistic you know things like the different shapes and sizes and also how it breaks and the constraints so on this constraint here we can do a couple of things the first thing you'll notice it punches a hole that's pretty much the size of the ball the first thing we can do is increase this propagation iterations here this means it's going to punch a bigger hole see it effects much more further around it it suggests the wall is much more brittle you can see the force propagates up the glue there i put it back to one you'll see the hole is much more local to the ball so um i quite like the tent actually you know it's hitting with such force it's gonna tear the wall apart but again we're not getting the sense of that ductility or stretching you know it sort of just punches through and then this stuff falls down here this should kind of be pulled with the force of it so let's do that with the constraints now so on the constraint properties what we can do is if we have a look you'll see the glues represented by these yellow we can see the constraints as soon as it goes the constraints disappear it's either there or it isn't and that's what allows the pieces just to fall what i'm going to do is i'm going to switch the constraint when it breaks into another constraint and that's very easy to do in this node here we can turn this button on and it's going to switch it to what's called a soft constraint let's see what that does let me go back to why shaded mode if i step forwards you'll see it acts like a spring and then it snaps everything back so unlike glue this doesn't disappear it behaves like springs but the bit i'm after is the initial bang here can you see how now we're getting this kind of stretchiness you know you can see the bulge of the ball and the pieces start to pull the pieces around them with the force that's what we're trying to achieve so it really suggests there's force within the wall you know lots of materials do this in a different way and this is the kind of level of detail if you want to work in movies that you've got to think about really let's make that a bit stiffer so it doesn't stretch so much let's try 100. that's kind of good because i wanted just a little bit of the ductility the other thing you'll notice it looks a bit weird the shape because they're all constrained from their centers from the center of mass which is not great they should be constrained from the edges of where they're actually joined so i'm just going to fix that so again we can do that with an rbd convert constraints where is it um convert constraints there it is so i'm going to do that before the properties here because i want to convert them before i change the properties and instead of using central mass i'm going to do surface points so now the constraints are at the edges instead of at the center so let's step forwards a few frames and now you can see that initial bang it looks better you know we can see they're more radial they don't look they're all coming out at the same angle before now they're looking a bit more radial that might be better if i just make the glue a bit weaker so we can see that a bit stronger a bit more obviously oh that didn't re-evaluate let me do that properly so another frame there we go you can see they're all now twisted with the angle correctly that they've been impacted with you get this really nice fracture there the problem is we want it to give up we want it to break when the ball hits it you know we want to get this shape and then have it break so we can do that in this solver node so in the solver node we can go to constraints and then we can use breaking thresholds and you'll see here it's set up to break soft if you look that's the name in the properties here it looks soft it's the same name so it's going to break that so what we can do here is it's going to delete that constraint when we hit a condition here basically if it's going to stretch more than one unit which is one meter that's a very big distance so it's never going to break if i put the distance to say one centimeter and i step forwards those constraints stretch one centimeter and then they'll break and look this is the different effect we get we see some of them break because some of them stretched far enough but some of them didn't so we've got these nice effect where we've got the cracking but it hasn't actually fallen apart yet which you do see in concrete and if it hits the ground hard enough and stretches far enough then it will break up when it hits the ground which it didn't in that case so there's a much more different effect like that it's kind of nice we can also use torque which is twisting motion so let's put a talk value in see what values we have so again look torque is a twisting motion so some of them twist they don't break twist enough to break up and look it gives us a different idea like reinforced concrete where you've got like rebar inside it so maybe let's bring the the talk down so it breaks a little easier there you go so that fractures a bit more in a different way and you can use combinations of these things but the important thing is that initial bang looks really natural we've got big species small pieces and you can see it's stretching out the horses up around the wall there that's the kind of trick to making really nice looking natural looking simulations so should we live with that one yeah let's live with that one you could massage you can use combinations of these as well look you've got force and impact as well as distance you can delete it at a frame or have this kick in from a particular frame so it can ignore these things and you can do all sorts of combinations there which is kind of nice you can animate the values and stuff so yeah that's kind of cool looking or did i like the distance one let's look at the distance one again and you can do it with angle as well so we get a very different effect with the distance there at one centimeter these ones around the edges didn't stretch as much so if we make the constraint more stretchy so if i bring this down it's going to allow it to stretch more so that more of them are going to hit that distance so everything works together that's why you've got to do lots of tests let's press play and see if um the difference in that so it was more stretchy so that they broke more easily and it didn't propagate as far so now we've punched a hole we've left a crack actually i quite like that one gosh let's preserve some of its integrity we've broken through excellent let me save that so let's go um let's do this over 30 frames maybe 40 frames so the next thing you want to do when you've done this is you want to do an rbd i o which will let you cache this to disk so if you're going to render it or use a render farm plus um you know you're saving it if you're caching it to disk you can use this node and it's got a couple of features here if you're using a lot of geometry then packed geometry is a not a good way to go because you're going to create a huge file on disk a really efficient way to use this is to use geometry and points this is more advanced version so what this will do it'll pack up your primitives you'll get very very few of them um well you'll get very few uh the disk files the files on disk will be very very small which will make the rendering a lot quicker so i'm going to save to disk this single file and then i'm just going to do save to disk for the whole sequence um why is that give me an error so we've got the sim there oh i got to plug the last input for the points there we go we didn't plug the point since the safety disk save to disk we'll just cache that out and then we can turn on load from disk and you'll see it looks like the proper simulation but the way to use this is to actually use the simulation points so um what we often use is a no call transform pieces so with the transform pieces we can take our original high-res geometry and we can use the points so let me show you what the points are so out of here actually we do get sort of um a high-res version we get our constraints which we didn't save we got a proxy version which we didn't save and out of here we've got these points that represent the um simulation and these are very fast to read on and off disk and what we can do is transform the original geometry as well and it wants a static version of this on the first frame so what we do is we use a time shift node here and we just delete the expression so it's only ever going to show frame one now so look that doesn't change we plug that into this uh input that says rest points and then we plug the template points are the ones that move now if we look here again it looks exactly the same we're actually using the geometry from before the sim and this is much more efficient for rendering and playback and other stuff in houdini let me add a null so this is the output for it oh one thing we didn't do actually was add some uvs let's add some uv see this is quite nice and procedural so that we can just do a uv unwrap that's a good point you might want to add a texture to the wall and we can view that with a uv quick shade this will just preview the uvs on there so look we've got a nice mapping and with space five you can see uv space here and you can see they're laid out for our box so again i'm gonna have to write out the cache again so here i can just simply write out both bits it's gotta it's recalculating the fracture so now i can save the sequence take a little longer because it didn't calculate the first 30 frames like before if you make any changes upstream of the cache you've got to obviously rewrite the cache out to see the changes below well i didn't need to in this case actually because i'm reading the geometry from here so i didn't really need to read out the cache again actually but then if we go back down here now um let's put our quick another quick shade here just to preview that oh we might need to you know why is those attributes not coming through oh because it's packed yeah let's just unpack it so we can see them there you go so if we unpack it we can see we've got the uvs on our object there but it's best to leave it as packed because this is much more efficient you'll see the whole thing's represented by 700 points there's obviously a lot more than 700 points here but if i do the point display you'll see it's each point representing each chunk there that's actually what we're going to be moving around cool so what i want to do let's call this wall what's time we got uh got a few minutes let's try and add a debris pass quickly why is that doing my fracture again we don't need that to do a fracture anyway cool so if i drag my slider we can see that moving so i'm going to make another node here for some debris and i'm going to use an object merge node to bring in the geometry we just simulated let's turn that off for a sec so this will bring in our wall and there's our out node so here's our animated geometry so here i'm going to use a uh what's called a debris source node to source the debris and this is going to show us the points so we want to simulate there now we only want to see them when they're moving so what i'm going to do is just add a a wrangle a point wrangle this workflow will get simpler one day so we'll say effort length uh f at speed rather equals the length of the velocity so i'm finding out the length of velocity which is basically the speed and i'm going to say if um if if the speed is um less than a certain amount we'll put a slider in for that like this and then what we'll do is um if it's smaller than that we're going to remove the point the right expression in there we go if we click this magic button we get our slider so if the speed is less than uh something really small then it's going to delete them there so as soon as they start moving they appear so we can make that bit bigger something like this we only see them like that there we go that looks a bit better and you'll see they're living for a certain time here i only want them to live for one frame so i want to divide this by 24 which is my frames a second so you'll see they just appear for one frame oh um let's maybe make the speed a bit bigger so we see some more maybe we'll make them last for a bit longer so let's make them last for two frames maybe more six six of a frame so we get that initial bang and then we get some falling out there after it's cool so um yep that's giving us a bunch of points there so what i want to do is uh one last little i don't think i can do that in on here let me just check something yeah let's see if this works on this version so we've got some debris here which we can instance geometry to and then that into our simulation if we look we'll see the points get birthed there but we can use a particle simulation or something what i'm actually going to do is i'm actually going to i've got my wall here and what i'm going to do is i'm going to pack it back up into primitives let's create packed geometry i'm going to add another wrangle i'm just going to see if i can set this up quickly this is kind of a cool trick so i'm going to say the position equals the point position so this is the position of each point which resets them all to the origin there so um oh yeah we've got the ball there haven't we let's delete the ball so we made those groups before so that i can easily remove the ball now i actually want to remove the ball from this branch too we've got those points that's good so that's removed the ball so we've got all these chunks at the center here and i'm just going to do an unpack on them and then what i'm going to do is i'm going to do a copy to points now on this side here's a little trick now i'm going to copy these to the points that we're creating now when i do this first thing i want to do actually is just do an rbd configure because i want to create them into rigid body objects so let's create an rbd configure hopefully this will work so we they've basically got the properties of concrete i'm going to take those packed objects here what's that one i want yep and then on this side i want to create some attributes so the first one i'm going to do is create um a an attribute um we've got an attribute adjust integer yep and actually adjust integer so this one's going to be called a variant attribute so this is going to give me some random numbers so let's create some random numbers between norton 9 let me just show you what that does so on let's go to where we've got some points there we go so it gives me an attribute here called variant where each point has a random number between one and nine now over this side what i'm going to do is create what's called an enumerate and this will create another attribute here let's call that the same name variant because zoudini's going to match these up in a minute if we look at this one you'll see it's actually created an attribute called variant on the points let's set that to points there we go which just goes in sequence zero one two three and i see i've got 721 points so in here i need to put 720 because we start from zero uh zero actually what number's like no 721 i want to go to yeah seven two one there we go which is actually one less than the number of points we can actually use an expression to link that so end points let's go back to the enumerate node there we go it's returning um end points there we go it's returning our seven two two so let's take off one that's not giving us an error shouldn't do there we go anyway so here on the points we've got a random number picking of the number that we've got here now on this copy node um what we can do is um on the copy node we can say use this attribute called variant to make those copies and you'll see it's copied now one chunk to each of those points but a random chunk which is the kind of trick we want we also want to do an attribute randomize to randomize the scale of these i can actually randomize if we call this um p scale again the copy will use that and we're getting random numbers between naught and one here um a good thing to use is like the exponential one and that means you'll get some big pieces and small pieces giving us this kind of scales that we wanted before let's make this really quite small and you'll see we've randomized up the chunks this is going to become the basis of our debris so here i'm going to do a connectivity node now and i'm going to give this a new string attribute called name sorry name and we'll call this debris this is our debris chunks so they've got a unique name attribute there why are they all um oh yeah because we're on the copy to point so that's fine cool so what i'm going to do here is i'm going to bring in another bullet solver if this works let's turn on the ground and i'm going to turn on emit rigid body so it's going to emit them from those points so if we press play you'll see we're now emitting these into the scene it's a little slow because we've got a lot of points coming in there we go let's just stop that a sec you'll see we're actually emitting those into the scene and they'll bounce around let's go up to our debris source let's have a an order less of them there you go we get some debris being emitted in there let's have some more there you go so we got this nice effect you know lots of big pieces small pieces coming out of our sim there so if i come up here to my wall we can see those pieces being added in to the effect there they're just being emitted so you can't really tell they're not coming from there they just add more detail and this is the trick to making good shots you want to add a lot more elements of this and again we can use the debris source to emit some pyro but i've really got time to demonstrate that now last thing i want to do just before we take some q a is to um add some lights and render this um let's go back to debris let's just maybe put in some more points to make that look a bit better there we go and again we can do our rbdio write this out to disk so for rendering so um [Music] yeah let's just save this to disk see how slow that is lower to process it so yeah you'll see the files aren't too big there we go so we load that in now we have that all simulated too so if we come up here we can see we've got oh why is that not playing back it's oh no because it overwrote this one let me save this one out to disk again oh that's a bit annoying yeah because they both got the same name over one overwrote the other i believe make sure it working again so someone's asking what would you recommend if you want to have the same impact render in slow motion what language is that code that code is vex houdini's internal language which again we'll teach you how to use effects is really really awesome there we go um hopefully that's answered your cast question alexandra alejandra so darren what would you recommend if you want to have the same impact in slow motion well you can actually do that easily you can use a re-time so let me plug the re-time here let me do it on the points in the read time here we can uh half the speed so i press play now supposing speed let's do point one maybe that's not doing it on the points let's do it on the geometry afterwards oh yeah because that's the rest one these are the points that are moving there we go so let's do half the speed yeah this in this is the rest one after the time shift this is the one that's moving there you go see it's slowed down so if i do point one there's some artifacts because it's interpolating the point positions let's turn that off there we go so that's it in slo-mo would you think so let's extend the frames to 80. that looks pretty cool right so let's try the re-time on our debris same one i copied and pasted it so it's in slow mo too finally gives the game away doesn't it the debris because it does pop on maybe you don't want to see it in slow-mo let's turn it off let's turn it off maybe that was a tenth of the speed so that's a little bit slow we'll go back to real time that was back at 40 frames hopefully that answered your question there darren oh i'm pleased you liking the webinar yeah we do this quite often so yeah keep your eyes out for them so um the last bit i just want to show is a quick bit of rendering let me just save that so the nice thing about houdini is you can just pick a view control click the camera and it drops into your view you must remember to lock the camera so you can still navigate let's go i don't want to be close to an exploding wall so again i'm going to use a long lens and again if you come to escape we explain all about the cinematography because it's important you know especially if you're going to be working in movies so you go a long lens means we're far away and safe distance so i'm going to add an environment light and this is uh allow me to use the technique called image based lighting or ibl and for that we need an hdr so houdini comes with some hdrs if you click on this little thing when you do a file browser hfs is where houdini is installed and these are the ones it comes with so let's choose this one you see in the in the background there let me go to the rotation here just rotate it around so we can change the lighting a bit in fact it's hard to tell which way we're facing let's look up there and i want to see the sun appear so i know it's behind me there we go something like that look through the camera again let's add a ground plane that would help as well so let's add a grid make that big excellent so we've got um our camera set up our light our image based lighting and our wall let's um add a material so um since we added a texture we've got uvs on there we could add um let's add let's make it marble marble on there we'll put clay on the floor and uh where's our ball um our ball will be made of marble actually in this case but there you go let's pick a nice brain stuff coming in so we need to create a mantra node so let's do a mantra node here everything in the houdini is a node let's do this half rest so it's quicker and then let me just set up these displays let me save again and again let's turn on motion blur i need to do two samples to see the motion blur again we explain all the settings who shows asking do you have any youtube channels other websites where you post videos regularly um i do on our own website so if you look around escape's website you'll find a lot and youtube channels and vimeo channels you'll find lots of my videos and if you go to side effects zone website um i publish a few videos for them too so keep an eye out there i just did one last week actually on simulations and flip do a massive smashing wave against the lighthouse so have a look on the side effects website and escapes website you will find plenty more tutorials for me from me and lots of others from other people too i don't know if you'd like listening to my voice obviously you can come along of course and i'll teach you that personally so even better there we go we can see that smashing through with some emotion blur there so we'll just jump through a few frames you can see the ipr working updating and giving us a rather nice render with the motion blur the motion blur is quite strong so we can adjust that in the camera where are we it's the in the uh sampling here it's the shutter time if i make a smaller shutter time then we'll see smaller motion blur it's less blurry if i make it bigger you'll see these chunks here will blow more because they're moving quicker you see we've got the blur on the ball and the blow on the debris and the blur on the rest of it oh so what i might do is actually do it see if we can get away with a little time shift a little retime so let's maybe put this maybe points three quarters slower what i'm going to do is just copy this parameter with a right click copy parameter and i can actually link that to this one in here let's turn this one on because i want them to be the same speed if i do paste relative reference it puts in a little expression here and you'll see it returns to the same number so i don't need to now set them both i can set one and the other one will update with the same speed so now if we um let me turn the lighting off so it's easier to see so here i can um split book it right click here flipbook let me just turn off the resolution there so this will now give me a um a flip book so i can get a real sense of the timing before i render because the render is going to take a while to go so let's um there we go so we get a sense of the timing there oh the lighting's gone funny maybe i shouldn't have turned that off that's better lighting let's do that again because we've cached it all out it's very quick to play back but hopefully this has given you an idea and sort of the level of detail that we teach at escape and um you know the care that we think about the effects and the look of stuff you know and the sort of the technical stuff i mean obviously that debris needs a lot more work than just a quick work of this
Info
Channel: Escape Studios
Views: 617
Rating: undefined out of 5
Keywords: Escape Studios, Escape, studios, VFX, Visual Effects, CGI, Maya, Autodesk, Nuke, Foundry, I want to learn, tutorial, modelling, rendering, dynamics, texturing, animation, renderman, compositing, ncloth, motion graphics, design
Id: joOLqxu20QU
Channel Id: undefined
Length: 55min 4sec (3304 seconds)
Published: Wed Dec 15 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.