Houdini Isn't Scary: Part 3 - Dynamics

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back to we D isn't scary part 3 dynamics so in this part we're doing something completely new we're going into dynamics now dynamics are used to create simulations and simulations are approximations of real-life systems what that means is we can create things like water and fire and smoke and snow you know destructive forces and all of these different things that are organic and you cannot keyframe and animate but a rather generated through dynamics and as you can guess from the word dynamic it's the opposite of static so it's things that evolve over time so let's not waste any more time let's get straight into it where we left off last we have our doughnuts with its icing and its sprinkles and if you didn't save this file don't worry there is a link down below to download the one that I've created for you everything is named I've also added some notes you can go read those all of these have been renamed so you know exactly what they do but if you have your own file you can also continue with that and that's perfectly fine so what we're going to be doing now is creating dynamics so to start on our first dynamics Network we can go ahead and drop down a geometry node we can rename this one to a dynamic sprinkles just by double-clicking on the name and then we can dive inside by double-clicking on the note so once we inside as expected we can see our coasted donut and if you can't remember to switch on ghost other objects in the top right in here we're going to drop down a grid so press tab and type grid and we can drop down a grid in our dynamic sprinkles node and remember from part one you can just move around by holding space so we're going to scale this down to a two by two good so we can see it there and then we're going to drop a transform node because we want to move this up let's just move it up to about four and that should be fine and what this grid is going to do is it's going to emit points we're going to have points that fall from this grid and they land on our donut we're then going to copy to use to those points to make sprinkles so we're dynamically creating some sprinkles that are going to be thrown over the donut now the next thing that we want to do is we want to animate this grid because as time passes we wanted to move from the left hand side of the donut to the right hand side of the donut so to do that what we're going to do is firstly move our grid over to the left so we can set this to minus three then what we're going to do is we are going to hold alt and click on this word that says translate what that'll do is it'll make all of these green and what that means is that we have a keyframe on the current frame so this current frame is key framed now if we go and move along our timeline we can go to the bottom and just click on this one where it looks like a flag and drag it across we can drag it all the way over to about 230 we're going to frame 230 and then what we're going to do is move back up to our grid and move it over to 3 so you can just type 3 and now you'll notice that it's no longer green it's showing yellow blue and blue yellow means that something has changed that has not been keyframed blue means it has remained the same so there's no problem there so what we need to do is hold alt again and then click on translate and we'll add new keyframes so now if we go back to the beginning you'll notice that as we play this back our grid will move from the left to the right you can see it gradually move over perfect and if yours is playing back too fast then you'll just need to check the real time toggle so click on real time toggle to activate it because of its deactivated Houdini we'll just play this back as quickly as it can when this is activated it'll play it back at 24 frames per second great so we have our grid that moves but now we need to turn this into an emitter we need to emit points from it so what we need to do is we need to create particles and you create particles inside of a dynamics Network now particles are also referred to as pops and pops 2 stands for particle operators and you may have heard of other terms like this you may have heard of dots that's just dynamic operators or Sox those are surface operators and don't get too confused with those basically sups is everything that we've been doing Docs is what we're going to be doing in this tutorial it's dynamic operators so pops4 under dynamic operators because particles are dynamic so to create our first dynamic Network we're going to press tab and just type pop and you'll see over there it says pop network click on that and place it down now it has many inputs we were just going to use the first we're going to take our transform and plug it into our pop network set your display flag on the pop network so we have our pop network and as you can see there it says dot network that just means dynamic operator Network that brings us to anatomy of the solver so let's dive inside of this and see what's going on inside of here we have four main nodes so here's an illustration that basically breaks it down for you at its core a dynamics network needs a solver what the solver does is it takes all of the information it takes your parameters your settings all of your inputs and mixes them all together in a pot and output something for you so this is basically the brains of the dynamics Network next on the Left we have something that is absolutely always necessary we have the object so the object goes into the leftmost input of the solvent and if you remember from our previous tutorial we said that generally what goes into the left input of a node is also what is output by that node and that's the case with dynamics as well we have our object that goes in and then it gets adjusted by our pop solver and then it gets output now on the right hand side we have sources so what happens here is we source things into our dynamics Network for example if we need fuel for a fire we need to source that in if we need fluid for a flip 'some we source that in as well and what that does is it feeds it into our solver adds it to our object and then finally it gets output and that's the last node the output node so you have your solver your object on the Left your source on the right and those output something and then in between your source and your solver you can add things that affect the source so you can add a wind or whatever it may be that you want to affect the sauce then after your solver you add things that affect the entirety of the Sun so you could add gravity or you could add a Collider so you know a ground plane whatever it is you would add that after the solver and really that's all there is to dynamics it doesn't get much more complicated than this and you may have seen very advanced setups before but I can show you it follows the same set up everywhere in Houdini just these four nodes and sometimes it's even three you don't even need a source sometimes sometimes the object can be the original source and you never add anything more to it and this is something that I didn't really realize when I first started in Houdini that dynamics networks are quite basic and they all share something in common so I'm going to show you a file that has the different types of dynamics networks so here we have a velum network as you can see a source goes into a solver and object goes into the solver and that gets output in between there you have gravity but it's still made up of those four nodes if we go back we can dive into a pyro Network you see we have this pyro object on the left the source on the right into the solver and output and then we have extra things being fed in but if you get rid of this there's no errors you can clearly see if you just delete that absolutely no errors that's perfectly fine with that next we can go over to flip once again the same thing source object solver output now there's these two at the bottom and these are slightly different in an RPD setup we have the object solver the output and then over here an object into a solver to an output it's all the same and you just need to understand that setup to really get to grips with dynamics and these are just generated by shelf tools there's nothing special about them these are the basic ways to set up each of these dynamic networks so back in our file let's start on actually creating our sprinkles so we have this on the right we're going to go to our source so click on your pop source at this source first input and as you can see we have multiple tabs on here we're going to go over to birth because we want to birth some points so we're going to go down to constant birth rate and set this just to 100 when we play this back you'll notice two main things firstly we have these points being left behind and these are our particles this is what we're generating with our dynamics network with our pop network the other thing that you may notice is this blue bar at the bottom what this represents is all of the frames that have been simulated but that means that they don't need to simulate again we can just play it back and it's all been saved to memory and it's all been cached right so no problem there by going back to particles they're not doing anything yet and the reason is we don't have any forces inside of our network so let's add our first force with pups they have their own forces that you can add so we're going to add a pop wind I'll just press tab and type pop wind if you remember what I said earlier we can affect just the source if we plug things in between the source and the solver and so pop wind sits right in there and we also know that it fits India because of these purple inputs and outputs so now we can go up to tell pop wind in our parameters and give it an amplitude of 1 the amplitude is another way of saying how much so how much noise do we want so we're just setting it to 1 and then you'll notice that on our time line that blue bar has become orange and that's because Houdini has recognized that something has changed inside of our dynamics network that has not been re simulated so that means we need to go back to the beginning and simulate it again so you can just click on this on the far left that is your first frame and it will jump back and then press play again and now we're starting to get some movement our particles are kind of just flying away but that's not what we want we want them to fall down so like I said earlier if you want something that affects the entire object you can add it between the solver and output so we're going to drop down a gravity force between our solver and our output so press tab and type gravity put that in between your pop solver and your output as you can see it has a force over there and if we jump back and play again we now have particles that are falling down great so now what else would we like to add to this well we would like to add our icing so that it can actually interact with it so to do that we can press tab and bring in a static object a static object is just a Collider of our choice and so we can place it to the left and you'll notice it doesn't have an input and so we can't fit it between our solver and our output what we need to do we need to bring in a merge node so we bring in our merge node and then all we do is connect our static object to it then our solver and then that can go into gravity so we're still following that same formula of just the four nodes we have a source and object and output but now we're adding things to it we've added a wind we've added gravity and we're adding a static object now so to add an object we click on it and go to SAP paw and what we would like to bring in is our icing so we go to icing and select icing out and all of a sudden it's in our network and so if we play this back you'll notice there are particles for and they should interact with us but they don't and the reason is although we can see our geometry it has a Collider that Houdini generates and that Collider is based on the geometry but if that Collider isn't accurate enough our particles will just ignore the geometry let's see our Collider we can uncheck display geometry go over to the collisions tab on our static object activate collision guide and you'll see that there's nothing there so what we're going to do is we're going to increase the uniform divisions so that's basically how accurate our Collider must be we can set that to 150 and then go down to offset surface and just offset the surface by Northpoint not 1 and there you can now see our donut Collider and we can just hide our collision guide and then display our geometry again and play this back so now if we take a look our particles without doing that and bounce off so pretty cool right but they're not exactly sticking yet make them stick we would need to add a collision behavior so where do you think you would add that well if it's for this particular source it goes between the source and the solver so we move this up over here and what we want to add over here is a collision behavior so press tab and type collision behavior pop collision behavior you can plug it in after you pop wind and on here it says behavior and it has response so what would you like the response tell particles colliding with something B we can set that to stick so now our particles should stick but there's one other setting that we need to change and that's on our solver so go on to your solver we can just go over to collision behavior and there's this little add hit attributes box so we need to enable that so that it actually checks for collisions and now we play this back and as they collide they stick to the surface and it looks quite good and they also get colored red because our pop collision behavior has a color hits option now I know you may be thinking that there were a lot of changes that we made here but the setup isn't exactly the most simple setup it's actually reasonably advanced what you're doing is you're making particles fall onto a doughnut and actually stick to it and so this is your first step to dynamics in Houdini and that's a big step because dynamics are really what make Houdini so amazing so let's go up a level we can click on this dynamic sprinkles if we click on our pop Network and then go up to the top and say hide other objects you'll notice that it's outputting both our particles and our icing we only want our particles so what we have to do is go to our pop Network in its parameters it has an object merge on it and over here it says number of objects objects asterisk in Houdini asterisk means everything right that means all though all objects just merge it right and output it but we don't want every object we only want our particles so if we go in here we look for our pop object and all we have to do is give it that name it's called pop object so we can change this asterisk to pop object all of a sudden the icing disappears and all we have left are our particles so great now what we can do is drop down and now as we've done before and this as dynamic sprinkles underscore out dynamic sprinkles out we can go back up to the object level and hide our dynamic sprinkles so here's another really cool thing about Houdini it's procedural so we can go into our sprinkles node and what we can do is instead of bringing our icing in and scattering points while sprinkles we can just bring in the sprinkles that we created in our dynamics Network and so how do we bring it in to this network just like we've done before we can press tab an object merge so now that we have this object merge we need to go select our object so object 1 go ahead and find your dynamic sprinkles so it's over there dynamic sprinkles out and if you set your display flag you'll see that it's been brought in but now we want to put it in over here so what we can do is drop down a switch node so now we want to be switching between our scatter points and our new dynamic sprinkles so plug have scatter points in first and your sprinkles and if you set your display flag on the switch node you can switch between these two that's very simple to just plug our switch into our old setup and if we take a look at the last node in the chain it now uses our sprinkles if we play this back Oh sprinkles fall and some of them will stick to the surface now I know that looks very weird right now they're all facing up and that's just because we no longer have normals as you may remember we generated normals before on our geometry and then scattered the points with that so all we need to do is transfer those normals from our geometry until our new sprinkles so we can press tab and type transfer and you'll see an attribute transfer node so we can just slide this in between our object merge and I'll switch and it needs a second input it just needs this generate normals nerd like it in there and what this will do is it'll transfer our normals from our geometry unto our points so if we take a look at this by displaying point normals you'll see that all of these points now have the normals being transferred to them we can go back down to the bottom go to the beginning jump up a level and view all of this together they'll just play it back as you can see our sprinkles are falling on Taylor donut and sticking you and once again the power of Houdini allows you to add new things to this so once again you could switch out your tubes for spheres so we can drop a sphere change it to polygon mesh uniform scale of north point two-five plug it in here the same thing you and so what we've done is we've successfully created our first dynamics network and used it in one of our existing set up now I know a lot was covered here but I just wanted to introduce you to dynamics I hope dynamics weren't too much it's an entirely new concept and it may be too soon to be introducing this in part 3 but the sooner that you get comfortable with dynamics the better because you can do so much in Houdini with dynamics and it really is a major aspect well thank you for watching I hope to see you next time please consider leaving a comment below leaving a like and potentially subscribing and I'll see you next time with part 4 of Houdini isn't scary bye
Info
Channel: Nine Between
Views: 61,253
Rating: 4.99507 out of 5
Keywords: Houdini, vfx, cg, cgi, houdini tutorial, intro to houdini, houdini basics, houdini learn, learn vfx, learn cg, learn, sidefx, blender, visual effects, computer graphics, digital art, maya, vfx basics, introduction
Id: F2rj31YXaCQ
Channel Id: undefined
Length: 21min 35sec (1295 seconds)
Published: Mon Jan 13 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.