Chapter 6 - Mantaflow Foam Particles / Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi this is ram from classmate studio welcome back  to another chapter from liquid simulation series   and today we are going to talk about the particles  which are available within the liquid domain which   you can use for generating foam particles bubbles  and spray so if you have like a wave simulation   or maybe a kind of a drink where on top of it you  need some foam layer a separate layer so you can   use these particles and that's what we're going  to talk about so i'll keep this video as short   short as possible and give you a breakdown  of the scene that you've seen in the preview so i have this very basic scene set up in front  of me there are very few objects like this glass   which i made using the bezier curve  so if i isolate this one you can see   i'm using the screw modifier on  the glass i'm pretty sure you're   familiar with this process already so this glass  is there and then we have a very small piece   of bottle which is just enough to fill in the  frame and then there is a this plane over here   which we need to emit the liquid all right  so let's select this plane over here and go   to the object and quick effect quick liquid so  we get the domain now let's go to the edit mode   and extend this domain so that we cover  all the area wherever we need the fluid   fluid simulation to happen all right so this much  is enough let's go to the frame one and see if we   can see any particles so at this point there are  no particles that's because uh this plane over   here is a planar and it doesn't have any volume  so when we don't have the volume on the surface   there should be some some surface emission so  this way yeah some particles some particles fall   out of it but instead of the geometry we need the  inflow the continuous behavior in the particles all right so that's a good start but  instead of fluid falling down from here   we we want this to flow from here and for that  to happen we need collision enabled on this one   so let's apply a collision uh effector  on this one and see what what happens   i think we need to give it some sort of surface  thickness and maybe increase the resolution a bit and now you can see the particles  are falling from here instead yeah so one more thing we need to  enable the collision on this one as well   so that it can contain the liquid so  let's apply a effector and let's give some   surface thickness thickness  to this one as well point   point one maybe and i'll change the display  type into bumps so that we can see the particles let's do one quick break so as you can see  over here now the particles are taking shape   of the glass and that that means our glass  is kind of working the collision is working   but there's not enough surface thickness so  let's increase the surface thickness to sorry maybe yeah 0.5.5 is fine so let's test it out so yeah i think uh this looks fine the collision  is working and few particles which are leaking   from here and there i guess that problem will  go away once we increase the resolution to 128   so right now the liquid liquid is kind of pouring  continuously and we don't want that we need   this simulation i mean this plane emission plane  to emit particles for just just around 40 around   40 frames so on the frame uh 46 i'll enable a key  i'll set a key and go to the 47 disable the use   flow and again uh key this one alright over here  and yeah and also the speed of the simulation i'm   kind of looking for a slow motion shot for  that i'm going to decrease the time scale to   0.6 0.6.5 whatever suits your taste so i'm  just going to do another quick break and   see what's going on over here so yeah here's the  simulation and right now the only problem which i   see over here is the fluid is pouring kind of  at a very small very slow rate and that's not   really looking great instead i want this fluid to  come up with a bit more velocity so that it can   touch the other side of the glass over here  like from here till here some something like   that over here you can see after frame frame  46 emitter stops uh emitting the plane that's   because of these uh keys over here that we have  set up just now select the emission plane and   enable the initial velocity and maybe give it  some velocity into the normal direction because   the normals are set into this direction so  just don't forget to check the direction   of the normal and fix it before working on  this all right so let's do a preview again so as you can see now with the velocity enabled  the shape is kind of interesting so from here   it takes it collides with the outer wall and takes  the u shape and this flow looks much better than   previous one which where fluid was straight going  down so i think yeah the more or less the setup is   there we just need to see how this looks with  the high resolution so i'll just increase the   settings to 128 and on this one i'll  change the sampling sub steps to two   just in case because uh there is a slight  motion and uh even though it's not a high speed   moving object it's always good to have some  sampling sub steps into moving objects so   let's do a preview i'll set this to  modular is resumable and bake the data yeah   so i have around 80 frames uh baked already and  this looks fine i think we are good to go ahead   and bake the entire simulation the only thing  i would like to add into this one into is uh   increase the initial velocity into the normal  direction because over here you can see uh it's   still not making the perfect u shape that we saw  earlier in the preview so because we increased   the resolution the behavior of the simulation  kind of changes depending on the resolution   so i i'll have to increase the velocity a  bit i guess select the domain and uh yeah   so let's bake the entire simulation and come  back with the results all right so i have the   final cashier over here and this looks pretty  good the only problem i see over here is i've   kind of forgot to enable the border collisions the  particles that fall out of the glass are colliding   with the borders and are collected over here so  we don't want to see that so for for this just   disable all these border collision settings now  i think we are good to go ahead and bake the mesh   for it and then work on the particles over here so  i'll just free the cache and disable the particle   um the border collisions i'll bake this one  and then make the cache and come back with   the results all right all right so the bake  is done and we have around to 300 frames uh now we have the particles we have the mesh and the  only thing we need is the the foam on top of this   simulation so first thing i'm going to do is uh  this mesh over here looks quite quite noisy so   let's apply one smooth modifier on this one smooth  factor by around two maybe repeat by five i'll   leave it to four for now i'm not quite sure if  you can fix this problem that that is there in the   mesh uh i i can't really get a smooth looking mesh  with the collision geometry so maybe you'll have   to either work with really high resolution like  256 or something so let me know if you guys have a   solution for this one so if i render this out now  i'll give you material breakdown later it's it's a   very basic material and there's nothing i think we  need to discuss but i'll still give you a material   breakdown later so this is what it looks like  right now now let's go to the domain properties   we have the main liquid simulation baked  let's minimize this one then we have the   sorry the mesh over here sorry yeah now only thing  we need is uh the particles so if you go to the   particle over here we have only liquid particles  over here so once you enable the any of the   particles within the sim uh liquid domain and that  will show up over here as well so let's enable the   form and disable the render so let's enable  the form and be the particles and you can uh   just play around with these different  kind and whether you want all the three or   just just the form so depending on what kind  of simulation you're dealing with so if it's   a water simulation like a water tank or if it's a  the wave ocean or something then you might would   need much more than just a form so for now i think  uh this is the only thing i'm going to deal with   and let's bake the particles i'll just skip  the video ahead and come back with the results   all right so we have the particles for the for  the form over here and if i disable the mesh now   you can see there is an additional layer of  particles so let's go to the particle setting and   disable the liquid particles so these particles  are the foam which is a a separate layer   and if i play the animation you can see this  layer it rests on top of the liquid the rest   of the liquid so it's just a thin layer on  top of everything and resting there like a   foam and you can control a lot about it and i  haven't quite played with all these settings   a lot but uh i guess there is a lot  you can control uh control about it   yeah and now we have the particles and  the only thing we need to do is give these   particles geometry that needs to be rendered  so let's enable our liquid particles again   yeah so we have the main liquid and the  foam particles on the top and keep in mind   once we change these particles to the geometry  and and then the scene kind of gets very heavy   so you need to keep in mind like if  you select the foam particles over here   you can see there are so  many number of particles like   almost like a million particles over here  so if once we change this to object and   assign like i i have this ico sphere over here  which i'm going to use as the particle over here   so if i assign this uh shape and instance this on  the particles so try to keep as uh this particle   instance particle as low as possible in the  geometry otherwise your scene kind of gets   crazy heavy okay so all those particles are now  solid and if i enable the render let's see what's   going on in the render as you can see over here my  scene is quite heavy right now and it takes quite   some time to buffer things and so you need to be  a bit patient with this once the foam particles   are enabled and i would suggest that you disable  the particles in the viewport and use the uh use   the render preview instead of viewport shading so  i'll just go to the particle settings over here select this one and just disable the  form in the viewport and this way we have   much more responsive viewport so  i'll just go to the camera view and   render one a very small preview so that we can  compare both the results one with the form and   one without the form alright so here i have both  the examples on the this one is with the form and   this over here is without the and as you can  see over here these edges look pretty hard and   there is no transition going on and both uh both  are different treatments so if you're uh like   rendering like a beer or something or any kind  of uh fluid where any kind of drink where there   are bubbles of foam then then this kind the i mean  without the particles it looks pretty hard i mean   there is no transition or the softness going on  around the edges and with the form you can see   there is a nice transition in the color and all  those particles of the form which are sitting   on top of the drink create a nice transition and  give the overall simulation a much softer look and this is not the finest example i'm sure  if you play more with this very interesting   results can be achieved with this and this is  just an experimental a very quick attempt with   the foam particles so let's talk about the  material breakdown now all right so let's   talk about the material and the render setup so  for this i'm obviously using the cycles render   as you must have seen during the tutorial and  for for the glass shader there is a very standard   glass bsdf and in the volume i added the  volume of option just to add some some   sort of a tint in the glass so i don't  think the tint is working that's because   the faces are not completely closed so so you can  just ignore that so yeah i'll just delete this one   so that that is one thing and then there is a very  basic glass shader on this one as well and for the   main domain i mean the main fluid we have a  glass in the surface and volume absorption in the   in the volume so this is what giving it uh the  tint that you see and in the environment so in   the environment i have a two hdri one is the  interior.exr which comes with the blender in the   default folder and one is the knight.exr and these  two i'm using in in the multiply node and that's   what you see over here so if i just mute these  nodes you can see this one is the interior.exr   and this one is the knight.exr and once i  use the both and enabled the multiply nodes just to balance out the uh the combination of  the both hdd array i used the uh this multiply so   and in the camera i have a depth of field  enabled i think i'll have to enable this   over here yeah so this point helper empty  helper is helping with the depth of field   and uh for the last thing uh  the form particle i've used uh   it's a bit of cheating it's just that so  there's a very basic standard principled bsdf   and in this one i've given some emission so  there is a transmission going on which which   is giving it uh the transparency so on top of  that i used emission and the reason behind that   is i just wanted the foam layer to to stand out a  bit and once i enable the foam layer you can see   it's going to get slower that's why i didn't  want you to enable in in the viewport so   i'll just enable this one and enable the  render and just pause the video for a bit   all right so here's the the render with the  phone and if i uh disable this emission value   then you can see the form and once i disable the  emission then you can see these particles were   not standing out so try to create contrasting  materials so like transparent into transparent   might won't work for the foam particles any like  translucent kind of shader or maybe even the   solid particles would work for this so that's  it for today and if you guys want to study this   file further you can download this file from my  gumroad account the link is in the description   and i would love to see what you guys create  with this one and i hope you guys enjoyed the   today's chapter and i look forward to see you  in my next tutorial which is about the explosion   and we will be doing that session on the 26th of  this month so don't forget to tag me in your post   at instagram on instagram i'll see you guys in  the next chapter stay tuned subscribe and give   it a thumbs up if you like the tutorial  take care i'll see you guys in the next chapter you
Info
Channel: CrossMind Studio
Views: 43,624
Rating: undefined out of 5
Keywords: Blender, 2.9, VDB, Liquid, Simulation, Physics, Dynamics, Mantaflow, Basics, Tutorial, Beginner, Blender liquid, Blender Splash, Blender fluid simulation, Particles, Blender Open VDB, Free Blender Tutorial, Crossmind Studio, VFX, Blender VFX, Blender Dynamics, Blender realistic simulation, molecular, particle nodes, Ocean, Fluids, Force Fields, Blender Advance Simulation, Melting, Sticky Fluids Simulation, Viscocity, Blender Rain, Mantaflow Rain, crown splash, professional tutorial, foam, bubbles
Id: 9MD56F-aVcQ
Channel Id: undefined
Length: 19min 0sec (1140 seconds)
Published: Wed Jan 20 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.