Houdini for Beginners - 007 - TIMJ - Fluid

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to another kind of tutorial and today i want to talk about the topic of fluids so a beginner tutorial with four fluids and this is like the little result we will get and it's just a basic fluid uh simulation we will build that up from scratch and yeah i will walk you through that quickly um so the collider that you currently see here are just the simple boxes with ovd for vdb from polygon with vdb smooth and so on pretty simple but pretty useful so if you want to create like kind of these shapes then a collision source for collisions or vdb volume and out for later for rendering and this is the simple setup we will build and here's the our flip source so this is just a tiny little sphere that will get transformed a little bit in the y-axis a flip source a little bit of viscosity and then we will pipe that into the dotnet and use that as a source and then we will output that we will remesh it with the particle fluid surface node you can also do it with vp from particles and smooth and convert it back that's fully up to you and here we will get this little [Music] little simulation so first of all i want to start with let's start with the collider and then the source so this is pretty easy we will start with a box and on the simple box we want to scatter some points so place down scatter notes and let's say we want to place like and let's say we want to place like 24 points for now and what i did there was pretty simple you can also do it with legs or with whops or use another kind of geometry but i will now use the adjective randomize node oh not that one randomized and i will copy it two times so one will be the rand p scale so we can randomize our scale of the copied objects and range rod for rotation so random p scale will just type in attribute name p scale p scale because we want to manipulate or influence the p scale attribute and the distribution on maybe custom ramp and the the minimum part we'll just pipe that up a little bit and here you can for example play with the global seed now we need to see something of course so let's place down a copy the points and with the copy to points we can copy some random kind of geometry onto the points so for example a box currently you will see different colors because the random the attribute randomize got currently so the second one got currently the cd in there and that's basically the color but we want to influence the normal and we want to get the distribution of inside sphere and now you can get a different rotation on each point so if you have a look on your points you can see that the normals will get influenced and this is like the quickest way and the dirtiest way to get quick random rotations on for example cubes or you can place down a platonic solid you can pipe that into here or the pickhead to get like a pickhead mesh that's like fully up to you so i will use the box for now and i will change the initial box a little bit so to get like a little bit of randomness in here maybe something like that um let's just play with that a little bit so that's that's of course uh fully up to you i will handle that and i think that it's that's pretty okay let's see yeah okay and after that let's delete those or let's check it very often yeah let's just stay with the box and after that we want to remesh it so we need to get like a proper um geometry one for rendering and one for the of course the collision for the fluid simulation we will use the vdb from polygons so type vdb f and polygons will pop up select the connected and i will use a vdb smooth sdf and in the end we will use a we would use a convert convert vdp on the vdb smooth you can now like smooth out your vdb so if you want a organic shape for example something like that of course you can do that and then subdivide it later and that's like for kind of a kind of organic shape and but if you want to keep like these hard edges and stay with a more harder shape or a shape with more defined edges we can just dial the voxel size down to get a higher resolution and for example we can use two iterations on our vdb smooth and then convert it back to polygons so we now got like a compound object and after that we need to place down a collision source the collision source will do two things um the first output will be our initial polygon geometry so out maybe poorly r for rendering and the second output will be a voxel output or basically a vdb output for the collision in the solver in the fluid solver and we can rename that to our collider of course i already got that here so let's just rename that to one so this is our collider so currently the collider is not in a good condition so we need to pump that up a little bit go to volume and then the volume size um maybe for example 0.05 or two five oh let's do this one five and this will be our collider for the fluid simulation so then we will need that kind of little setup this is like the source of our fluid simulation and we will use a sphere for that of course you can use other kind of geometries and you can like switch them out later we can do that too and i will use a polygon and i will bring the frequency up to maybe five and the scale to 0.15 yes and then i will just transform it but i also will select out poly r as a template so just hit this little flag here or just drag and drop hold e on your keyboard and drag and drop the window here and then you can display that as a template and i will you i will transform our initial sphere over our over the collision geometry here maybe like maybe like that and then i will use a flip source so touch just a flip and we will create our flip source here cool we've got our flip source now we can dial for example i think i use yeah 0.01 here so you can dial like for now we will just use like 0.05 to get a faster result on the simulation and a little helpful thing to randomize things up a little bit you can um bind to the seed on like dollar f so on each frame the jitter seat will randomize cool so this is our flip source now for example i created um viscosity here so we will get an attribute create here and we will type this call t viscosity and now we've got uh attributes on our points um viscosity and we can use that attribute to influence the viscosity of the fluid later and i will just leave it for now um by zero and then we will place on a null and let's call it out source flip tooth for tutorial and this is our little source tree so we will source our fluid our initial fluid creation will be happen on this little sphere here and now we will need our dot network so place down a dot network and just call it sim fluid flip for example and we will dive inside and you will see just an output node because we will build it from scratch we will need a flip solver flip server the flip server this is the flip server pipe it into the output and then we will need a fluid to solve so we want to solve a flip object and we will place it down so flip object and now you can already see we've got this like initial box creation but we don't want it so just delete like sub path here delete it and under the guides i usually um don't use the sprites i usually use the particles as a visualization representation and we need a source so this is our source from the top level so that one here and we will type volume source and then we can just initialize here the source flip so we want a source like a flip object click on that and connect that to the last output and you can see it on the bottom center it will tell you a sourcing and this is where the sources will be plugged in and then you can like get like a sub in there or like the first context geometry and we'll just connect that to the first um input here and you can already see we've got our fluid here and for now our container is way too large so yeah way way way too large so i will just i will just currently let's just pin this viewport dive inside oh no wait um just go to the flip object and for now we want to flip solver oh where is it there the volume limits so we will pipe that massively down like two by two by two and then maybe maybe increase it back again three by three and then like maybe eight in the y-axis and now when we press play nothing will happen because we currently don't don't any forces so for example you can place on a gravity force and now you can see that the fluid will drop down and we need to dial down our particle separation because we got here initialize particle separation on the flip source of 0.02 of course you can just get here like copy parameter past relative reference and then the particle separation will always adjust to your top level so now when the fluid will just fall down and then will get terminated or or deleted here in the end because the volume is like closed there and it will just get deleted and what we want to do now we want to get our our collider in here and we will do that now so we will place on a static object and we will implement a merge here and connect that and we will switch the inputs with shift r and we need our static object so press on the sub path and we used the art collider now you can see our collider is already there maybe for now you can just go back to our flip object or to our flip solar to volume motion and to volume limits and maybe we can increase like the x and set distribution a little bit cool we will disable display geometry go to collision collision guide and we'll use volume sample and i think that's a pretty good resolution for for our collision here so we can now de-click the collision guide and maybe just re-enable the display and now you can already see we've got like yeah let's just what we will do now i will just increase the smooth the particle separation here to 0.02 and i will also increase from the volume limits to axis again and after that now when we like um visualize or flag our sim or our top network we'll get like the fluid and the collider but we don't want that so we dive back inside and i will call that um out flip for example or outflip 001 if you got like more flip objects and then the cool thing is we can copy the name here and we can place down top import and we will drag and drop our top network into the dot network input and we will just copy in here object mouse out underscore flip underscore01 nothing will happen because we need to fetch geometry from dot network and then use the single object i think you don't need to use it but you can use it and now we've only got like our cool fluid here and the good thing is that we can now like control our fluid and our collision separately so we've got our fluid here and we've got our collision here so just select both of them press shift and press alt and drag drag the merge node out and for example you can now use surface particle fluid surface and now we will get that and we'll get that because we need also to get our where's our flip we can use our particle separation again so flip source go on the particle situation copy parameter and then paste relative reference or of course you can get the values manually if you wanted and now we've got like this first initial simulation here that's pretty cool but i want to introduce some viscosity so for now let's use a viscosity of five and it's pretty easy to set up let me just dive in the other network here we'll just need to enable the viscosity here enable viscosity and then enable viscosity by um by attribute let me just check okay um let's dive in our fluid solver and we will go on our flip server viscosity enable viscosity enable viscosity by attribute and now when we will simulate that you can already see that we will get a different kind of behavior with all fluids so the fluid is now yeah got more like a much higher surface tension and is not as fluidy because we've got more viscosity on the initial fluid and of course we can dial it up so for example we can dial it up to like 50. and now we will get like a really sticky kind of dense fluid and it's pretty cool for if you want to do like lava for example or maybe yogurt and other kind of yeah more dense fluids so that's that's pretty cool i will dial it back to five and now we can do like a quick simulation here let's just wait a few frames and then i will show you some other parameters on the particle fluid surface these are pretty important too so now i've got like this really sticky fluid on top of your geometry so on a particular fluid surface node we can use for example the dilate and its move and you can maybe get a full the smooth of course that's fully up to you but i like to leave it like five and also you can get like your your velocity range and then you can use your velocity so for now the color you can use it like to create let me just get a color here and we will do a random from attribute and we will pipe cd in there and the cool thing is what you can do now or it's just a visualizer yeah it's a visualizer the cool thing is what you can do now you can get like um yeah like a mask on there and with this visualizer mask you can pipe that later into the rendering so for example you can make a fluid on [Music] on the red ear you can make it like more maybe more green or more yellow or more refractive or less refractive and then it will lead into the inside and you can make it more refractive or give it another kind of color so that's pretty powerful and um i think you can let's just get here where's it like that's the velocity here yeah okay and the viscosity so the viscosity is like a constant value i think yes and of course um what you also can try out you can try out to remap or change the viscosity over time that's pretty cool too so we've got now our two fluids here and now we can render that for example i will make a group delete and i will make a group so we will first delete any kind of group of course there is currently no group in there but we would use a grp fluid and let's copy that again and call it grp maybe call or that's called just um maybe maybe like stone and pipe it in here so we've got one group for stone one group for fluid we'll merge that together place an all let's call it out and we will place down material for rendering let's call it rs matte and now we can go to the yeah to the render part let's simulate some more frames and then we will make a quick little rendering and the cool thing is you can now like um really experiment with with the fluid and another kind of cool thing is now so got like a simulation to [Music] frame 48 or 72 but you can use like the activation and you can type in for example um dollar f less than or yeah like um let's use as an example 24 and this will equal to zero oh wait that's let's flip that and the cool thing is you can now get like a simulation that will run um 24 frames and then will stop so you will stop the emission and then the fluid will behaves kind of differently because of course you will not get any more sourcing and you can try that out of course too so let's go to frame 72 and let's let it sim till frame 72 of course you can create maybe a channel here and promote that up if you want like a more accessible way of doing that um or you can like animate it of course with keyframes so you can make like 20 frames of sourcing stop it for 10 frames and source maybe 48 frames again and now we can see we'll get something like that let's just enable retime here cool um another cool thing is what you can do is to try out of course sub steps or form like a better behavior um dial the sub steps a little bit up but you also can use the time scale so like 0.1 that's like 10 times um the initial um simulation speed like you get then like get 10 of the initial simulation speed and you can use that for example for slow motion that's pretty cool too so now we've got our our fluid here looks pretty funny okay cool so now we need a few things so i will just go with a simple dome here and oh so on our stone i will make that yellow r s and then dome light 0 1 so this is my dome light we will place down a material network and a wrap network r r s out and uh let's call it r s mat and here we can build our materials so we will need two kind of materials so r as matte maybe fluid and one r as rs matt's dome go up one level and we will place down in the rs out we'll place an rs or coc1 so we will place like a the replace just the redshift render node and here you can i will activate some things i will activate global illumination on brute force and i will enable automatic sampling and optics rt acceleration for rtx chords and oh we will need a camera of course we will need a camera dive inside there and we will get our initial camera here camera01 and let me just check the time okay uh let's go 180 [Music] one is of basically full hd uf sampling so that's like i don't know but i did that like a thousand times now in tutorials but i think it's like good kind of way to um when you do this like again and again it will just get easier to do that um oops show images and we will start the renderer so x709 let's get a focus here and you can already see it looks pretty okay for now but let's get another kind of maybe angle like that one and we can use and like in photography we can use a backdrop we can use that here too so i will disable the background and we will make a manual backdrop so you can see now if you go to the top view so just press 2 on your keyboard you can switch between top and bottom view and if you don't know it you can like with control 2 3 or 4 you can split your views that's pretty handy if you've got like one camera view and one um overall view so that's pretty handy and we will bliss on two and we will call it uh geo pg for background or backdrop so that's just like a backdrop like like in photography and we will of course can apply all that stuff in our 3d cg world too so we will dive inside i will ghost other objects and i will place down grid and i will make it like 20 by 20. that should be fine we of course we can scale it up later and i will then make a transform or just make the bend first so i will make a bend here go to the top view and we will need to set capture region and if you want to do it like precisely you can just get here a point snap or a grid snap it's fully up to you and generate the capture region and then we can bend it and we can use another kind of bend and we will use that band for that direction here so set capture region again and we will use it from here to like here and it's currently the wrong up vector axis so we will use the fixed axis and then you can bend like this so you will get like a a little um curve fall off let me just check okay cool and that's basically it so we can now subdivide it a little bit but you don't need to subdivide it too hard because maybe you've got it out of focus and you don't need that kind of extreme sub division and let's go and yeah so we can now place that like let's have a look where's our camera so the camera is here so we will place the backdrop of course behind the object so maybe like that and let's have a look okay that looks pretty good and now we can create also on our smart here and copy that maybe our smart bg for backdrop and then we can also apply the backdrop material here and we need to apply our other materials we will need to get the fluid and this will get the fluid material and we will need to get a stone and that will get the stoma tool cool now all materials are applied i hope so let's start our render here again and now you can see of course the backdrop is maybe of course way too uh reflective but that's fully up to you do whatever you want with the backdrop and of course you can change the color and we will then light the backdrop with a manual light and now you can for example the stone let's do the stone like in a like a mineral way or like copper and we can use a bump map and make some noise the cool thing is we got all of that like noise beauty and with noise you can do so cool things so for example luca noise 0.5 oh no no wait wait wait too small 0.5 at 1.5 pipe that into input pipe that into the pump input and that back into surface and of course the bump scale is way too high so we will set that down still way too high like to give it like a little bumping that should be fine and then we can use for example another kind of color choose what suits you and a metal tint metal tint is also pretty cool so experiment with that feature maybe something like in that direction and the fluid so on the fluid you can just use like glass material or tinted glass or again like a metallic fluid and we can just use our all the colored data and i think that should be color yes and the cool thing is we can remap that so earth ramp and we can remap our color so for example if you want a hard fall off you can go with something like that or if you want a more softer fall off you can go something like that and then you can again remap it like a second time and then initialize your color [Music] for example blue and let's leave it white and just pipe that into the reflectivity and maybe we can cut like yeah now you can see it much better and now of course after that um currently we've got a partic fluid and we've got wester you can disable the adaptivity to get like a higher resolution and after that we can subdivide it to get like even higher resolution but i think we need to place a normal here so it can get a little higher resolution onto that cool so we got that and now we can for example experiment with the tinted glass that's also cool if you pipe that into the refraction transmittance for example and what i also want to do is just get our slide in here re-enable the rendering and with the rs light i will move to the back here and we'll make like a back top light i will make it a little bit bigger so five that should be fine and on the exposure let's go to down that looks good cool and now of course you can play with the download you can make a manual light setup that's um that's fully up to you and of course the fluid you can experiment with that another cool thing would be like an um maybe a subsurface material like this milky coffee or just play with rs material let's copy that and you can play with the amount so you already get like a really quick subsurface gathering and make it a little bit rougher and of course with other kind of presets like the copper preset or platinum and so on so the the police abilities are of course there and you should try them out and feel free to explore them and i will see you in the next tutorial so have a nice day stay tuned and take care you
Info
Channel: timj design
Views: 4,605
Rating: 4.9337015 out of 5
Keywords: houdini, rendering, sidefx, tutorial, redshift, octane, cgi, vfx, motion, design, motiondesign, photography, bokeh, cinema, creation, fusion
Id: ikg5NfLa2T0
Channel Id: undefined
Length: 41min 29sec (2489 seconds)
Published: Sat Apr 17 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.