Houdini 16 Masterclass | FLIP Fluids

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to the Houdini 16 master class for flip fluid simulation in his master class we'll talk about several features we've added to the new version of Houdini and go through some examples of how you might want to use them and some things to take into consideration when using them the features that we've added are this idea of a water line which gives you a semi-open boundary of the volume limits so originally you had other closed or an open boundary and fluid could either flow out of the boundary or it would be completely blocked as if it was a glass wall we've now allowed the ability for you just set a line at which things can exit gracefully and you below that line the fluid will be contained at that boundary we've extended this further with a boundary layer approach which allows us to not only have these semi open boundaries but now we can assign velocity at these boundaries to get inflow and outflow velocities are quite useful for much larger simulations like oceans where we only want to simulate a small region but we have the velocity of the ocean that we can bring in at these at these walls it also allows us to maintain the appropriate surface geometry so that we can have particles flow into the simulation if we want to have something like like waves for example this place really well into into the oceans although that's different master class it's important to mention that some of these improvements for the flips fluid simulation are quite useful for oceans in this master class we use the boundary layer approach to construct a river and controls inflow and outflow velocities as well as maintaining the water level of the river throughout the simulation we can take this even further and upper edge a section of the river by applying the pre-baked low-res simulation at the boundary layer but this approach our up-res River matches the flow rate and water level of the low-res simulation with even richer detail we've also added new effects like surface tension for example that allow you to achieve crown splashes or dripping faucets and then see this implementation for surface tension extends to what's a really interesting tools are suction fluid tool that we've added in our particle fluid shelf that can direct fluids towards an object and can be moved around in an animated object or so some interesting examples there finally we've made some improvements to our viscosity solver that gives artists more direct control on how fluid flows when in contact with the collision typically viscous fluid just sticks at the collision and we've allowed you to have more control over that where you can control how much it slips at the collision and that allows us to also create some some interesting effects as well all right so let's dive right into the water line example here so I've created a pool that is just basically from the flipped tank with a few changes I've added an emitter from the MIT particle fluid shelf tool and give it some downward velocity to create a big splash indeed we get this nice big splash that eventually comes in contact with our volume limits you see that we we get some wash up at the glass wall here right at the volume limits it's not super obvious but you can kind tell that there's a boundary there it becomes more obvious as the simulation continues because we start getting reflections back into the main part of the simulation and then back against the wall so we get ripples that show up along the wall here that travel and then this becomes really obvious that we're getting a lot of rock back and forth from our initial splash now if the scene we want to capture is inside a glass wall inside the aquarium for example though that's great this looks good this is nice but it's possible that we want to maybe capture this type of splash in a much larger pool and we don't want that type of wash up along the walls now we could extend the boundaries to have a much bigger pool but that just means the ripples have longer to travel but they'll eventually come back in so we have to make the pool big enough that the reflections never get back into the main part of this the scene by the time our scene is finished but I can be quite expensive for you might not want to simulate a pool that is that big so we've added a feature to handle that in a flip solver tab so in the flip solver node under the volume motion tab line limits tab inside of that called water line and this converts our closed boundaries into partially open boundaries so if we visualize the plane here anything above this plane along the boundaries is considered open so the fluid can freely leave anything below this is considered closed and the fluid is contained so I want to move this down to be at the same level as my fluid there we go and I want the direction to be pointing upwards I can change the direction and angle this plane if I want to and again anything above the plane it's going sidered open and can leave it anything below is considered closed and is contained but for this example we'll just keep it flat so let's run this again we get our big splash okay that's great and it gets right to the limit and as it does see that particles start disappearing they're not keeping along the glass wall like before we're also not seeing a huge amount of water forming up along the wall because it's allowed to freely exit the simulation now you see some of the particles are leaving and the level is dropping down when we get this wash back it's not nearly as energetic as before if you recall it washed all the way up the walls last time this is substantially attenuated we do not have the same reflection issues that we had in the previous example so this does really significantly reduce the amount of reflections we get inside the simulation and it's a lot easier to mesh this with a extended pool and make this look as if it's part of a bigger simulation or a bigger you know pool or whatever you're trying to create or if you wouldn't have been able to achieve this before using just the volume limits it would required a much more complicated setup with maybe collision volumes and other type of geometry okay that's great but we notice that there is some volume losses not quite even not quite at the water level there's certainly dips here it does look like we've lost some volume certainly in in smaller simulations this becomes really apparently obvious and we can address this using the boundary layer option so the boundary layer is a much more advanced version of water line if we turn this on we get several options for starters we have a padding control so around the volume limits how thick do we want our boundary layer to be in this case it's one meter that can be set to whatever you need to just remember to keep in mind the voxel size so for example what is your particle separation grid scale and is your boundary layer actually big enough to do anything and inside of that boundary layer we also have surface volume and velocity volume now this is important before with water line things would hit the glass wall the volume limits and it would either be able to leave or it would have to stop because it's hitting a collision now with velocity volume we can change that we can have the velocity create inflow or outflow velocities so we can actually have scripted velocity at the volume limits where it wasn't possible to do that before and that's strictly enforced that the velocity at that has to be conforming to whatever is input through the velocity volume the surface volume allows us to control the geometry in the boundary layer padding so for example we don't have a surface volume connected here but we have water line so this says anything below the water line is going to constantly be receded within the padding anything above the water line is going to be completely deleted because it shouldn't be there this is trying to maintain the boundary geometry to match some maybe extended scene that you want to create now this is used heavily in the ocean tools but that's going to be discussed in a different masterclass so for the moment we're not going to wire anything in here and if you don't have anything connected it defaults to use the water line and so the water line takes control of the boundary layer if there's no Super's volume connected so we run this splash we notice that we actually lose particles quite a bit sooner and like I said before anything that's above the surface in the in the boundary layer gets deleted in anything any empty space that's below the surface of the Evangel air just gets receded so we can maintain the water level in this case it seems a bit abrupt but this would be the same sort of thing you'd see at the glass wall with a normal water line this allows water to actually flow back into the simulation because if there is a if there is a dip which is see along here the actual boundary layer can can allow particles to flow back into the simulation so we can always maintain the water level by having this this boundary layer set up so let's take a look at that again let's let's watch that notice how we don't really see a whole lot of reflections going on here like we did before because the boundary layer takes in some of the velocity that comes out of of our motion here and when there's wash back where we noticed that we were sort of losing volume the boundary layer supplies the particles necessary to wash back into the overall simulation and it's it romanians quite flat we don't have the same problems that we had before now there will be some seam issues that go on like it's obvious that there's a boundary layer here because it's quite abrupt you know but that's something that's going to require you know adjusting in your particular in your particular scene but what's really important to take away here is that as the as the the energy of the simulation goes out into the boundary the boundary layer absorbs some of that it changes color it it gets some of the velocity and then as there is some backfill here the particles are allowed to rush back into the simulation you would sort of expect this in a much bigger pool that that you would get wash in and out if this was if this is much bigger so we do get the nice big middle splash we wanted but we don't get a whole lot of the reflection wash back that we would have gotten if we didn't have any of this at all we don't lose the volume that we would have lost if we had the water line only activated and without the boundary layer so these are pretty useful tools for for maintaining this sort of continuous of this continuous tank type of appearance this can be used for much more complicated things like getting an inflow outflow velocities from oceans and being able to maintain you know the overall ocean volume and and appearance but again that's discussing a different master class but we can use this to drive rivers and even reefs in rivers okay now that we've seen that the boundary layer is useful for preventing reflections let's move on to something more complicated the boundary layer is much more advanced we can control the boundary geometry that is not just the water line and we can control boundary velocity that's not just zero we can actually provide volumes that prescribe how the velocity at the boundary should should be should behave so let's dive into our River geometry here first and just see what we're looking at I'm going to turn off the particles right so pretty simple I just added some noise to couple boxes and nothing fancy turn that into a V DP through the collision source and so we have a volume here we want to create the actual the actual geometry itself for the fluid so we have a box that sits sort of inside the river and create that so I turn it into a volume and then do a simple boolean on that volume boolean that is we get a volume that looks like what though the water should be along the stretch of the river okay so we can use this this null here and wire it into our flip solver to initialize all the particles and start the river but we want to maintain the river level over time and the boundary layer allows us to do that because we can prescribe what the surface should be at the boundary layer and we can prescribe what the velocity should be again at the boundary layer through those source and velocity volume connections so on this side we create some velocity volume by creating vector we give it some initial flow rate so three meters per second and we make sure that it matches up to the size of the box and then we have some some velocity that we can you can pass through okay let's just dislike to display right so let's dive into our actual flip solver so instead of having our water line turned on as before we have that completely off we have our used boundary layer we've made the padding quite a bit bigger because this is a substantially bigger simulation than the last example so we have four voxels in our sorry um four meters in and on both sides we only need the X in this case because this is along the x-axis we don't care about the Zed padding because there's no inflow outflow on this edge and there's also no inflow flow on the Y's either so yes we can set 4 for the x-axis limits and we can leave everything else on alright as I said before if we want to maintain the overall level of the of the fluid we want to wire in our geometries at the boundaries and what we want to sort of maintain over time now this is not animated at all this is just a static box but you can add animated surfaces that get wired in here and we will do that later also we've wired in our velocity so now at the wall and within this this padding we are going to apply whatever velocity we bring in here so in this case it's just a straight three meter per second flow in the X direction and finally we have this apply boundary tab which we didn't look at in the water line example because there was no velocity to apply it was just a zero velocity because we're assuming to stay a static pool in there sort of the infinite space outside of it so if you have the apply boundaries activated then when a particle gets receded in the boundary layer it gets assigned the velocity from this velocity volume if the apply boundary velocity is turned off it then interpolates the velocity from its neighboring particles so by having this on over time it constantly says these particles should get closer and closer to matching the velocity volume and it may not directly have all the velocity because some particles from outside of the boundary layer could flow in but new particles that get created do get assigned the velocity volume and add this add the actual strict boundaries it is apply sorry it applies the velocity volume onto it so that is strictly enforced the volume inside the padding is semi enforced when this is turned on and then completely not enforced at all if this is turned off but again at the volume limits this is the velocity volume is always applied and that's really what gives us the majority of the control this is something that you could use if you want it to be more consistent with with the boundary but it's it's what is essential is having the volume limits itself okay so at this point we've set up our geometry inside the river we have the collision volume to keep everything in the river we've wired in our volume velocity so it's going to flow in the X direction it's going to come in and leave here just the same as we saw before with particles being able to leave the simulation or flow back in the level on either side is going to be maintained by the surface volume and it's going to be maintained within a four meter padding on either side one last thing we initialize this with a velocity right out of the flip object giving it the same matching velocity from the velocity volume you could directly add in a particle field that has velocity on it if you wanted to but this is an easy way to achieve this effect all right so that's basically it that's how you create a short river there's nothing too complicated with this it's using the boundary layer quite simply and we're able to get a continuously flowing river in doing so okay so let's take a look at the river as it starts to bake in so the initial velocity was just simply in the x-direction right that's okay but over time that's not going to be sufficient but we see that we actually get a nice looking river flow taking fold here get some turbulence going along here this is great the overall flow is relatively steady because we be able to control how much we input and we're able to control how fast things actually flow out of our simulation - which is really really valuable that's something that you couldn't have done before and people just leave the river open-ended here and let it flow out but that really affects the overall simulation we want to make sure that we have a steady flow through the whole region here we don't want to have part of this to sort of flow out the back end we can plug both ends by setting up this boundary layer and what really is valuable and powerful about this tool is that now that we have a relatively nice-looking River going on here a couple million particles we can come back in in just chunk out a small region and up-res this because we've been able to simulate this part and we have the ability to enforce velocity at the volume limits we can enforce the geometry at the volume limits we have everything we need from this simulation to come back in and control a a small area and uh present and potentially change what's going on inside the actual simulation okay so now that we have our full River simulated we may want to go in and change things up like say for example we have a shot here and we want to add a flipping tourists through our River now we're zoomed in quite a bit compared to the overall River and we want to get much higher resolution detail in this section but we don't necessarily want to simulate the entire river you can imagine by something out that's a huge amount of River that it's just not captured at all in the shot so if we increase the resolution here we would have to increase the resolution of the entire river and that can become very costly and we may not want to do that so by using the boundary by using the boundary layer we're able to get around this problem by loading in two previously baked out geometry so the the surface volume of the full river and the velocity volume of the full river and bring that into this simulation and set our new boundary layer as those volumes so in the source fluid here we do that we bring that information in and we do it through this file stop here which wire's up to the geometry that got baked out from the previous simulation we apply glass here so that we make sure we only have the surface come through for the surface and the velocity terms come in for the velocity and so we can wire these indirectly to the flip solver in the boundary layer section also we need the initial particles to wire into the flip object so we do a simple points our volume and then volume sample in the Wrangell here to get the velocity onto the particles we could wire this in before we brought in just the surface salt but in this case we have the initial velocities as well because that will allow us to get away with less pre-roll let's dive right into the table network in the flip object here we've wired in the initial particles and we have the input type of particle field so that's that's going to bring in if the particles and the velocity on the particles which is nice because we can start off with the right velocity okay in the flips over here we've decreased the padding a little bit that's because we've increased the resolution so we don't need the padding to be nearly as thick so 2 meters with an increase in resolution ends up being about as many voxels the surface volume here instead of being instead of being the the flat object like I said it's this reference surface a reference velocity so the the incoming geometry from each particular frame from the full river so we should see the flow into this simulation matching the flow rate of the original river because what's actually being fed into us is that information so this concern about no matching appearance and matching flow should be addressed in by wiring in this into the boundary layer so let's see an example of this so in this flip book example ended up zooming out the shot a bit to sort of make it clear where the boundaries were for the inflow and outflow padding of the boundary layer you wouldn't want to actually capture that shot in reality but for demonstration purposes it's good to be able to see this here so this simulation has about 12 million million particles whereas the full River in the previous example had a couple million particles this is quite a bit higher resolution and we're able to interact with the torus here as it splashes around and we see very high-resolution detail around the splashes that just wouldn't have been able to be captured in the in the previous example see that yes indeed we can actually reached in this river this looks quite nice we get a continuous flow as we as we just quickly scrub through here we see the the turbulence along the side of the river we get this continuous flow through here the inflow so we get turbulence or the inflow here which is what we will to achieve bye-bye wiring in our pre-baked lower res River we see very high-resolution splashes throughout here and this gives us a a a nice high-resolution piece of our River we do see a small amount of the boundary here we see a sliver but this is hard to avoid because this tors really changes things by splashing around and by you're blocking part of the flow it's not going to match exactly and it's going to be very difficult to try and get this to match especially if you go and change things substantially in the shot but what it does do very nicely is it controls how much of this of this fluid flows out of our simulation because we can enforce at the wall the velocity we can limit the degree twist this is just going to flow out we didn't have this here at all a lot of this water would just rush through and we wouldn't be able to control that so yes although some of the same shows up it's not dramatic enough that it can't be cut out of a shot and so this is quite a valuable tool in that we can plug the front of this simulation within flow and we can plug the end of the simulation without flow and we can reach him in this area quite nicely with the splashing object and without of course the penalty of having to go and do the full River of course there's a natural question if this is a straight river what if I want to have a banned river and that becomes a bit more tricky because the boundary layer is naturally meant to be applied directly at the walls of this fluid simulation and the volume limits of the fluid simulation are inherently a box if we wanted to do something tricky like having a bent river we would have to do something more complicated and I'll get into that next in Houdini 16 we greatly improved our surface tension effect and it allows us to do things like create crown splashes and even is the driver for a suction fluid but before we get into some of the more exotic effects that we can achieve let's focus first on on what exactly surface tension is so if I turn this box here into a flip object and decrease the particle separation perfect have a nice little fluey box and I'm going to make this just float in the air and run this nothing magical happens we get a bit of receding but there's really nothing there because there's no forces acting on the box the surface tension is a force that acts on a fluid object based on how quickly the curvature changes so for example the box here at the corners and the edges have a strong curvature change whereas a sphere for example is constant curvature over the whole area so as sphere shouldn't experience any surface tension forces at all based on the fact that there's no curvature change but our box for example does have some quick changes in so we would expect to see some forces on here if we enable surface tension so let's do that we go into our flip solver volume motion we've added this surface tension tab here and click enable surface tension and this value might be not strong enough exactly to get the effect we want so let's turn it up a little bit more and indeed we see something happening to our box now so let's rewind that and our box has these sharp corners like I mentioned that get pulled inwards as the surface tension forces act so all these corners you saw here they all get pulled inwards and as they get pulled inwards the out of the flat parts of the box actually get pushed outward so let's rewind that again the flat section here that doesn't have any curvature that shouldn't experience any forces ends up actually getting pushed out that's because the surface tension force at the corners here pull in and the pressure projection inside the flip solver says I can't shrink my volume I need to maintain volume somehow so I have to push out in other ways so these phases here they don't have any inward surface tension force end up getting an outward pressure force and so they get pushed out and so you actually end up with a sort of an opposite of the box which forms this sort of this diamond so every corner that gets formed now was a flat face in the box and then those of course have forces that now pull it in because there's a curvature change and we get close to our original box shape as a result so we end up with this ripple back and forth and this is all caused by the surface tension forces but so for a box you know it's kind of unrealistic you'd never really see this in in a real situation but it does this nice sort of ripple back and forth and this can end up creating really cool effects when you end up getting ripples along the surface of a droplet for example so this also plays a key factor in creating something like a crown splash which I'll get into next okay so this setup is very similar to the water line example that I showed before the only difference is that I've enabled surface tension I've so here I'm enable surface tension I've changed the sploshy kernel to swirly kernel it does a better job at having nice flat and smooth surfaces as the as a crown splash is created it's not as noisy and turbulent and so it's it's preferred to have this really kernel activated and I've also decreased the particle separation and one thing that that might be valuable is to actually decrease the grid scale here you might find that the effect you get is a little sharper it totally depends on on the effect you're looking for if you want sort of a more bulky fat crown splash or a thinner more spread-out crown splash the grid scale can can have an impact there as well and one thing that's really important to to note is surface tension can have stability issues it is possible that stuff in your simulation moves too quickly for the resolution and if you start to see things look really turbulent and unstable you might want to consider going to the sub step tab and changing the minimum sub steps to something quite a bit larger this very likely is is a place that can solve a lot of headaches force for very small scale simulations where the stability starts to become an issue so let's just run this example here and see what we get and this has the same downward velocity as the water line example but the splash does not come up nearly as high and this is due to the surface tension strength it pulls down as this splash is forming because as I showed in the box there's opposing forces when you have sharp features with a large change in curvature so this splash here starts to fold outwards and we get this this thickened rim around the top which is what you'd want from a crown splash we have nice ridges that are forming which is also nice that something you'd like to get in the crown splash so this is a good starting point certainly not a finished example but very easy starting point to create a crown splash and this can definitely be be pushed a lot further which with much higher resolution examples which I'll show you that next so this is a much higher resolution version of crown splash the particle separation here is quite a bit lower and we're really able to achieve nice results through this we see the thickening up at the of the brim so you can really achieve nice features through this method as I pointed out before we have the thickening around the the rim which is what you tend to see with crown splashes we have droplets forming and shooting off we have a nice continuous re we have a nice smooth sheet that forms that that shoots out some of the droplets you have have very nice ripples on them for example this oscillating droplet here we get the the single splash in the middle that forms and the droplet comes out of there as well right so with a simple addition in the flip solver but you know activating the surface tension you can create these effects quite easily it may require a little bit of tuning some of some of these parameters to get the right look but the way the surface tension is is handled in the flip solver should should set you up nicely to get quality shots like the crown splash that I demonstrated if you do find that some parts of your surface tension simulation get a bit noisy we've added this this blur here so you can globally blur some of the area so this will smooth out the the change in curvature if you notice that you have too much turbulence if you have a location of too much turbulence but you otherwise want to leave the rest of the simulation untouched you can apply a mask here that only blurs in certain regions so it gives you a lot more control over how the simulation is handled and where you you may want to clean up certain parts that may look too turbulent in other places that are nice and smooth so to assist you in setting up a crown splash we created a shelf tool here crown splash particle fluid which sets everything up for you it does it in a way that that's higher resolution than this to achieve a nice result and a good very good starting point to maybe move into a very high-resolution simulation but these are good starting points with all the settings you're pre tuned for you to use so this is an example of the crown splash shelf tool the size of this block is quite a bit more dramatic than the previous example and that has to do with the down with downward velocity of the droplet the surface tension strength and the size of the pool those are all factors that play into the overall appearance of the crown splash but in this case we definitely see that there are our thickening regions around the tip of the crown we do have the nice ridges that we expect to see and your tendrils forming that will break off the create droplets depending on the look that you're going for it's it's up to you whether you want to have a much more since the thick and shorter splash this is totally a a sort of a parameter tuning example the surface tension strength that I had relative to what was going on in the previous example definitely was a reason behind why we saw the splash only coming up a very small amount we've also added a another feature in the Shelf tool to use the sort of tension model and this is this drip particle fluid so the surface tension is nice for crown splashes but it's also useful to make sort of faucet like like drip behavior so in this case we have a sphere set up as an emitter through the source volume here and sort of attention enabled and the surface tension is strong enough that it prevents this droplet from really just falling downwards if we turn this off you would see just a stream straight down but the surface tension doesn't allow that to happen and it pulls back and forms this droplet so it's fighting against gravity at some point it gets heavy enough that it starts to break free and we eventually see a bifurcation so at this point we notice that there's a pinching off that's about to happen and a topology change here where this tip is going to be pulled back because the surface tension wants to correct for that that curvature there and breaks apart and we end up with this droplet being completely separated from the rest of the stream and as this droplet starts to fall we notice that there are some ripple motions that that occur within their droplet itself and this is very similar to the Box example that it showed before where we end up with droplets that have rippling that is caused from surface tension the simulation continues on and droplet start to form as the surface tension pulls apart and creates these these individual pieces so depending on on what type of effect you're looking for the speed of which particles come out of the emitter will have an impact the strength of the surface tension will depend or will have an impact on how things break apart even setting the the grid scale can actually have an impact on when these these parts pinch off because the the particles that are inside of a particular voxel form the surface and the surface is what is computed for the curvature so all these things are tied together and these are parameters that you can play with to try and achieve the particular effect that you're looking for one thing that's worth noting that is in the drip particle fluid and the crown splash particle fluid shelf tools is that we've changed gravity we've reduced the strength of gravity so that we can get a slow-moving small-scale effect for the simulation we've also gone in and change the substeps as well so in this case I have the minimum of five sub steps and a maximum of six sub sets this is important to maintain stability if I were to reduce it the sub steps I would quickly find that this fast-moving droplet moving downwards here becomes unstable when when these parts break up break off and that is not going to achieve the effect that we want so we need to move the increases sub steps if you wanted to achieve something even smaller scale for example if you want to reduce the size of this admitting sphere here and correspondingly reduce the particle separation you would find that it gets unstable quickly and you'll need to increase the substeps as a result this is largely due to the fact that surface tension has these instability problems built into it and typically surface tension examples are done at a small scale so this tends to be costly and it tends to require a lot of sub steps to be able to get the right look unfortunately but the wonderful thing about surface tension is not only that you can do the crown splash or the this drip simulation but it even extends to things that aren't even necessarily a physical phenomena the actual implementation of surface tension has led us to this really interesting phenomena that we created here called the suction fluid so let's get into that so the suction fluid feature that we've added to the m16 extends from the surface tension implementation that we added and it's a pretty simple concept the idea is that the surface of the fluid here that we have is a certain distance away from this target object so maybe at the bottom of this object it's half a meter away or so and the amount of distance that it's away is the replacement force for surface tension so instead of the curvature that we discussed before the force that we apply or really it's the pressure at the surface but we can think of it as a force is how far away the surface is to the to the object and that drives the fluid towards the object so to use the self tool that we've added so we click on that click on the object press ENTER and then select the flip fluid we want to apply this to and it drops down a few nodes so the main parts are this anti-gravity node here which is designed to oppose gravity thus the name antigravity the idea is that around the object we don't want to have gravity pulling the fluid down if we want the suction force to be pulling the fluid up we could increase the suction force to just completely overwhelm gravity and not that have any effect just because the suction forces is very strong but that starts to become unstable we get a lot of oscillations and it doesn't look very nice so to get around that we simply have this anti-gravity force that is applied in this outside distance area so particles that are inside the object should encounter no gravity at all based on what this anti-gravity force is and particles that are outside should experience a ramp of gravity that that starts to apply less and less as you get closer to the object and this is all highlighted in in this vex code here but it's easier to interact with the parameter panel here and additionally as the object moves we've linked in the velocity of the object here we apply a drag so that we can try and move the particles along with it when the particles get pulled up into the object so how do we actually get it there we apply this suction force and essentially with this Wrangell code here it applies like I said mentioned before the distance between the fluid surface and the target object and that is multiplied by the suction strength and it is ramped higher depending on where or how close it is and what the outside distance is so for example if you're one world unit away so in this case if you're one meter away you will have zero actual force and if you're much closer you will have the true distance times the suction strength and the ramp from the outside distance to the inside distance basically you can think of it as as the particle gets closer to the character it's getting pulled further and further in we want to have a ramp that increases the strength because we don't want to have a sudden jump at some distance from outside distance away we want to have a nice steady transition of the suction force as the object gets closer as the service is closer and closer to the character so for example someplace out over here may experience a very very light amount of force and some location closer will experience a stronger force even though technically it's closer the distance is less and so the strength should be less because of that ramp it we get a nice gradual transition and we'll see that when we run the example in a second so what is this this object I just our our rubber toy with some animated transform and let's just turn this off and it just simply lifts up and moves around a little bit nothing too fancy but enough to show you that that we can animate an object and pull to the polluter along with it so when we use our shelf tool we get the nodes put down in the flip solver but we also get nodes put down in the geometry as well so in this case we have this collision source that gets put down so one thing that's really important to keep in mind and be aware of using this tool is when the collision sources is laid down the voxel size is created based on the particle separation in the grid scale in the flip object in the dot network but it's not directly tied to it so if I increase the resolution of my simulation this voxel size is not going to change and if I maybe don't have a high enough resolution to really represent my character which in this case I just barely do it's just barely visible as a rubber toy you may not achieve the look you want so it's really important to keep an eye on this voxel size and how that relates to the quality of your simulation because even if you increase the resolution of your simulation if you don't increase the resolution of your target object here you're not going to be able to represent it very well and additionally the exterior band and interior band are directly tied to inside distance and outside distance so if you decrease your inside or outside distance by a lot you will not have a large narrow band for your volume to actually represent your object in fact if you set it to zero you could end up with some some issues where you don't even have a narrow band at all for for exterior interior and that could cause problems so it's important to keep keep an eye on on this as well okay so let's just jump right in and activate this so from just simply dropping the shelf tool down with the selected objects we get fluid pulled up into our rubber toy that's pretty cool it looks all right from the beginning it comes up in fills the shape of the object in fact if we look at the surface it's a bit blobby but it you know has the overall shape of the rubber toy okay so I want to just change this here so I can see our toy and not look at the vocalization of it so let's run this again we notice that there is quite a big bulge outside of the the actual rubber toy itself right there there's quite a big area around it and this has a lot to do with the outside distance and how we set this outside distance so it's good to have a a big outside distance initially to pull everything up for example like this character does not sit directly on the water so if you had a small outside distance you may not actually be able to pull anything up at all so we may want to change this in fact it's probably a good idea to keyframe this so we want to keep framing the outside distance this way we can control for the amount of fluid that gets pulled in and how far away it is from my character so in the beginning we want to keep the sort of bigger bulge that we saw but we want to transition this gradually over time so for example this far out we may want to set our outside distance to be something smaller like for example 0.3 which happens to be a voxel and a half so if we look at the flipped tank particle separation is point one and our grid scale is point two so our underlying voxel size is 0.2 and so are outside distance transitions to be 0.3 around 120 frames so that will allow us to maintain the fluid tightly to the character and not have that that bulge that we saw and now because the character is going to move around through the scene we may want to increase our suction strength so although 12,000 is good in the beginning and that pulls up the fluid as the fluid moves around we want to have something stronger that's going to pull it in and maintain it as the carry moves because as it moves you may see particles fall off for my character so again we'll set a keyframe and we'll set this to something much stronger like 48 8,000 now let's see how this works you so we see that the fluid gets pulled up into the character and creates a much tighter representation where in the beginning we get this this big bulge which is quite a bit further away we do see that our our values are starting to change here as the outside distance starts to thin out we get a thinner representation of the character by the time we get around 120 mark we see that this is a pretty good representation if we resurface this we can see the contours of the character quite well we can see that the legs here in the formation of the tail and even the contour of the head we can't get the the sharper details of like the horns for example but that's simply because we don't have the resolution in this simulation to achieve that if you recall the VDB volume of the character just isn't even at that level if we increase the resolution we would expect to be able to maintain those contours as well but overall this is pretty good we get the shape of the character that we wanted and we have a much tighter representation than before and the character can also move about the scene as a rubber toy moves we see that the particles are oscillating around and moving about inside the character which is great because we want it to look like the fluid simulation but we also want to be driven to match our character and so by setting our our target through the surface pressure we can maintain that fluid simulation appearance while being able to direct where the fluid goes now as the rubber toy moves we do see that particles fall off and this is partly due to the fact that the rubber toy is moving quick enough that the outside distance doesn't grab the particles but it's still a nice feature having it fall off and looking fluidy and so they having the stronger suction strength helps keep some of these particles in the rubber toy even though we have some particles fall off it conforms to the shape as the rubber toy moves about the scene and this can be taken much further and you be used for substantially higher resolution simulation so as an example of something that's that's achievable with the suction force in a much higher resolution we had a model skull that is used as a as the suction force object and it pulls this chocolate fluid up and forms the shape of the skull and does a pretty good job especially if you consider that the jaw here is quite thin the actual bone is in the jaws not really thick at all and we still able to to fill the fluid into that that space and you get the right contours of the skull here and really what's the most impressive of this whole thing is that it's not just direct abel liquids it but I mean it's or it's not just direct about particles it's a true fluid simulation there are ripples that occur on the surface of the skull even the jaw things are rippling around because it really truly is a fluid simulation then it's just being sort of guided by this this pressure and it's gonna be taking even further so Jason from black ginger provided us with this really cool example of the suction fluid with these zombies climbing out of the river here and pulling up the water with them in moving forward and as they do the the particles are sloshing around and falling off of them but following the motion I mean though the nice part is that this this animated example of sort of what is possible and yet then you know the dripping particles that are coming off the character really provide this nice and rich detail in Houdini 16 we also made improvements to the viscosity solver we improved the way that the fluid interacts with the solid at the boundaries so that slower moving flow gets smoother smoother contact with the solid boundary we also change the way that it contacts in terms of how much it can slip so in this example here this viscous puck is going to fall on this rod and the rod isn't going to spin around and fling the puck because the puck is sticky and it's going to stick to the rod and only pull away when there's nothing mentum to sort of overcome the stickiness you see well even so there's still some parts that stay stuck to the rod a lot of the momentum is is the energy is lost because of this viscous connection here and it's links down to the ground I think it's a pretty cool simulation but there's no control for the artist to determine how sticky or how slippery this this thing should be and we wanted to provide that type of control so we added this slip on collision option and in this example it's activated and this slope scale is set to 0.75 so that means it biases towards the velocity between the fluid and the collision taking the fluid velocity and not the collisions velocity if the slope scale is zero then the fluid receives the velocity from the collision which means that it can't slip and then if the slope scale is 1 then the collision doesn't apply any of its own velocity to the fluid it was tangentially and the normal it's it's still applied but tangentially the fluid can freely slide back and forth so as this puck starts to get flung by the rod the momentum of the puck creates this this slip we see here it starts to form this puck is starting to slide off of the rod by this the contact point and it's not grabbing nearly as much as the previous example because of this slip scale so we've actually seen that a decent amount of this puck is actually slid off the rod now and this was not the case in the previous example and the way that the pot comes off here is just completely different right it starts to slide off and then gets flung so let's let's play that back the whole way right so allowing this puck to slide along the rod gives us this effect that we wouldn't have been able to achieve before we would have been stuck with well I think it's still a cool example but we would have been stuck with this example we would have not been able to do so there was something different now that we've added to slip on collision option there's a lot more control for your artist so at the moment this is just a global scale here this just completely sets how the velocity it behaves at the contact of the collision in fact inside of the mechanics here it's just the opposite of the gas stick on collision which you may be familiar with in the collision tab there's a stick on collision here it's important to to notice is that for a normal disc ASSA T free fluid simulation so if this was completely turned off it is a typical fluid simulation we have what's called a free slip condition which means that the fluid is allowed to move tangentially along the collision object without getting any of the collision objects tangential velocity influenced into it when you turn viscosity on we have the opposite issue where it's a it's a no slip condition which says that the tangential velocity of the fluid should match exactly to the tangential velocity of the collision which is what we saw in the initial putt case where if we go back here and watch there is no sliding at all and no point is the plug sliding along the object it's only once the object finally stops that the puck begins to detach due to the momentum of the fluid so that's why it's important to have this slip-on closing here in the viscosity tab just like it's important to have the stick on collision in the collision tab because in this case for a viscosity free solution it gives people the ability to control a what otherwise would be free slip condition you can change that by modifying this for viscosity we want to have the opposite we want to be able to control what would otherwise be a no slip condition and that's why we've added this here so even even moving beyond that we now also have a control field so maybe you want to have a specific region that is more slippery than another region where I said in them in this case it's just a global scale but it's possible that we may want to have the slip just completely dependent on what may be temperature or some other parameter so in this example here I have just a simple box that I've turned into a fluid that's going to splash down on this ground plane and it has some viscosity 500 for example and viscosity is enabled here slip on collision activated so this should just be a full slip and if we run it indeed it hits the ground plane and slides down and just keep sliding if we bounce this back and just turn this off completely you would expect this to have a very very very small flow if any at all and indeed we see that the flow is it's just completely just wiped out pretty pretty early on as all the particles stick once they once they spread out so there's a very very thin layer and the fluid is basically completely attached to the ground plane okay so that was all or nothing that was just a global control so we've added on the volume tab here we are on the volume input here we've added a slip field which if we visualize we visualize is varying from from left to right so on the left side we have a value of zero and on the right side we have a value of 1 and that gets passed into here so we can use our slip field because it's been created at the volume input and activate this control field so let's just kind this off and let's run this again so pretty quickly we notice that on the left hand side this is gripping just like we saw before where it's it spreads out and pretty quickly on it loses all of its velocity into sticks but the right-hand side this is this is continuing to flow and this is what we would have expected right so like I said when we when we showed the the plane here on the left hand side this is zero and on the right hand side this is 1 and this is how we set it up through through a simple wrangle and even the guide range clearly indicates that it was zero and one it's the varying colors here so this gives you the ability to control areas that you might want to have greater slip in areas where you might want to have you know more of a stick and this control now is available and allows you to do a lot more viscous fluids than you're able to do before I want to thank you for taking the time to watch this master class if you have any questions or comments please feel free to leave a post below or in the side effects forum and I'll do my best to answer thank you
Info
Channel: Houdini
Views: 36,943
Rating: 4.9635534 out of 5
Keywords:
Id: OXBms4cpc6A
Channel Id: undefined
Length: 60min 12sec (3612 seconds)
Published: Thu May 04 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.