Houdini | Adhesive FLIP Simulations | Masterclass

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
foreign [Music] I'd like to go through a technique that allows you to take a flip simulation and have it cling onto the surface of an object in other words I want the water to stick to the object and kind of roll around the various features of the water fountain if we take a look at reference we'll find that in the real world this is exactly what happens water doesn't just go off the surface of things very easily if it's moving slowly it's going to try to wrap itself around whatever shapes it encounters so we'll start with reference and then I'll show you a few techniques of how you can go about that and last but not least if you enjoyed this quick tip then be sure to check out my course fluids1 at cgforge.com let's dive into the reference so here's some reference from The Real World we have a beautiful Rock Fountain which was filmed by the fountain Guru on YouTube he has a lot of fantastic Fountain reference if you're interested in that and uh well let's take a look at the behavior here if we were to picture this as particles we can safely say that a lot of this behavior is clinging onto the rock if we were to take a look at the movement of the water some of the particles are falling off of The Rock and away from the surface but a lot of them are sticking to the Rock and if we take a look at the rock found at the bottom left hand side we'll notice that sometimes the particles will cling onto the rock it'll wrap around underneath a little bit and then it will fall down with gravity on the underside of The Rock so in this situation getting the particles to stick to the surface is going to be crucial for getting what we have here in our reference inside of Houdini I have this Fountain and I've already sourced in everything we need for a basic flip simulation if you don't know how to do that then definitely check out fluids1 because it's kind of a lengthy conversation as to how to set up a basic flip simulation but essentially what I have is I have these polygons that are floating here in midair we can see it better if I do this sort of thing these guys are going to emit particles and that is going to be the basis for our flip simulation so in other words I just isolated a few areas where water spawns and I want it to like a fountain would make water and then behave like it should so we do that we bring it into a dop simulation right here and if I was to do a play blast without doing anything special or fancy just the default settings we end up with something like this so the problem as you can imagine is that we don't actually have these particles sticking to the surface right these particles are flying off of The Edge and they're not wrapping around like they should we could see this very easily in this section right here where that bolt curves around you can imagine that the water just like our reference would actually be flowing along the surface there so that's the problem how can we fix this I'm sure that many of you watching are Savvy with Vex so your first instinct might be to throw down a point vop or something like that to basically create a custom Force taking the point closer to the Collision so let's draw this out and figure out the sort of things we're going to run into with this situation so if I have a point let's say and I'm exaggerating here but I have a point and I want it to search for a cluster of nearby points and I want it to go in that direction so the first thing we'll recognize is that we don't want to do this to all the points because if I have a droplet that's way out here I don't want the force impacting a droplet that is away from a certain threshold from the surface so that's one thing we need to think about right we need to build in some kind of way to uh prevent that situation from happening we only want the particles near the surface so that's one thing but let's say that we had a particle it's right here and it's going towards the surface here of the mesh okay well that particle is going to hit that Collision object and by default guess what it's going to want to bounce off that object and the further we turn up that velocity the more aggressive that bounce is going to be so we need to also have a way of changing the physical properties of these particles so that they will not do that however that's going to come at the cost of not having as realistic motion when water hits a flat surface like let's say down here and it's supposed to bounce up these particles are supposed to Splash out and create droplets right and so unfortunately we're going to lose that ability to have the droplets bounce off the surface if we remove that bounce attribute so that's not quite ideal either in this situation another thing to think about here is the fact that when we take a particle and let's say a particle is near the surface like right here in the middle and we have this Force that's trying to keep it stuck to the surface ignoring the bouncing issue here for a second let's say that that particle is really trying to cling onto the surface that's going to impact the way in which gravity affects that particle and it can look really unnatural if we have too much of a force having it cling onto the fountain and not enough Force pulling it down like what would typically happen with gravity so we also need some kind of way to have a force compensating for the fact that that particle is sticking onto the surface to make it look natural so as you can see this situation at first glance appears like something simple but actually has a lot of little things that can trip you up so instead of doing all of that there's actually a much much better way of doing all this and that instead is using this gas stick on collision node we're actually not going to use anything on the particles we're going to use volumes in order to control the movements and behavior of this whole thing so instead of building the Wheel from scratch with vops the wheel already exists we just have to go through our gas nodes and magically all of our problems are solved this is when it's really handy to to know your notes because all of that functionality I just talked about is here in this gas stick on collision Dot so what we have here is basically what I just talked about the scale right here is asking us how closely should it match the Collision velocity of the Collision velocity volume if you're not sure what that means then check out my pyro courses where I talk about Collision Fields And Collision velocity fields but basically put that is saying instead of applying a force which relies on collision calculations to push it back where it should go it's trying to find a force that's just uniform surrounding the object and trying to match that Force so for all intents and purposes as you turn up this scale it's going to stick more so to the object the max distance is asking you how far away from the surface is this Force allowed to go and so we can do this in meters right here or we can take a look at the VDB cells and figure out how many VDB blocks away from the surface to have this occurring so that's the max Cells versus the max distance right here heck we can even have both of them happening right here as a way of determining where this goes the bias is going to determine how quickly this effect falls off as we reach the maximum influence so in other words as we reach the max distance here of 0.05 meters this force is going to become less and less strong but it's going to be really strong right at the surface here so that bias lets you control where that falloff occurs and then the normal scale and the tangent scale are here to control that issue with gravity that I was talking about so especially when it comes to the tangent scale this is going to allow us to bring back that gravity effect and prevent the particles from just sticking onto the surface and not moving down naturally with gravity like it usually would so there you go that's basically all we have right here in these parameters let's check out the default settings and then I want to adjust this to show you what it looks like when we turn this to a more dialed in situation oftentimes when I'm dialing in these settings I like having a side simulation with simple geometry to figure out exactly what I'm looking for because sometimes it helps just to dial in in the settings that you like and then go to your main Sim and apply it there so anyway we have flip and we have a sphere this is the default Behavior with no gas stick on collision happening so this is no clinging whatsoever now let's take a look at what happens when we turn on the default settings for the gas node and now as we can see we have a much much better result this is way more natural to what we saw in our reference because it's sticking to the surface and it's giving us a more natural looking Behavior towards the bottom here however in my opinion I don't think it's sticking enough and on top of that we do have the issue of these particles appearing to slow down in the last reference we had the particles were going pretty fast due to gravity but because we are sticking to the surface now it's going to slow these guys down and it almost makes it feel like a slow motion water effect so let's start adjusting some of these parameters on the gas node the first thing you'll want to do is figure out the scale and the max distance the normal scale and the tangent scale are going to rely on these two parameters right here so it's best to start in this general direction the first thing I'll do is I will take the scale up to let's say about 0.5 we want more of that sticking Behavior to occur we already determined that but I also want to focus on this max distance and one great way to figure that out is to make a box and we're going to template that box and set it to whatever that distance is like let's say 0.05 once we have that we can visually see exactly where that is occurring so looking at flip here as we approach the surface this is when that Force begins to occur about that far away from the surface visually I think it's a little bit much to be honest with you so let's take that and instead set it to .025 because if we were to think about what happens in the real world we wouldn't have that sticking Force happen very far away from the surface so I like keeping this at a smaller value and then relying more so on the scale to keep things on the surface another benefit of having a smaller radius away from the surface is that it allows more droplets to occur so if something bounces it more easily escapes the influence of this effect which is good so let's do that .025 and we will go here 0.025 and before we start doing the bias and the normal tangent scale let's do a play blast of what that does and here we are so I do like how it wraps around the fin right here that to me seems more realistic and we got that by turning up the scale now this is again just getting very slow in areas along the back so we can adjust that later but one thing I'd like to do is turn on the bounce as well as the friction attributes or the friction physical properties on the particles because by default a flip simulation does not use bounce or friction so you have to turn those on manually to do that we can go to the flip solver particle motion behavior and say use friction and bounce and then to adjust that friction and bounce we go to our flip object properties physical we then go to our bounce and we can turn this up to let's say 0.5 or if we want Dynamic friction or friction we can adjust that here as well so let's say at 0.25 on the friction a little bit of Bounce and let's see what now happens when we do another flipbook of that and now we have this we'll notice that this begins to look like a very viscous fluid even though it's not viscous and we also have more defined shapes when the water falls down along the sides here which I believe would be more accurate to what would happen in the real world we do lose detail but I do think this is more realistic so in general I like having a little bit of that friction and bounce now as for the bounce we're also not getting these splashes going up but we are getting more body to where the fluid accumulates so for that reason I like having a little bit of that bounce just to have that body there to the the fluid and a little bit of friction just to get those shapes occurring so let's stop this I'll go back here to the flip object bounce at points let's say five I think that was good uh the bounce forward's fine friction 0.1 Dynamic friction scale 0.5 and let's see what this does okay and that looks great let's now move on to the normal scale and the tangent scale to get this looking less like a viscous fluid and more like actual water if you're like me and you need to visualize things to understand them this is what we're talking about when we talk about the normal versus the tangent let's say that this portion right here is the geometry okay and let's say that we have some water here in the blue going along the normal so we have a droplet right here and it's going in this normal Direction when we affect that normal scale we're affecting the velocity that's going this way when we affect the tangent scale we are affecting the velocity that is going this way which in the case of our particles if they are falling down with gravity along the tangent then that's what we want to speed up in order for this to look like gravity is acting normally right away you'll notice that we have something strange happen when we turn up the tangent scale so let's say that I want more velocity heading in that tangent direction right you would think to turn up the tangent scale because we want more velocity heading in that direction so if we overdrive that to a value of 5 and we go forward we have the slow motion effect now happening to our particles and this doesn't seem to make a whole lot of sense actually because of the fact that these particles should be outside of the max distance and yet they are still being affected by this tangent scale plus as we turned up the tangent scale it slowed down everything so it's kind of having this opposite effect that you would intuitively think so this is where I think the developers might have been a little bit sloppy in how this was all built basically the tangent in normal scale is inverse what you would intuitively think and this bias is going to impact particles outside of this max distance so if I take this bias to 0.1 as an example and I go through this whole thing again we will notice that the particles speed up and they are less affected by these values here and they're still affected by but they're less affected by it and then once the particles hit the surface that's when these guys really start kicking in so we could see that happen right it goes down it hits the surface and then it starts slowing down because we have a high tangent scale and just to exaggerate this a bit let's say the tangent scale is at 10. we go ahead and press play it does not affect these guys as much at the top because our bias is 0.1 but as soon as it hits slows down these particles quite a bit and then it breaks and starts freaking out like right here so you can't go too crazy with that tangent scale I'd say a value of 10 is beyond what you should do for something like that and it's something to watch out for and if you do want more of that cohesion I think it's better to use the friction parameters instead of a high tangent scale however we can say that a bias of 0.1 is great because we don't want to affect the particles out here as much so that bias of point one is awesome let's see what happens though when we turn that tangent scale down to let's say a value of 0.1 so we'll make this a very small value instead of a large value what does that do and now we're starting to get somewhere closer to where we want to be this now actually goes faster along the tangents which is awesome it's probably going a bit too fast to be honest with you so we might do 0.2 instead of 0.1 but there you go that gives you a really good sense of what this is all about so real quickly let me also bring back the tangent scale set that to 0.5 or 1 which is the default and let's see what happens when we overdrive the normal scale and then when we turn the normal scale down here's the normal scale at five which is actually getting us closer to what we want the force going towards flip is less so that means the tangent force is having more of an impact right here's what it looks like when the normal scale is at 0.1 and now this is the normal scale at point one less of an effect less of a noticeable impact like it was for the tangent scale however in theory I suppose this is supposed to increase the amount of direction towards the surface so finally to wrap all this up what I'll do is this normal scale will go up a little bit that got us closer to what we liked the tangent scale if we turn this down that got us closer to what we need so I'll say 0.5 and with this combination let's see what happens and now we have success if we put that on the fountain we end up with something like this and we're good to go anyway there you have it guys that is the gas stick on collision it's a very very important note not only can you use this for flip simulations but you can also use this for pyro you can use this for creating interesting magic effects this particular node is very useful and not talked about as often as it should so if you guys enjoyed this quick tip be sure to check out fluids1 at cgforge.com I have over six hours of high quality content just like this on the topic of fluids and if you're interested in anything else as a beginner in pyro I have you covered there's all kinds of things to learn at cgforge.com thanks for watching I hope that you have a great day and good luck with your flip simulations [Music]
Info
Channel: CG Forge
Views: 15,060
Rating: undefined out of 5
Keywords: houdini, sidefx, sidefxhoudini, houdini tutorial, vfx, 3d, vfxartist, 3dartist, houdini video, houdini flip, houdini water simulation, houdini fluid simulation, houdini particle fluid, houdini liquid simulation, houdini liquids, houdini vfx water, houdini stick water, houdini water cling to surface, houdini fluid stick, houdini liquid stick, houdini gas stick on collision
Id: gOgtdIk0QiI
Channel Id: undefined
Length: 21min 59sec (1319 seconds)
Published: Mon Nov 28 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.