Houdini Tutorial - Understanding Vellum Grains Simulation Basics

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello and welcome everybody this is Roland from graphicinmotion.com and it is tutorial time again in this tutorial I will give you a brief introduction to Crane simulations in Houdini using Velo we will learn how to turn your 3D object into grains then I will go over the most important settings to Arts direct grain simulations this tutorial is actually part 6 of my premium Houdini course the Vellum playground in this course I teach every aspect of Vellum like cloth simulations soft body grain hair and fluid simulations the goal of the course is to get a fundamental understanding of Vellum while creating different projects in the projects we focus on special techniques like balloon inflation Advanced cloth tearing or grain dissolved simulations to get full access to the course please consider supporting me on patreon every single supporter makes it easier for me to create educational content for you guys on a regular basis you can find more information about the course on my website a link is in the video description and now let's jump right into Houdini and let's get started okay so now let's take a look how we can set up Vellum grains inside Houdini if you take a look at my scene I already prepared a collider object here and added in a rubber toy and I also added in a light here so to make this look a little bit nicer in the viewport now if I enter my green Sim node here I added this rubber toy test geometry and then just transformed it up so that it sits here above my cold lighter now I want to turn this geometry into Vellum grains the easiest way to do that is to add a Vellum configure grains node so let's add this in here and when we activate this nothing is happening if you want to turn your object into well on grains you just click create points from volume and then you can specify a size so let's say 0.03 and now this will fill our object with particles you see that we do not have that many settings here you can change the method here are actually two different methods regular grid means that it just creates a bounding box around the object fills everything with particles and then removes the one that are not inside your object so that's a yeah brief explanation and sphere packing Works a little bit different there it tries to really fill only the object itself you see in this case this doesn't work very well in some cases you will get problems with the regular grid method so let's just take whatever works for you then you have the backing density so if you want you can increase this but this leads to overlapping and this will cause some problems in development simulation so I usually do not touch this here and something that's pretty cool is the Geo scale if you activate this you see we lose this regular placement of the particles and they are now cheated and you can of course dial this in here then you have a seat that only does something when the cheetah scale is activated in the regular mode it actually doesn't do anything so this is more or less everything that we can do here we have some physical attributes but we will take a look at these later in this tutorial and now I want to show you another method how you can create grains from an object and therefore we use the grain Source node so let's add in the grain Source node here and if we activate this by default you see it just creates points so we do not have these spheres here this nice sphere visualizations as in the Vellum constraints but the settings are pretty similar you also see that here we have a particle type grains and fluid and we will not cover fluid in this tutorial I will do this later in my course I will have a separate part about fluids Vellum fluids now we will focus on grains here I also have the point separation I can set this to also 0.03 and I will have a pretty similar result than I have from my Vellum grains here if I turn off cheetah here for a moment so you see this is pretty much the same result here now in this you have a little bit more control you have for example also the backing density and you can also lower this increase this then you have an offset so you can shrink your point distribution or grow it like of an ISO offset when you're working with volumes then you can offset the grid as you can see here now the points have been offset then there's also a seed value the seed value doesn't do much now we cannot see it actually I think if we turn on the point numbers and change the seed value no not even then so this probably really only works in conjunction with the cheetah scale that we also have so if we activate Judo scale you see we cheat at these points and now the seed should do something as you can see here then we have another option uniform radius and to see what this is actually doing this is quite interesting we have to connect this now to our Vellum grains right now this only creates points nothing else so if we want to turn this grain Source into grains for Vellum we actually need this Vellum grain constraints node so let's link this in here and there's one thing that we have to do now so let's turn this off let's turn this off and now let's activate this and you see now I have my visualizers back here and now this should work in a grain simulation so let me show you the uniform radius feature if we deactivate this now you see that the radii of our spheres change now we have some that are smaller and are bigger and this can be also a quite nice effect so if you go to the geometry spreadsheet and take a look at the P scale you see we have different P scales now and if I activate this then the P scale is actually uniform and it is actually half of the point separation so just that you know how this is calculated now this uniform radius can be quite funny because then you have already some yeah some random scales in here another option that you have is to compute some Mass so you can compute mass for your particles and this will generate a mass attribute right here you see this is now taking the P scale into account so that's quite cool if we set this to uniform radius then the mouse will be the same for all these particles so also that you are aware of that now another option that we have here is to relax the iterations so this is very similar to the scatter node that you probably already know and here you can yeah change the relaxed iteration in this case it doesn't have that much of an effect as you can see here it just calculates longer so let's set this back to the default value and then here we have some kind of an error threshold that has to do with overlapping but yeah we can ignore that for now so this is more or less everything that you need to know maybe yeah one thing that is interesting also on the grain Source node is that you can change the mode here we have the solid mode we have a sheet mode and the sheet mode actually creates a sheet so if I quickly take let me quickly take a clip node here to visualize this and let's say one zero as you can see here now this is hollow so we are creating this this sheet around our object's surfaces so this is also pretty funny can create a nice effect there's only one problem sometimes you get some overlaps here as you can see here in the ear areas and then if you feed this into the solver this can cause some movement that you don't want but yeah you could encounter this by applying another radius or whatever or changing the density but I do not want to use this sheet I also have the option to do Strand and strand will just Place particles along the edges so if we take a look only at the grains you see now I have my particles along the edges of my geometry can be useful in some cases not really for our valve grain setup so let's set this back to solid let's activate our Vellum grains constraint node and now let's create a simulation out of this to create a simulation of course we need a Vellum solver and add this in here by the way just to mention this one more time this great source node is completely optional so you do not need this you just have more control a few more settings here but you can create a perfect melon grain simulation just by using the Vellum constraints grain node now let's activate our solver and let's make sure that we have our collider inside our simulation so let's bring in an object merge here and I will quickly link up my collider here bring it in here okay now let's take a look what this does when I activate the solver and you see there is an error and the problem in here is we need to have this particle size here activated and we need to have the same value in here so let's just copy this value by right clicking and copy parameter and then we go into our Vellum constrained particle size right click and say paste relative reference then these will be linked and we have the same value in these and now this simulation should work as you can see here now we have a nice simulation of particles or of grains but they are not behaving in a very interesting way and to make this a little bit more interesting let me add in a color note here that we can see this a little bit better because right now with this grayish color I think that we cannot really see them that well so let's colorize these okay now they are colorized and our color will be taken into account by the solver looks a little bit nicer what can we do with these grains now there's one thing that I have to mention by default grains do not use any constraints we have this constrained connection but if I cut this you will see that this simulation still works so it is a Vellum constrained grain node it's called Vellum constraints node and it looks like all the other constrained nodes so if you already watched some of my tutorials or if you are following my Vellum playground course then you know that these you really create constraints these connections between Primitives or between points but grains actually work without them you can add constraints to grain particles and we will do that later in this tutorial but by default there are none so this is a very specific for Vellum grains now how can we change the behavior of these particles there are some very important settings on the Vellum solver let's go through these first if you take a look at the documentation of Houdini so let's do that quickly just that you know that you always can access this and that's really useful in case if you want to learn something new you see there is one recommendation here write the second or the first note here that is recommended to attach a Vellum solver and the sub steps should be raised to at least five for stability reasons so let's do that let's increase the sub steps to 5. these values that I show you now are not the right values this really depends on the simulation it depends on how many grains you have on the size of your scene on the scale so this is really just for this tutorial if you set up your own grain simulations you may have to change these if you put the sub steps to five of course this simulation will be slower now so we can turn down the constraint iterations in this case and I found out that 20 is a value that still works if I go too low then my simulation will break at some point but if I set it to 5 and 20 the simulation still works and you see it already looks a little bit different than before now what else can we do and how can we set up these nice green behaviors to make this simulation a little bit more interesting let me go to the grain source and let's lower this a little bit so that we get a few more grains in here like so that looks pretty good and now in our Vellum solver we can take a look at some options that change the behavior the first options we find under the forces there is velocity damping and in case if you have some jittery Behavior or if your grains are flying around a little bit crazy then you can increase the velocity damping you're probably familiar with this value it's just drains out some velocity or damps the velocity as it's called and then the simulation will be a little bit smoother and slower of course so depending on the value that you put in here it can have a quite dramatic effect as you can see here now they are not spreading out that much empty behaving a little bit different as you can see I will turn this value off because it has quite an influence on our outcome of the simulation and I want to talk quickly about the friction so if we turn off the friction to zero let's do that then these particles will behave a bit different they will slide faster they will not stick to each other as you can see they are just going pretty crazy as you can see here so yeah this is a value that we definitely want to keep so let's click control and middle Mouse to set the standard values there are two friction values I do not want to go into any details what these are what the difference is you can read it if you want but I use them like this I usually just use them with a multiplier so if I want to increase the friction I can set this for example to 1 and this here to 0.2 and let's take a look what this does now the friction is a little bit higher they will not spread that far and they will also slide down a little bit slower the difference is not that obvious but you can see right here on top there are some of them already quite sticky so this definitely has some influence on the outcome of our simulation so let's set this back to standard values and let's go to the really interesting settings for grains and this is in the advanced tab we are still in the solver and here are these grain collisions and the most important setting for the behavior of Vellum grains is probably the attraction weight this is a parameter or an attribute that is between 0 and 1. so if you set this to 1 so now you will see this will look totally different now they behave like this wet sand you know they are sticking together and they are forming these patches and of course if you lower this to a lower value then they will not stick together that much anymore as you can see here now they will form smaller patches here but this still looks like this typical grain simulation that we are used to and if you combine this with friction you can already achieve a lot of different setups and I will show you this in a moment but for now let's take a quick look at the search scale the search scale defines a radius around each point where the attraction rate more or less is is applied this is a little bit of a sensitive value it takes into account the p-scale of our particles and yeah you have to be careful when you change it so let me change it a little bit from 2.5 to 2.1 and let's re-simulate this and you see immediately what the change is here now these patches here the particles that actually attract each other are way smaller and we are actually creating a big Mass again here by just changing this slightly so let's increase the attraction rate to a higher value that we can see a little bit better what this search Radio stars and you see still with this search scale they are spreading out quite far they are sticking together a little bit as you can see here but yeah let's increase this now so the standard setting is 2.5 and if I set this to a value like 2.9 which is a bigger search radius now you will see they will stick together way more and actually it already breaks and this is what I meant when I said it is sensitive so let's see where the 2.7 Works in this case it always depends a little bit on the density of your particles as well so you see 2.7 works and now these Clump together way more already at a direction weight of 0.7 so to be honest usually I do not really change this search scale in most of the cases now if you watch older Vellum grain tutorials that you will see this Max neighbors value and that you can change this and you see it's grayed out now in this version and I'm working with Houdini version 19.5 point something and this has to do with these opencl settings right now we have opencl neighbor search enabled that means that it just searches through all of these points using this search scale if you turn this off then this will run actually on the CPU and you can limit the calculation Time by limiting the max neighbors where this search scale is applied and you can now also control the size of these chunks by changing the maximum neighbors but I think that this is kind of a legacy option because the opencl neighbor searches way faster so it's turned off by default just in case if you watch some older tutorials because yeah it happened to me too good so these are the most important settings on the Vellum solver that have an influence on your grain simulations now there is another option to change the settings and this is actually this physical attributes and to demonstrate what this really does let me quickly change this setup a little bit I want to create three different versions now here so let me quickly control drag this one over here and now I want to show you another option that you have how you can control the behavior of the particles or of the grains without actually changing the settings on the solver so we will go to our solver and we will change some settings here first of all I want to set the attraction weight to 1 and I want to make sure that this is on the standard setting which it is that's good then we go to the forces and yeah everything is good we are on the standard settings if you take a look at the Vellum constraints grain node I already mentioned that there are these physical attributes that you can drill down and if you take a look at them friction Dynamic friction attraction weight these are familiar because these are actually the same parameters as here friction and attraction weight and the repulsion rate we didn't discuss that it's not that important actually so we can manipulate the settings on the solver directly here on our Vellum constraints grain node to do that you have to activate these three values let's change the friction the dynamic friction and the attraction weight and these act as multipliers so it works like that the value that you put in here will be multiplied with the value that you specified on your solver in this case nothing will change because we multiply the value on this over times 1. but we want to change something here so let's say our first one the first stream here we will not change the friction because the friction is already quite low but we want to lower the attraction weight so let's set this to 0.25 to generate a bit of a lower attraction rate on the purple one then let's go to our green one and let's activate this let's increase the friction here a bit so let's set it to 2 because then it gets multiplied by 2 and we set the attraction rate to zero point 5. now let's do the same here on the third one and we will take other values here let's set the friction to 3 and the attraction rate to 0.8 and now if we run this solver you will see that with one solver we will get totally different results on our grain simulations this is of course now a little bit slower because I have quite many particles in the simulation quite many grains and I have three different streams solving here but you can already see the outcome here so this one is the one with the low attraction weight and the lower friction this one is in between and this one is with high attraction weight and high friction so using these three values or changing these three values can actually get you quite far and you can create quite many different behaviors of volume grain simulations and that you do not get too bored here let me stop this and let's take a quick look at the real time so this is more or less what you can achieve now there is another option and the other option that we have is that we use constraints classic Vellum constraints as we already used it many times during this Vellum playground course so let's take a quick look how we can set this up and to do that I will borrow this stream here and bring it over here quickly and I will create a new stream over here so I will create a new balance over here now and just attach this for a moment and let's take a look at this stream now let's revert back and actually this should work but it does not let me take a look why this does not work this is a little bit strange now there is an error let's see what is she's not happy not enough sources specified wow this is very interesting and we never had this before but let me take a quick look so if I give him some constraints here then he's happy interesting and you see now it actually works but I did not plug in my colliders let's do that quickly okay I just want to create another stream here and I will put in here constraints anyway so I can get rid of this connection that is actually a bit strange that it requires that but anyway I want to add volume constraints now to my grain particles so let's add in a Vellum constrained node and let's link this up as we always do so we will add the stream here and I can actually yeah I can put the color up here it doesn't really matter then continue to dissolver I will also put in the constraint stream now and then we can specify that we want to create constraints and I want to create glue constraints by default it does nothing so if we take a look here at the glue constraints you see nothing is happening in here and that's because grains are of course points so we have to change the geometry and the targets to points and as soon as we do that you can see that something is happening here we have some constraints now and if we take a look at these I will just visualize these by putting down a null here now we have some connections in between our grain particles but you can also see if you take a look here that not all of them are connected and we do not have really many constraints and if I run the simulation as it is now these glue constraints and let me actually go to my solver and again change the sub steps to 5 and the constrainted rate is to 20. everything else I will leave on standard settings and we can take a look what this does now I added some constraints but the behavior is nearly the same and again I have to add in my collider so I disconnected this sorry for that let me quickly add this in yep this one here actually okay now we can take a look at that and you see the behavior is nearly the same it's quite yeah dry sand like so we do not have a lot of connections in here because as I said by default there are not really many constraints what we can do now is we can play with these values and one of the most important values here is the constraints per point if we activate or visualize this for a moment let's go in here let's take a look at our constraints and increase this so let's increase this to four and you see this gets way denser immediately and now also all of them should have some kind of connection or nearly all of them and if we run the simulation now with these settings then this will already look a little bit different you can actually really create some very nice simulations using grains and constraints so you have a lot of control here as well so as you can see here now this looks already quite different and sorry but there's one mistake that I made and I should have thought about this before I still have my friction values and my attraction weight activated here so I have to turn this off actually because otherwise they have an influence on this behavior and that's what we saw now and this is why it was a bit strange and now I realized that I have my physical value still in here but I don't want that I really want to control this now only by using these constrained values okay you see the bit of a problem of the simulation now is that some of them are flying off and these are the particles that actually have no real connection to the others and the other ones are not even breaking apart and this is because our constraints are pretty strong so if you take a look at these constraints they have a very high stiffness and braking is not enabled so if we lower this to let's say ten thousand and if we enable braking and on breaking let's go back here reset this we have to add actually a quite high threshold so let's start with 20 let's see what this does and now this should make a little bit more sense so let's take a look at the result here now you see that we get these patches here again and of course the constraints are now quite soft so they will spread out more and if we want to make this even more interesting we can just increase the constraint iterations double it to eight per point and this will now change this again totally you see now it keeps its shape way better and of course if it lands then it will break but this looks really cool you see now the head nearly doesn't deform the nose is still in shape here so it's still visible here and also the legs here so you can create really cool things with this and let's take a look at that that's actually really cool I really like that now one more thing that I want to show you is if you turn off braking again or let's not turn it off let's just make it really high let's set it to 50 and let's increase these constraints per points even more to 10 and let's also increase the stiffness here maybe to 1 million and run the simulation again now this should act nearly like a soft body and if you turn off braking then you have definitely a soft body but with the braking maybe some of them break off and the other ones will act more or less like a soft body so let's take a look at that if we get some of them to break doesn't look like it so I think that we have more or less created a grains soft body this is actually a way how you can create soft bodies you can then copy this simulation over to your geometry with pointy form and it's really funny because this kind of soft body simulations are very specific and as you can see here now at the impact here oh he's losing his head oh my God we killed the rubber toy sorry about that I think that this is great you see he's sliding down oh I could see the fear in his eyes he already knew that this is not ending well well this is a nightmare poor guy but actually the settings are perfect so this is really funny let's take a look at that again glorious yeah really cool okay so I think this is it for this part of the Vellum grains tutorial I will have two more parts on grains on my course I'm currently preparing these I'm preparing a dissolve set up where we will take a look how we can actually manipulate all of these attributes that we saw now with noises and how we can animate this and how we can create a pretty cool snow dissolve animation and then I will do a second part but to be honest I'm not sure what I will cover in this part because with grains you can do a lot of funny things so I have to think about something and come up with something if you have an idea where if you see your project and you want to learn how to do it then please let me know put a link in the comments and maybe we can work something out meanwhile I want to invite you to join my course on patreon there you will learn a lot of different things about Houdini and Vellum Venom cloth Vellum soft bodies grains hair fluids all the cool stuff and I also want to invite you to subscribe to my YouTube channel to stay up to date with all of my content so I thank you very much for watching and I really hope to see you soon goodbye
Info
Channel: graphicINmotion
Views: 21,780
Rating: undefined out of 5
Keywords:
Id: cw-4trw2TNY
Channel Id: undefined
Length: 31min 53sec (1913 seconds)
Published: Wed Feb 01 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.