Houdini Variable Viscosity tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right so a little while ago I posted on Vimeo that I would be explaining how to achieve this kind of effect where we get a flip sim that is getting increasingly more viscous based on some other things going on in the sim mostly based on these particles age as well as the speed that they're traveling so this is this is the look that we're gonna attempt to recreate and this quick walkthrough today hopefully it'll be quick there's some other some other versions of this and alternate versions I got that I'll show you at the end as well and maybe talk through those a little bit this is the one that I that I've ended up rendering and that was at the head of this video so let's go ahead and dive in and I'll show you how I achieved this all right then inside the doc net I have all the standard notes for a flip sim mainly the flip solver flip object and volume source hopefully you know how to set those up if not there's there's other tutorials out there but just real quickly I have this set up the first context geometry and here we've got the flip object node the only thing I've really changed on this is how the particles are displayed there's by default they're set to show sprites I have those set to particles and you'd have the same thing if you use the the Shelf tool but if you did it manually you might need to update that all right so next I've just got my static object here that's the this sort of rocky looking sphere this is my ground plane and I'm just going to turn those off so don't have to see him and next I'm gonna drop down a default flip solver and sort of walk through some of the parameters that I've changed to get where where we ended up with this in I did up my sub steps I think I I think my final was either three or four you can you can change that as you see fit next what I had to do is in the particle motion tab there's a couple attributes that we need to initialize ones I just typically always do that and the other for this case is age because again we want to control our viscosity based on how old the particles are so we need to initialize that actually next is receding there's a lot of mixed mixed feelings on receiving it can lead to some issues depending on what you may want to do post sim but I ended up turning it on to get a lot of these cities like tenderly kind of areas without receiving those were really breaking up so much that my meshing wasn't working so I decided to go back on to go back and turn reseeding on and I was really happy with with the shape of the cinema after that using receiving and especially aggressive receding you can end up with some volume gain so just watch out for it but in this in this case I actually felt like it did a better job for me the last thing for this reseeding tab aside from the surface over sampling which I've really turned up and the surface over sampling when you turn that up you that's sort of how you force more particles into the end of the scene so I used a pretty high at a pre high value for that and then as you see here I'm also adding some other attributes into the end of this field so that when the new particles are born they also are inheriting the age and the viscosity of the particles around them and you're gonna need that when when dealing with Sims like this and that that's really all I did in the receding and then the other things that you're gonna need to change to get this effect to work is you need to enable viscosity obviously and what I've seen a lot of times is people when they when I start to play with viscosity in and they're flip stems they hit that and then they jump over here to the physical tab and start messing with this viscosity that's fine that'll get you a viscous sim but what it will not allow you to do is to vary that over time or to say if you had two or three emitters you wouldn't be able to do discuss e-type per emitters like to vary that have one that's really discus and one that's not discus so rather than rather than using this to set your viscosity what I always do is enable viscosity by attribute and then and you'll see I have that I have that here okay and then the only other thing that I did that's different than the stock flip solver is I ticked on this stick on collision so let me get rid of that extra one and and you'll see immediately we hit play let's see where's my there's my emitter but we're getting this in this error and what that's gonna tell us is hey you told the solver saying hey you told me to expect discuss the attribute and to take that into account and there's no viscosity attribute there so you can you know you can set that out here by you know any number of ways you can do a attribute or angle you can do a an attribute Bop and have noise control your viscosity any of those things any any that's available to you the way that I approach this was just to create a pop-top I'm gonna call this viscosity create just to show you that this works I'm gonna do a really simple version so to get viscosity out of here this the same way that we this work since Ops is anytime you're exporting some sort of arbitrary attribute that you're creating in here that's not that's not represented in this global output is you do a bind export I had to think of what it was called for a second and then the attribute that I'm exporting is viscosity and get a constant constant and let's say five thousand you can see my viscosity already updated there so now my viscosity is 5,000 across the board let me hop out for one second the sin is going a little bit slowly because of the settings I had weren't up to to make the high-rez sent for the render stop back in here yep you'll see so you know you got a you've got a really discus sim so I do that just to say that just to show that you can you can set attribute you can set they've discussed the attribute within a pop pop and it totally works and setting this in line with your emitters is typically how I do it now you can see I'll show you you can also you can plug this in here the volume velocity it'll work the same way this casts these five thousand and you know with the solver this this may actually be doing something different than just putting it in line visually to me they look the same I haven't done flip books and compared the two because I mean I you know just doesn't matter to me at this point but the reason I do it in line here this is because if I had two or three of these inventors I may want to do these to give them different values so that's why I do it and then it you know if this were the case you would just merge them in together and then have that but again that's not we're doing right now but this is why I set it up this way so to get back to sort of the meat of what we're doing we want our particles to get more viscous the older they are which is what we did here but we're dealing with such low values we're giving them with the age which is gonna be from zero to frame 240 10 seconds it's never going to get discus enough so what we want to do is we want to fit that range and our source minimum this is our age zero to ten and our source or destination maximum I'm actually gonna leave at one reason being is I don't want this to be a one-to-one correspondence it's like a linear response to to the age I want that to be a really ramped response so I'm gonna get a ramp parameter and going to change this to spline type and this ramp it always expects a zero to one value so that's that's why I left that's why I changed this zero to one [Music] I'm gonna call this a drip and listen I'm actually gonna call a as well that's good then coming out of this I want another fit range because I don't want my I don't want my final viscosity to be 0 to 1 I want to have more control over that so I'm gonna promote these parameters renamed them this is going to be minimum viscosity and this rain is really high 10,000 and that's the basic setup so we hop out here and what you're gonna see is a right now it's a pretty linear response you know you see your age is 1.125 you're viscosity like yeah it's just really it's like a linear multiplier and again that's what does this rant than what I want and that's also because I mind maximum viscosity is still 1 I want this maximum disgusting to be 10000 and I want my minimum of this guy Steve maybe would be 5 I don't want it to be completely non viscous but I don't want it to I want to really see a difference when I when we want we ramp this so now we're getting more viscous values the older the particles are but it's not dramatic enough let's start playing this ramp to see I think though the way that I've wrapped my head around these ramps at least at least in this example where this ramp is representing the age of a particle you kind of think about it as a as a timeline like this is the beginning life timeline this is the end of my timeline and the lighter value here is the amount of viscosity so I want my particles to be really non viscous up until about a third to a half of their life and I don't want it to be a linear ramp up I want that so like really ramp up so let's see if this is doing anything that I expected to do the other thing that I collected to mention earlier in my guide section of the flip object I have this is default set velocity I said I changed this to viscosity and changed the range just so that we could it's easier to see what we're what we're dealing with all right now these are really dark blue meaning they're very low viscosity and as they start to turn white that's gonna represent a higher viscosity let's see if they actually turn white and they should be yeah up here they're starting to go go so we can see that our age attribute when these are getting to be about two and a half three seconds word about two thousand four our viscosity our maximum is ten thousand so we've still got quite a ways to go but I say we have quite a ways to go but you know as we reach this point it's gonna the that curve is much steeper so you're gonna see you start to turn bright white pretty fast alright that's that's enough for just right now and you can see this is already looking really nice as the particles as they slow down as they get older they're really starting to solidify it's kind of looking like looking like wax that gets increasingly cooler over time and and gets and hardens up you can change the look of this mostly with you ramp you know if you want that to start earlier and you want it to take a lot longer to really really get solid you can spread this ramp out some we'll see how that looks one of the other things I'm just going to talk over this just to save some time one of the other things I did and the the examples that I rendered was I didn't want this to only respond to age I used a speed multiplier as well I'll hop in and show you how to set that up it gets a little more finicky to to adjust but it's it's something that's interesting enough to to maybe talk about and this is I think this is already looking pretty nice things you can kind of see where it's going the the fade from really basically non-viscous to to really viscous is taking a lot longer again just because we spread out made that curve a bit longer so we're still getting these kind of cool-looking tendrils that are falling down and at some point when they when they reach probably about half of their total age they just get totally solid and you'll start to see it happen over here so I'm gonna call this vs viscosity create age own life and make it cops make a copy of it I was gonna do a switch but I'll just turn it off doesn't matter all right yeah I'll have back to the beginning so it doesn't take so long and this is gonna be just costly create age and speed but I'll probably visualize it just by speed only so you can't really there's no speed you know speed attribute and and you can't access that directly but you can calculate it with one node length node if you look at the help card for this it says it create it generates the magnitude of a vector you watch enough people use in Houdini you can kind of know that if you take the length of your velocity that will give you your speed now what I need to know before I go much further with this is I need to know what my maximum speed is gonna be so just a quick way to do it just to see what's happening cuz I pumped that straight into viscosity just because I'm already looking at it in my geometry spreadsheet and so now my speed is basically equal to my viscosity and it looks like I saw an 11 in there but it looks like yeah there was a 12 or 13 for some really fast moving particles but generally it's it's around 10 12 something like that so I'm gonna get another fit range is what I want to do is I do the same thing I did with age and I want to ramp this in so I need to get from whatever my minimum speed to my maximum speed and remap that from zero to one so I'm just gonna do this at 12 see what happens we can come back and change it if we need to then get another ramp parameter I do want to change this to spline want to call this a speed ramp I label it as such speed ramp drop that in and then I want to take the same fit range gonna reuse it right now and then take this the mothers caste so now the one gotcha with this and and we'll correct it outside in the ramp what this is set up to do right now is to adjust the viscosity based on the speed so this is saying hey the faster these things go like the higher speed the higher the viscosity you want and we actually want the inverse of that we don't want the particles to be more viscous the faster they're doing I want them to go to be really non viscous until they slow down like when they collide with something then I want them to get more and more viscous so the way to do that is just to invert the values of this ramp okay so instead of going from like we did with the age this this response of like when something's really young it's also not very viscous now this is saying when something goes really slow which is this side of the of the ramp be really viscous and when it's really fast be not so viscous and again I want this to be a pretty a pretty harsh ramp so let's take this way way down here and just see what happens you can see like these particles when they're first burst they have no velocity so that's why they're getting white up here and then as they hit the surface as they collide they're also ramping into their their higher viscosity which is you know it's exactly what I want now you can play with this curve to get better looks by all means and you can also take your minimum of this gas see right now we had it at five but if we turn that all the way down to zero now these these particles have no viscosity whatsoever so when they hit you get some nice splashes even some some particles flying off the edge there to form their own droplets see this 10 those really fine tend really kind of motion and as these particles keep piling up with no viscosity colliding with the ones that that are really viscous and solid you get a really cool like splash come out of the edge and one of the interesting things with with this is that because this is purely based on speed some of these particles when they initially hit they're gonna start to get viscous but as some other particles push them around they're gonna get less and less viscous and these ones in particular that are that are flying off the edge here as they're coming down here maybe they were viscous at some point in time up here but as they're picking up speed they're getting less and less viscous and then when they hit the ground they're gonna solidify again so you get some pretty interesting looking effects with this now this is pretty sparse that that's obviously not going to mesh very well you can get dial that back in with some surface tension and also reducing this back down I'll reduce it back down just to see what its gonna look like it'll take a second but I thought it was looking kind of cool you and then I'll just keep talking while this is going the interesting thing about this is it's not it's like everything in Houdini the principal doesn't only apply to flip sims you know if you're in your pocket and you've got particles flying and when they reach a certain speed you would like them to freeze you can cheek and rive the mass attribute by by the speed or by age and you can you know you can get so many different interesting looking effects with this concept this concept is not so much different than the shelf tools that you know these cool within and these heat within objects will allow you to sort of or this melt shelf tool it's kind of the same idea and that doesn't apply to emitting objects it's but in essence it creates some nodes that will update the viscosity based on the temperature of other objects and and how they transfer from one another so when you really start to wrap your head around when you really get deep into Houdini what you start to see is that everything that you do is just attributes on points in space or attributes on primitives in space and when you can when you can recombine around that you start to unlock all these avenues for creating really interesting work so I'm gonna stop this here this is sort of this is enough to see what's happening it's not it's not so interesting of a sim but you see you get this huge splash and then where these particles have slowed down they're viscosities are really really high all right so not only can you do these things on their own let me just do this I'll just call this one speed only and then I'll do one that's both viscosity age speed I'll enable that and I want I don't want minimum discuss it to be zero someone that to be five then what you can do in here I'm going to plug this back up to the age so that my age is the main thing that's driving in and you can you can flip-flop it whichever way you want it but you can also just make your speed a multiplier so now my speed is a [Music] Strait multiplier of my age so the viscosity is going to be related to the age but then it's also going to be multiplied by the speed value so the only thing that's that sort of a gotcha this is and maybe we'll just fix it one level up I don't want my engine running and see I don't want my viscosity did ever be reset to zero I always want it to be whatever the viscosity is based on the yeah that's what it's not working I mean just do a I want a little bit off of off script here this is a little bit different than the way I set up some of my other stuff so all this would be alone and maybe but now what I'm doing is I'm taking this ramped speed and saying the minimum value that'll ever be is one which is what this these line of nodes up here that's what that's calculating is this viscosity and then I'm saying okay whatever that viscosity is up here the least it will ever be is this but the most it'll ever be is this times 10 times the speed I hope that makes sense sometimes this stuff is is really clear in your mind and then when you start to try to verbalize it it it gets muddy so I hope that's I hope that's not the case with this let's see what you got so you see our age our this is this viscosity isn't mainly driven by age and it's being multiplied by how fast things are going you I'm going to this one sent out because I think I think it's gonna look kind of nice and the my final version that I did render ended up it was a it was this setup some variation of ramps and maybe a different value in that final fit range on the on the speed multiplier but is something pretty similar and this is actually looking really nice as well it's um once you get the the basic setup of it it's kind of hard to go wrong you can get a lot of mud a cool looking stuff a lot of cool variations with just playing with a few values it's not so easy to screw yourself by uh you get something you like and cache it and then come back in and forget to make it copy or save up or something and mess with your ramps and once you once you mess with these ramps it's almost impossible to get it exactly where you were so so be careful if you're if you find something you like and you cash it out save your project or make a duplicate of your your pop-pop however you work just make sure that you're careful before you start tweaking stuff after you found something you like because it's really difficult to get it to get it right back and I ran out of ran out of RAM but this is looking great I'm actually I'm really happy with this and I might render render this version as well so actually what I'm gonna do is I will pause the recording and I'll catch this out just so we can look at it so here we go and just I think it'll play back really nice stuff going on with this combination of using using the speed and the age to control the viscosity what is it what I really like is these kinds of moments where you get the like a nice cheating you get a good splash from having minimal this guys say at the beginning and then you still get this this kind of cool sheeting what you kind of see right here I think that's my that this little at one little area is my favorite part I'm actually gonna I'm really quick I'm gonna pump this through to the meshing phase this isn't you know the meshing and rendering is not something that I'm gonna cover and this and this walkthrough but I do want to just take a look at what this looks like I should have made note of what frame that was yeah and I'm gonna want to say what I got and I'm going to see if I can fire off a red shift under while I am streaming this yeah that's look that's looking really good really really nice you know I I didn't mean for it to but it actually looks like it's like the same colors as all of Autodesk's screen their splash screens looks like a goopy Maya logo or something yeah so dye mean that's that's the that's the meat of it is you know you get you see how I leave it over there so we can I'll just talk over that you see how you can set up all inside adopts just with simple tools that probably most Houdini users are really familiar with inside of a pop you can grab attributes like speed and age and really anything you can think of any any attribute this is available to you inside daps you can manipulate that within a botnet and pump that into your viscosity and and get some really interesting looking effects so thank you so much for for checking this out I will make this this project file available on Gumroad I'll have a link to that where it's easily what's easy to find I'm really just getting started out making these tutorials I hope that people are finding them helpful maybe I'll do I'll say this if I get a significant increase in followers on our subscribers on on youtube or or followers on Vimeo I'll unlock the this project file on Gumroad maybe that's an incentive for to get some new followers and key and honestly like the more feedback I get it's easier for me to keep going with this stuff if I find that this you know if I find that it's useful it's all for continuing to put the time into it but it does take a lot of time so thanks so much for watching you can check out this and my other tutorials on Vimeo YouTube I try to put stuff out on Twitter and you can check out my website what I found net you'll find links to all the social sites there so you can stay updated I'm trying to add more content to that tutorials tips tools that I create or find and I'm also gonna start using that as sort of a dumping ground for for links to resources that I've found really helpful through the years so please check that out let me know what you think and thanks again for watching
Info
Channel: What I Found
Views: 41,568
Rating: undefined out of 5
Keywords: houdini, sidefx, 3d, simulation, sim, flip, flip sim, houdinifx, cg, cgi, vfx, motion graphics, gfx, mograph
Id: g6DhhbGh1tI
Channel Id: undefined
Length: 29min 48sec (1788 seconds)
Published: Thu Jun 04 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.