Melting stuff in Houdini - Houdini Tutorial (Free Project)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey it's Dave from CG shortcuts today we're going to do this we're melting things in Houdini this video was brought to you by eagle the productivity app that helps you become a happier better designer Eagle is an exciting new way to collect search and organize your image audio and video files in a logical way and all in one place you can sort your entire media collection right from your desktop and search by keyword tagged with smart folders and even notes and annotations your images can then be filtered by date rating type resolution and even by color the Eagle browser extensions also allow you to drag and drop images straight from the web or you can batch download entire collections from your favorite sharing sites like Pinterest Instagram and Flickr you can also sync your collections with your favorite cloud storage service like Google Drive Dropbox or onedrive the guys over at Eagle are offering a free 30-day trial of their app so check out the link below and see how you can save time and streamline your digital assets with Eagle now let's get back to the tutorial ok so welcome to our very first ever Houdini tutorial this one was inspired by this render by timur seller called so we got together with Timur and our resident Houdini expert Denis bahara to bring you this tutorial hopefully it'll be the first of many tutorials we start to cover outside of our usual cinema4d stuff so let us know what you think and if you'd like to see more of this kind of thing in the comments below so without further ado let's hop in the Houdini and see if we can create this so let's start by creating a new project and let's just call this something like melting we'll also set a project path so we can keep things nice and organized and because we're going to be cashing some pretty heavy Sims we want to make sure whichever directory we choose has plenty of disk space ok let's accept that and we'll head over to our network or node and hit tab on the keyboard to bring up our menu of all the different objects we can use and we'll start off nice and simple with a geometry node so to get that we just need to start typing in geometry until geometry is selected then we can hit enter to bring that guy in so now we can zoom in a tad by using the right mouse button and we'll rename this and we'll call it sim because we're going to build our entire simulation inside of this and you can kind of think of this as a folder containing our entire scene so we'll double click on that to go inside and now we want to bring in a mesh that we can melt so we'll hit tab again and this time we'll start typing file and just hit Enter when that shows up and that's going to bring in the cubes geometry by default but we want to use our own model so we'll come up here to the file directory and click on this icon here then we just need to navigate to where we have our model stored on our computer and you can use any model you like but we're going to go with the same alligator head from teamers render okay and that's come in gigantic so we'll hold the right mouse button and zoom out a bit and I think we're going to need to scale and reposition our alligator head so if we come back over here and drag this handle out we can hit tab again and connect up another node this time we're going to use the transform node so we'll start typing that in and we can also select these with our mouse let's just grab that guy and then we need to activate this node by clicking right here and now that gives us access to the transform controls over here and we just want to move this guy above the ground plane because it needs a ground to melt onto later so I'll just put some values in here that work for me earlier I'll also rotate this and this probably all seems fairly familiar to you if you're coming from cinema 4d or any other 3d software and finally I'll just scale this right down and now we can see our alligator so let's just go in for a closer look you can see we've got this slightly above the ground plane here so melting liquid has a bit of space to fall before it collides with the ground okay so here's where things start to get interesting we're going to turn our polygon mesh into a volume and generate loads of points all over our mesh that we can feed into our melting simulation so let's come back over here and now that we know how to bring these nodes in we'll add another one to the mix here after the transform node this time we're going to use an ISO offset node and if we activate this guy just like that we've turned that mesh into a volume although it's a little bit hard to make that out at the moment and that's because the resolution of this is pretty low at first so we can increase that over here under the uniform sampling so let's bring this way up to 300 sampling divisions and depending on your machine this might take a little while to calculate there we go and now we can more clearly make out that shape of our alligator head and you can even see the finer details like his teeth in here and that is exactly what we want so now we're going to generate some points on top of this volume so back down here we'll bring in another node at the end of our chain here this time we want points from volume and we'll activate that guy as well and there's our points but just like we had with the volume before the resolution or the density of these points is a little bit low for what we want to do here we can barely make out that alligator head again so let's take a look at how many points we actually have in here if we come back to our points from volume node and middle mouse button click here we get a whole bunch of different stats including the point count which is just up here and you can see we've only got thirteen thousand nine hundred and thirty seven points being generated into our volume but we could probably bring that up into the range of a hundred to two hundred thousand while we're experimenting with our simulation and we could take that even higher when we come to do our final sim so let's go up here and I like to make sure the source type is also set to fog pull though by default it looks like it's Auto detected that anyway we can increase the point count by decreasing the point separation this basically pushes the points apart or brings them closer together and if we decrease this we're actually generating more points when it brings them closer to each other so let's try a value of zero point zero four and you can see we've definitely got a load more points in there now now we could even go and see exactly how many points we've got and we're now on well over two hundred and thirty thousand so we'll work with this for now and increase this again later for our final sim so we can probably start simulating this now and we're going to do that by bringing in yet another node this time we want a pop network which is short for particle operator Network and I know that sounds kind of scary but it's actually just two DNA's particle solver and this is a dot or dynamic operator which we're going to use to turn these points we've generated into dynamic particles so we'll activate that and go inside here and you'll notice our points have gone blue now but this is actually just a guide to show us what we've applied this to so if we click here on the source we can come up here and disable that but now we've lost our alligator completely and even if we play our timeline through we still have nothing so where did our particles go if we look up here under the particle emission type we can see we're currently set to scatter on surfaces but we don't actually have any surfaces to scatter on to because we turned our mesh into a volume so let's see what other options we have in here let's try changing this to all geometry and now we've got our particles back so if you remember from our final render we had our alligator melting from random places across the surface of the geometry so the next step is to tell our simulation where the melting needs to take place or start from before the melted liquid falls to the ground so we're going to go back a level to our sim and we're going to add another pop network from our transform node here so we'll drag this out and bring in one of those and we're going to scatter some more random particles over our alligator which will tell our sim where to melt from so let's rename this guy will call that scatter and we'll activate that and go inside and again we'll disable our guides and you can see we've already got a bunch of random particles being generated on here so if we would hit play and just make sure our playback is set to real-time we can see more particles being emitted over time which is exactly what we want but we do only want the melting to start from a few places on the model and not all over it like it is now so let's bring the amount of particles down and we'll head over to the particle source and we can decrease the amount of particles being generated up here with the birth rate just like we would in cinema 4d so we'll bring this guy down to 15 and give that a try all right so our melting is going to happen from just these points so let's set that up let's go back a level here now we can keep our node graphs nice and tidy by hitting shift S on the keyboard and that just cleans up our connection lines here which can be pretty handy as things get more complicated now we're going to add some spherical fall off to our particles so our melting looks a bit more organic so we'll bring in a sphere and to attach this guide to all of our points we'll also bring in a copy to points node and we'll just put that guy down here and we'll plug our sphere into the first input here and our scatter into the second input and we need to activate our copy two points node and now we can see our sphere and if we hit play we've now attached a sphere to each one of those particles that are being generated over our mesh but they're just popping in there at the moment we actually want our spheres to grow over time after they've been emitted so our melting is nice and organic so let's rewind this and we can probably bring the size of our spheres down first let's make the scale 0.6 and now things are going to start getting a bit more advanced we're going to use an expression to give us the particle life and use that data to drive the scale so we'll bring in a node called point R angle and we'll connect that guy in between our scatter and our copy two points node and so we don't get confused let's name this guy calc life because it's going to be calculating the life of the particles and we can put our expression up here which is actually called a vex pression in Houdini but to do that we need to figure out which attributes we need to target in our expression and each node has a bunch of attributes which we can access by hovering over one and clicking the middle mouse button and here's a list of attributes available in our scatter node so the two attributes were most concerned with the age attribute and the life attribute so let's come up here and we'll create a custom attribute and when making custom attributes we just want to make sure we're naming it differently to the attributes that are already available so we want to give it a pretty unique name so let's first type the @ symbol which is used for attributes and we'll call our custom attribute calc life and this attribute will equal at age which references the age attribute divided by at life which is the life attribute then we just need to put a semicolon at the end to indicate the and of our expression here and now we want this expression to drive the scale of our spheres so we'll bring in a second point Rangel and put that guy in after our life calculation and we'll rename this to scale driver and we'll give this guy a custom attribute as well and we'll call it a new scale or new SCL dot equals now we're going to use a ramp attribute to ramp this up with time so that attribute already exists and it's actually called C H ramp which i think is for channel ramp then we need to add brackets and quotations then we'll type our call-out here which will be ramp then a comma and we'll reference our custom calc life attribute and end this again with a semicolon and then we need the attribute that's controlling the scale of our spheres which is at P scale equals our custom attribute at new SCL or new scale and we've actually forgot to add the @ symbol before this attribute so we'll put that in there and we'll finish this off with another semicolon and now if we click outside this window you'll notice everything disappears and that's just because we need to set up our ramp so we actually need to click this button to run our code and generate our ramp controls and now if we scroll down here they are and we can adjust this just like we would in cinema 4d we can add some points to adjust the shape of the ramp and if we hit play now we'll see those spheres are starting to ramp up in scale as time goes by okay so we're about halfway there now so let's just organize things over here we can put this stuff into a null let's drag out from here and we'll add a null which is a bit of a different looking node to the others let's just activate that and rename it let's call it trigger because we're going to use this set up to trigger our simulation then we'll grab our pop network over here and we can rename this you sim because this is our simulation and we'll go inside there and we can tidy up the connections again by hitting shift s and we'll just make a bit of space in here and we'll bring in a pop group node and we'll put that guy right here after the source node and we're going to use the pop group to group all of the particles that find themselves within our spheres so first we'll name our group and you can call it whatever you want just don't use spaces so to keep it nice and simple I'll just name it capital n and then we want to bind this to the shape of our spheres so we'll head over to the bounding tab and enable that then we don't want this bound by a box we want to use the geometry of our spheres so we'll choose bounding object and just like we're used to with our cloners in cinema 4d we just need to tell it which object to use and we want a top object and we can actually choose from a list of what's actually available in our scene over here and here's that trigger null we created before with all the elements of our growing spheres so we'll use that as the object and you can see that path has been edited in there now and if we hit play it can be a little slow to calculate but any particles that are within our growing spheres will now become part of our pop group so now we want to tell our particle system to only affect the selected particles in our group so as our spheres grow any particle they touch will have physics applied to them so we need to add another expression in here to do that but first let's bring in another pop Wrangell node and as we get more complicated here and add more nodes it's always a good idea to rewind the timeline and reset everything otherwise we might end up crashing things now let's grab our popper angle and we'll enable the group option here then we can tell this to look at the group we just made which is called N and this way our expression will only be applied to that particular group and not the other particles in our and we need to write an expression that basically says any particle that joins the group as the spheres grow will also initialize the simulation so we'll type in I for initial ions and we want it to initialize when it becomes part of the group so we'll say initialize at the state of being included in the group so we'll type state equals 1 so it becomes part of the group and now that those particles can initialize the sim we also want them to act like fluid when they become initialized so we need to add another particle stream to apply the fluid effect to so let's drag out another connection from here and bring in a pop stream and so we want the initialized data to carry into this as well so we'll change the expression here when our group equals initialized state of 1 or on it'll also be active in this stream and now we can add our fluid effect so we need to bring in a pop fluid node and then we can get our fluid simulation parameters so let's go through some of these firstly we've got the particle separation which does kind of the same thing as before the smaller number here the more particles and more detailed our fluid is going to be so let's add a bit more detail to this and bring this down to 0.05 and then we've got the iterations bringing this up will give us a more accurate sim so let's make that 30 then we've got the constraint stiffness which is how close L melting particles stay to each other higher values will stop particles breaking away so let's bring this up to 100 then we'll bring the tensile strength up slightly to 0.005 and the viscosity up to 0.3 so our liquid isn't too runny and now we need to add some gravity in here to pull our liquid down to the ground so let's bring in a pop force node and we want our force to be pulling down in the y-direction so let's make that a value of something like negative 6 ok let's try playing that back and it doesn't seem like anything's happening and I think that's because we need to go back to the pop source and let's just rewind this so we don't get any crashing then we'll head over to the birth tab and make sure this is activating on frame 1 so we'll type dollar capital F F for frame equals frame 1 and before we try and play that back again we can make this a bit easier to visualize let's bring in a pop color node and connect it to the end of this node stream and we can change the color of this by clicking here let's just make it black and close that then we can add another color into the second stream here and we'll make that one white okay you can hit the L key to order arrange these nodes so they're nice and tidy and there's one last step let's merge in a ground plane for our liquid to melt on to so right down here at the end of our node stream we'll add in a merge node then over here we can bring in a ground plane node and we want to tell our simulation it needs to collide with this so we'll also connect up a static solver which is kind of like a rigidbody in cinema 4d and we need to connect that to our merge node as well and if we take a look at that guy we need to make sure our static solver comes first in the calculation so let's just bring that up above the pops over and now if we hit play we can finally start to see that melting effect and the speed of the sim will depend on the power of your machine if you find it's really slow just bring your particle count back down a bit so the white particles are the melting particles and the black ones are the static part and if we zoom in you can see as the white ones melt away it's corroding l alligator mesh so we're now ready to increase the number of particles and cash out our final high-resolution simulation but before we do that let's rewind again so we can avoid any crashes then we can go back a level to our sim and we'll head back to our points from volume and to bring in more particles we just need to decrease the point separation and the smaller you make this the high resolution our liquid will be but the slower the simulation is going to be so let's try 0.02 and now our particles are quite a bit more dense and we could middle mouse click here to see the exact particle count which is now 1.9 million particles which is pretty big so you're probably going to need a decent computer with plenty of RAM to be able to handle this simulation hopefully we'll be okay but before we do this we could also increase the resolution of our pop fluid so back in our dope Network we'll grab our pop fluid and we'll decrease the particle separation here as well let's try 0.02 and now we're finally ready to catch this so we'll come down here to the output node and we'll save this to disc and the caching might take a while so go and grab a coffee or something we'll just edit that bit out and be right back ok so we're back all cashed up so let's go back here and click on our dope Network and you can see we have this little playback simulation option up here so let's tick that and it should automatically load our cash simulation into here if not just click here and find your cash on your computer and just bring it in so now if we hit play you'll start to see our timeline turning purple instead of blue and that just indicates that we're playing back at cash now and there is our melting effect and that pretty much brings us to the end of the particle set up but surrender this out we need to turn our particles into a mesh surface so that we can add materials to and all of that sort of thing so we'll come back to our dope network here and drag out a new connection and this time we'll bring in a particle fluid surface and we'll grab that guy and activate it and straight away that gives us a nice mesh surface over our particle sim but the resolution of that mesh is pretty low by default we will need to add a bit more resolution in there if we want to capture all that detail so if we take a look up here this option should be pretty familiar just like we did with our particles if we bring the particle separation down maybe to a value of 0.03 will subdivide that mesh and now you can see all that nice melty detail in there and finally we just want to separate the melted parts from the base mesh so we can texture them individually so back down here we'll bring in another node this time we're after the attribute transfer so we'll bring that in and if we connect our particle surface into the first slot here and the sim top network into the second slot that will separate those out for us so now we just need to cache this bit out as well before we render it off so we'll bring in one final node we want the file cache node this time and we'll save that to disk as well and again that should appear here as soon as that's done otherwise just find it on your computer and load it up it did take quite a while to cash out so I've done that in advance to speed things up here so we'll just link this up to where I've cashed it out on the computer and we don't want to forget to check the load from disk box and now if we scrub through the timeline it should be nice and fast but it's not and I think that's because we're seeing the attribute transfer node because we forgot to activate the cache node so if we do that it should read directly from the cache and be a bit faster on our I'm line and there we go that brings us to the end of this tutorial definitely one of our longest shoots but the Houdini is definitely a bit more complicated than cinema4d but hopefully this will give you an idea of how powerful the procedural workflow can be in Houdini as usual you can download the project file below to save a bit of time and if you found this useful and you think we should do more Houdini tutorials just let us know in the comments okay that's it for this week catch you next time thanks for watching let me know what you want to see in the comment section down below or you can leave a like or dislike and don't forget to subscribe and click on that little Bell icon for more videos and free stuff there's loads of extra resources on our website and you can win epic CG prizes in our monthly challenges check out CG shortcuts calm for more details catch you next time [Music]
Info
Channel: CG Shortcuts
Views: 49,765
Rating: 4.9614892 out of 5
Keywords: houdini, sidefx, melting, melt, c4d, gold, skull, dynamics, tutorial, mograph, tutorial animation, animate, fluids, crocodile, vfx, motion graphics, simulation, octane, liquids, cg shortcuts, cg, smelt, aligator, effect, free project, template, visual effects, cinema4d, animation, 3d, motiongraphics, motiondesign, 3d animation, cgi, rendering, design, cinema 4d, graphics, dave bergin, c4d tut, cinema 4d tutorial, c4d tutorial, maxon, cgshortcuts, animated, render, intros, cinema, blender, effects, 3dsmax, 3dmax, model, models
Id: K7UAVUzRP4Q
Channel Id: undefined
Length: 26min 31sec (1591 seconds)
Published: Fri May 15 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.