How VELLUM Works in Houdini & Useful Production Tricks!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone today I'm going to be covering with some really useful tricks using this tutorial is going to be kind of an overall overview slash intro to vellum as well as this one particular really useful production workflow that I use all the time for essentially driving simulated vellum with input animation so in this example this guy we have who's walking around whose arms are totally simulated but the rest of his torso is basically the input animation being driven by the mocap if we take a look over here we can see this is essentially the animation that I'm feeding into vellum and this is the animation that we're getting out and there's lots of fun ways we can tweak this and get other kinds of looks so to do this the first thing that we need is some kind of input animation this can be a character that you've animated and rigged another program and brought over as an Olympic it could be an FBX file it could be a character with some mocap from miksa MO but for just testing purposes in Houdini we have some really useful built in mocap animation that we can grab so in the object context we just type in mocap you can grab any one of these mocap bipeds and we get right off the bat this nice little walking guy with textures and stuff so you can pick any of these different preset animations in here it's one of them waiting you can also choose whether you want to be in place or not so if you check this off rather than being stuck in the center he will actually move around this scene in world space all kind of nice stuff so I'm gonna set this up real quick by having this mocap biped and then I'll have it in place and I'll make a new geo node called geo to dive in there and we're gonna grab the animation from that mocap biped using an object merge node an object merge node is just a node that basically grabs some node from any other of your objects or even in the same object and allows you to bring it into any of the other things for referencing for whatever reason so I'm gonna select mocap ipad 2 which is the one that i just made and i'm going to grab the geo node which is where we have our actual walking guy so that's cool now I want him to actually animate walking and not just be standing still and the way I'm gonna do this is by just throwing down a transform node and we will translate this guy on positive Z this way and just so I don't have to keyframe anything I will use a handy little expression over here which is at time so time is like a global attribute into DNA and if you just type in at capital T time you can call that into any channel or whatever so that's pretty good now he's walking his feet are sliding a little bit he's moving a little bit faster than he's actually walking so I'm gonna adjust this slightly just by instead of it just being at time it's gonna be at time times 0.8 so it'll be a little bit slower and it'll match up a little bit better and that feels good enough for what we need here so cool moving on the next step is going to be to create a proxy geometry that we're going to use for the simulation I don't want to use this geometry that we have here which is super high quality and has all these different bits and intersecting things like the the eyeball geo and here they're maybe not but it has all these different parts to it and I don't I don't want to really have to worry about that when I'm simile I just want one kind of nice airtight mesh and thankfully and Houdini it's really easy to set that up and this is a really common production workflow that I use all the time so the first thing we want to do is create a rest pose so a pose where he's just kind of standing still and the easiest way to do that is just gonna be to drop a time shift node by default the time shift node has this dollar F function in here which means it grabs the current frame that you're on and you'll see as I scroll through here it changes the number in here because of that expression based on what frame we're on in the timeline so I'll just right-click delete channels and just let it be one there so now it's stuck at frame one I could also instead of deleting the channels I could just hit this to show the expression dollar F and just type in one here and now he's not moving so that's cool now in order to create our proxy Geo I kind of want to make this new closed geometry based on like the volume of this character so in order to do that we're just gonna use a VB so I'll drop down the VB from polygons and I have a whole video explaining how VB bees work and what VB B's and volumes and a lot stuff are so check that out of my youtube channel if you're curious for more information on that and I'm going to because this is a very low resolution VDB I'm going to drop the voxel size down to something like a tenth of that and that is something that's much nicer so now we can see some of the detail on the fingers and all that and then I'm going to turn this back into a closed polygonal object by throwing on a remesh node right after the VDB from polygons and this will give us just triangles all over our mesh and technically this is not the best topology but it's perfect for what we need which is just something to sort of be a placeholder and work for our vellum simulation so awesome now the problem that we have is we don't have this guy animated we have this guy animated over here and if we take out this time shift node this will animate but it's regenerating the polygons and the VDB on every single frame which is a really slow and B if we middle click on here we'll see this is our point count it's 2984 on this frame and on this other frame its 3069 so the point count is changing every single frame which is not going to work for what we need we can't simulate something with consistency if the point counts jumping all over the place and then doesn't know where one point was on one frame to the next frame so we want a consistent point count so the way that we're gonna get the animation back onto this guy is with a really useful node called the point deform point deform and the point deform requires three inputs the first is the mesh that we wanted to form so that's our new geometry over here so I'll plug that in there and then the rest point lattice so basically we're going to be plugging the rest point lattice and the deformed point lattice which are the two versions of our original animated geometry that we're going to be using to drive the animation on this rematched guy right here so I'll plug the rest point lattice where we have our rest of our walking zombie man into the timeshift which is this is essentially our rest right here and then our deformed or animated geometry is right before that before we tell it to stick on to frame one right here and now we have a nice animated guy and the timeline is playing much faster and middle click on here and the point count is going to be the same 3028 every single frame so that's awesome now we're ready for our vellum simulation I'm gonna explain how vellum works a little bit basically the the key thing to know about vellum is that it is essentially at its core just another type of particle simulation in Houdini and every point on our vellum simulation is a particle and the thing that makes it sort of special as a vellum simulation is that we're giving it certain constraints and I'll sort of explain how that works but basically all these points will be kind of constrained to each other in different ways depending on what kind of constraints we use for our vellum sim and you'll see there's a ton of different options I'm only going to cover a couple of the different constraint types today but it's definitely worth looking around and playing with the other kinds that we have so first I will drop down a vellum soft body and we're gonna use a strut soft body and this creates two different constraint setups for us right here so basically what these are doing is they're both each one is generating a different type of constraints for our velum simulation so I'll plug this into our point to form and if we click on any of these we'll just see the same geometry that we have set up but the what the middle input is of these the left input is our geometry and the middle input is our constraint geometry so if we want to actually see what the constraint geometry looks like we can grab a null and plug it into the middle input of any of these and you'll see now we can actually see our constraints so from this you can kind of see what it's doing with the cloth constraint which is that it's actually creating these constraints from each point to the other nearby points in the velum simulation and that's allowing it to sort of behave like a cloth when we simulate it so if I throw down a bellum solver and I just plug it into these guys so we're just plugging it into the cloth constraints and I also turn on the ground so we can see it collide it will essentially behave like as if it's cloth so that's cool but then we have this other one that's being generated when we generate the velum soft body struts preset and [Music] this one is in addition to the sort of outer layer of constraints that are being created by the velum cloth constraint it's adding in these strut constraints which are these sort of ones going through the body that we can see and I think if we if we plug this directly into here we can see this is is basically what's being created by the construct constraints it's these struts that are like kind of going through the volume of our object and the stiffness of these struts is saying how much these sort of lengths of these constraints are trying to be maintained so if we plug the cloth with the struts into the velum solver and hit play we'll see we have a little bit of mass now it's like the head is sort of staying the volume is staying there because of those struts now if we go on to the settings for these you'll see we have these settings and the most important one right off the bat is this stiffness setting so there's a stretch stiffness and a bend stiffness and in the cloth constraints we have both of those and it's saying basically this is the the number that we're putting in for the stiffness for the stretch and we're saying because the number is super high we're saying maintain this length very stiffly so don't kind of allow it to stretch very much at all but if we lowered this down a lot it would sort of have a lot more leeway in terms of letting our cloth stretch out and it would sort of behave a a little bit differently maybe like as if it were like a soap bubble being blown or something like that that kind of material is allowed to sort of stretch a lot more than for example a piece of cloth and you can play with that and get different results in the strut constraints however the default preset is just set to 10 which is not very strong which is why when we play this he's still looking pretty cloth II and not maintaining a ton of volume but if we crank this up to say thousands now we actually keep a lot of our soft body volume which is super nice and maybe more of what you want I'm gonna say it's kind of go in between ten and a thousand and set our stretch stiffness of our strut constraints to a thousand and hit play and now we get something kind of in-between that I think is kind of nice they end up sort of keeping the volume of our initial guy but they do get sort of like compressed and stuff a bit more than when we have it set to a thousand so that's nice so anyway hopefully that makes some sense that's sort of how those constraints are working and then with the velum solver it's just saying add gravity add you know whatever other forces we have we could set up some some wind if we want to be positive X wind and blow our guy over here but based on all that stuff push the particles around and then try to resolve the constraints that we have set up and based on the stiffness of those constraints sort of push and pull all these points on this mesh to where we want so that's just generally sort of what vellum is doing under the hood and it's just kind of a good thing to keep in mind when you're tweaking these settings the other important takeaway from this is I would sort of think of this stiffness parameter on any of these things almost is like the the weight of the constraints so like the strength and these go from zero to you know millions if you want it to be like completely stiff just set it to a very very high number essentially and but it's it's more or less kind of like the same idea as on for example like a shader you have like the diffuse weight and the specular weight and all that stuff it's like the weight parameter is the way I would sort of think of the stiffness in Belem so awesome we have our little soft body thing but we want this to kind of follow some amount of our initial input animation with our walking guy over here right now it's just starting and then falling so there's a really useful I'm going to turn off this wind here it's a really useful other kind of constraint that I use all the time it's the the third kind that I'm going to show you guys in this video so if they drop a velum constraints we'll see there's all these different constraint types there's distance along edges which is actually kind of like the same as the cloth constraints except it doesn't have that bend stiffness attribute so it kind of lets it Bend infinitely but we want to go down to the pin to target constraint which is the one that allows you to sort of control your vellum sim with your input animation and I use this constantly I have tons of examples of me using this so for example for all of these characters here some of its being animated by hand and then I'm just running a simulation on top of it so I'm getting this really nice secondary action partially sim partially animated stuff which is essentially what the pin to target constraints lets you do we're going to attach this here at the end and now we have all these extra little constraints and we can look at them they are just these pins basically where all the points are of our input mesh so I'll bring the pinned at hard constraints into the picture over here and then if we hit play you'll see nothing happens because it's just being pinned to the target of the first frame of the animation now if we go to the pin to target constraints we'll see we have this match animation checkbox so we probably want to check that if we want the input animation to affect our simulation hit that and boom now it's animated but it's not being simulated at all still the key sort of useful thing for the pin target constraints is to turn on soft for the pin type in the orientation type and that gives us control over all these stretch and Bend parameters so now if we play because the stretch thickness is still really high we're not going to notice much difference you'll notice that the feet are kind of colliding with the ground now a little bit but it's pretty stiff and sticking to the animation pretty strongly because the stiffness value is so high but if we set this to like say 10 and then we hit play over here oops now you'll see he's kind of bouncing a little bit and there's some amount of little extra stimulation but it's also trying to sort of snap with a stiffness of 10 back to the input animation boo-boo-boo-boo-boo Wiggly so this will one it'll be really getting affected by the gravity a lot and then kind of keep trying to get pulled back up with this sort of like springy low stiffness now it looks like that and that could be kind of fun and there's definitely useful cases for this but the most useful way to use this stuff is to tell vellum where to make parts of it very stiff and we're to make parts of it very simulated so there's a way to do that which is by adding a attribute that we're going to scale the stiffness of the pin constraints by so if we click on scale by attribute then it creates this stretch stiffness parameter and you can name this whatever you want but I'll leave it at stretch stiffness just for a consistency and I'm gonna set my stiffness of my vellum sim up to 10,000 so it's pretty stiff and now there's lots of ways that we can edit this stretch stiffness parameter in here the way that I'm going to do it is with a paint node so I'm going to drop down a paint shop right here and the paint's off is great it lets you paint colors right now the color is set to white and this is all white but if I set it to like red it'll let us paint red on this guy but we don't want to paint color the CD attribute that it's painting by default we want to paint instead the stretch stiffness attribute which we can do by saying override color and changing this to stretch stiffness spelled correctly and now if we go to our geometry spreadsheet we'll see we have this stretch tip this attribute but it's set to zero set to zero all over his body and we're visualizing it in this note as well and I can paint with my thing set to 1 1 1 and now these red parts are gonna be 1 while the purple parts are going to be 0 and you can also change the visualization from infrared to white to red or grayscale whatever makes the most sense to you I'm a fan of the infrared mode so I'll just keep using that for now and we go in the geometry spreadsheet we'll see now we have some of these points painted with one Sun painted with in between values so the stuff that's not purple or red and some of it's just still 0 all the purple bits so I'm going to apply to all this 1 1 1 value and then I'm going to paint 0 the parts that I want to be nice and floppy so I will paint this arm over here and I'll paint the head basically you can paint whatever you want whatever you think will be cool to be driven by the simulation and maybe I'll I'll paint like the back of this leg over here and just see how that goes it'll be fun and then the other thing that I usually do for good measure is switch from paint mode to smooth and then apply that to all which just will smooth kind of everything out there's other ways you could do that too but this is a good way of sort of using this workflow so awesome now if I play the sim in those parts that have those values and we can visualize it over here by dropping down a visualize node and switching in the visualizer from P to stretch stiffness now we can see these are the zero parts these are the 1 parts and hit play and nice now we have our droopy zombieman and so that works pretty damn well now there's other ways we can control these attributes one way that I like doing a lot now that I'm a little bit more familiar with Houdini and with vex is to use point wrangles so if we want to drop down a point rankle over here we could do something like say at stretch stiffness which is our stretch stiffness attribute equals rel be box at P dot Y and we'll see in here what that's doing is one it's overriding our paint node because I'm just saying even though we have stretch this here I'm saying okay now stretch that this is going to be equal to this instead but I could instead I could add it if we wanted or I could multiply it if we wanted so now we kind of have a combination but I'm just going to set it to equal and what this is doing rel Bbox @p why I didn't delete that properly there we go is saying create a bounding box around our object a relative bounding box rel B box and basically set the position value to be zero on the y axis on the bottom and one on the top of the box so on the box is basically we're sort of making the max values 1 and the min value 0 another fun way we could visualize this is by setting at p2 r lb box at P I forgot my parentheses and then now we have our whole guy being sort of limited to the 0 to 1 0 to 1 0 to 1 values and it's just setting the max on each frame to be the max of all those values in the minimum on each frame of all those values through the minimum and that's pretty fun so it's a handy thing for something like this where we want to basically say make the stretch stiffness from the bottom to the top weak to strong or maybe let's say we want the opposite of this let's say we want the top to be weak and the bottom to be strong it's a couple ways we could do this obviously we could because it's set between 0 & 1 we could subtract 2 and then multiply it by negative 1 which is a bit of a weird way of doing it instead I'm going to use a fit function fit and then the first thing you put in the parentheses is the value that you want to fit so r lb box at p dot y and then fit that which is between 0 and 1 so the min and the max and fit it to one and zero instead of zero to one so basically flip it and now we'll see at the top up here it's gonna be floppy and then not floppy maybe that'll be cool so let's hit play and we see yeah that kind of works it becomes more jiggly up at the top we maybe maybe we like that another thing we could do is say well I want it to map this range instead of from 0 to 1 the old 0 to 1 value I wanted to set it between the old 0 and point 5 values so here it becomes black and then above that it's all just black so I can just set the old max to be 0.5 instead and then now I have that and if I hit play and I get this really crazy animation of our guy just kind of being dragged around so super nice so anyway there's lots of ways you could tweak this obviously we could also instead of using Y we could use X so it's going from left to right or Z so it's going from back to forwards and now the right side is dangly and the left side isn't so yeah tons of potential is you can probably imagine with the stuff so awesome that's kind of the majority of our set up there's one kind of last thing for production purposes that we want to keep in mind which is that are now our animated vellum mesh is this crazy [Music] terribly apologized stand in geometry so we want to get back our original geometry and if you think for a minute you might realize that there is a way to do this that we've already learned in this lesson which is to use the point deform stop yet again so I'm gonna do the same thing we did in the beginning basically I drop a time shift over and then set it to frame one over here so it's not moving and then point deform and then plugging the mesh to deform which is going to be our original rest pose mesh here and then plug in the rest point lattice which is our our stalled remesh guy and then our deformed point lattice which is our animated vellum one then over here now we have this guy with the correct topology and all of our other attributes or whatever we might have on him working great so hopefully that was useful and hopefully it sort of helped you get going with vellum and made the whole thing make a lot less a lot more sense and be a lot less scary I definitely wish someone had explained it like this to me originally but yeah I find this stuff to be super useful if you make anything useful with this definitely let me know and I am soon going to post a more advanced vellum tutorial and I'll give you a quick little preview of the kind of stuff that's going to be in that right now so with this tutorial I'm basically going to show how to animate different vellum parameters in dots during the simulation so you'll be able to do things like make the balloon inflating and deflating and you know kind of breathing or you'll be able to do things like trigger the inflation of our little guy over here with attribute transfer from the sphere so the sphere is driving the inflation of the balloon as it gets nearby or you'll be able to do things like keyframe this animation so that overtime he sticks to the animated geometry less and less and becomes more just a floppy simulation and this is a little bit of a more advanced thing that took me a while to figure out but it's now something that I also use all the time and find to be extremely useful so keep your eyes peeled for that tutorial coming very soon [Music]
Info
Channel: Christopher Rutledge
Views: 29,547
Rating: 4.9867988 out of 5
Keywords: houdini, vellum, tutorial, simulation, render, animation, cinema, 4d, cloth, softbody, entagma
Id: qAraO2E-v84
Channel Id: undefined
Length: 32min 27sec (1947 seconds)
Published: Thu Nov 14 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.