the New Blender Fluid Simulator is AWESOME - MantaFlow Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Thank you for sharing this. Would it be possible to post the url link for this video ? If not no worries. If so, thank you 🙏🏻 in advance !

👍︎︎ 1 👤︎︎ u/TechnoSorcery 📅︎︎ Aug 14 2021 🗫︎ replies
Captions
so with the release of blender 2.82 we now have a new fluid simulator and smoke simulator in blender and it's pretty awesome and thanks to Squarespace for sponsoring this video the easiest way to build an online website so Manta flow is what has replaced the old fluid and smoke stimulator inside of blender it's been around for a little while now it's kind of been an extended branch but it's finally finally been merged inside of blender and is now the default flew in a smoke simulator and that's really good news I've been playing around with mana flow for the past few weeks now and I've been really enjoying getting the amazing fluid simulations and results and having the extra control I've also discovered that there's still some buds that will need to be worked out in the future versions of blender I'm sure that's gonna happen though and I've learned some workarounds to kind of smooth over these bugs that I'm gonna be sharing with you guys today as we take a look at how to get some realistic fluid / water simulations so without further ado let's get into that mana flow bro-bro that mana flow bro oh oh get that mana flow bro what'd you say mana flow and if you'd like to download my finished project file here for my mana flow simulation you can do so over on my patreon page for just $3 a month you get access to this file and all of the other blend files available on the channel also for the eight dollar perk so you can get access to the asset pack downloads so check it out you can get some cool perks and support the channel in the process so over now in blender I'm actually using blender 2.8 3 alpha just because it's the newest and latest release and I like to run the newest releases because it's always bug fixes coming into blender so you might as well in my opinion run the latest versions of blender I'll put the link into the description where you can download it so I'm just gonna go ahead and scale this cube up a little bit but going S + 3 and let's scale it down along these set access a little bit and this will be a nice shape for our domain next up just as before we need to add an object to add fluid into our scenes so I'm just gonna drop in a UV sphere by going shift a and adding in a UV sphere if I hit Z and switch to wireframe we can see that there I'm just gonna scale it down to something much smaller and then hit G + Z to pull it up along these that access just was sitting at the top of our cube there but still inside of it here I'm just adding a few cubes to the bottom of the domain so you guys can see how to add some fluid obstacles as well so now we can head over to the physics tab here and start setting up some fluid settings so for starters let's grab those obstacles that we just added choose fluid and here we're gonna choose a type of effector this is just like the collision as it used to be in the old simulator and here it's already set to collision we don't have to do change anything just go ahead and set that up as a fluid effector and all of your cubes next up we need to tell blender what we'll be adding the fluid into the scene and that's gonna be a UV sphere so here we're just going to add fluid choose a type of flow here we need to change the flow type and smoke over to liquid and then choose the flow behavior to be in flow as you can see it says here it will add fluid to the simulation and this is going to constantly add fluid to our scene for the whole duration of our timeline now if you don't want to be adding fluid the entire time what you can do is look what I did and jump to something like frame 40 here hit a keyframe on the use in flow so hovering your mouse over and hitting I will add a keyframe but it can just jump to the next frame and hit I again to add a new keyframe but this time uncheck it when you hit I so it is now turning off the inflow at frame 40 and then we don't have any more fluid being added to our scene after that point so now it's time for our fluid domain settings grab the cube and under the fluid physics choose fluid and choose a type of domain and as you can see by default is set to gas which is going to technically be smoke we don't want that we want to change that over to liquid for this tutorial so before we get into the domain settings I won't tell you about some of the really cool features that mana flow offers one of them being that you can resume bakes after you've already baked it this is really cool because if you bake to a simulation you really like it but you wish it was just a little longer you don't have to remake everything again like you would in the previous versions of blender with mana flow you can just resume your bake and continue from that point really cool also you can bake the fluid the mesh and the particles all in different sections this also allows for a little bit quicker baking and more control do you want tweak the particles without tweaking your fluid mesh you can go ahead and just rebake the particles and another thing that I was really excited to find is that manifold is seemingly multi-threaded and I believe this is a pretty new feature but that means that it will take advantage of multiple CPU cores to speed up your baking process which I was really excited to find as a lot of you guys know the previous fluid simulator was not multi-threaded at all with mana flow I can even use all 64 cores on 3990 X thread ray per processor back there to accelerate my bakes now it's still not crazy fast and it only seemed to utilize the chorus to about twenty to thirty percent about the fact that it's using all of the cores means that higher core processors are going to process your stimulations faster I don't know if this might even get faster with the future builds but it's really good news to see that it's multi-threaded and that a higher core processor will make your bakes happen faster so let's get into some of these cool settings inside of the domain starting off with the fluid resolution we'll leave this as 64 for now but once we want to do our final bake we'll crank the resolution up a little bit higher then we have the time scale now I found that the time scale was a bit fast for my liking at least at 24 fps it seemed like the fluid was just moving ridiculously fast now maybe that's realistic this fluid is pretty fast I guess but I found it looked better to my eye changing this down to about at point five and I recommend you do it too because you can always speed up your footage later on but you can't slow down a fluid simulation so go ahead and change it to 0.5 and you might like it better and you can always speed it up later and then with the time steps here you might want to increase the minimum amount because I found I got a little bit better results when I crank this up to at least a two as it gave it a little bit more information to calculate between frames and fix some of the issues I was getting with some faster moving fluid so I'm gonna go ahead and set that to two down here you can see we have border collisions now this will allow the fluid to collide or not client with parts of the domain which could be kind of cool for some uses and the liquid settings here we have some options for fine-tuning your simulation I actually didn't really change much of these because I found the defaults here to be pretty good but you can add like more or less particles by increasing the particle maximum as well as some other fine-tuned tweaking that you guys might want to get into but don't really have to touch for some basic fluid simulations and now what we can do before we go into the particles or the mesh is we can see what our fluid simulation is looking like if we scroll all the way down so under the cache setting here we can get a real-time playback of what the fluid simulation is looking like in our viewport if we change it from module to replay here we can go ahead and play it right inside of our viewport then and get a live playback of what the fluid simulation is gonna look like as you can see is happening kind of slow but it's cool to kind of see how the fluid will be interacting with our scene you can see that the collisions are of course working here great to just save you a little bit of time and see if the simulation is gonna look the we want and actually by doing this I can see that there's not quite as much fluid in the scene as it might like so what I can do here is just grab our fluid emitter here and scale it up a bit larger this will of course add more fluid to our scene now and to get it to update I might have to hit one of these settings real quick and just make sure that it updates the cache here this is one of the areas where the fluid simulator was acting a little bit weird with the playback a little bit not the way you might expect it but as you can see scaling that up a little bit and giving a few more keyframes gave me a lot more fluid into my scene which you may or may not want this looks pretty crazy at this point but hey it's cool but using these fluid particles in the viewport you can kind of get an idea of how much fluid you might be adding to your scene and kind of tweak your settings respectively so when I'm happy now with the amount of fluid in the scene I'm gonna go ahead and change that back from replay over to module where I can start baking some of the different stages here you also want to change the end frame of the cashier as it's only gonna bake 50 frames right now if you wanted more than that you'd want to increase this right here I'm gonna leave it at 50 because I'm not doing a big simulation for this tutorial so here you can see i just clicked the bake button let it go for a while and hit escape and the cool thing is that you can click resume and continue your bake or you could free your bake this is something you could never do before and it's really cool you just click resume and it picks up from where it left off I think this is looking pretty cool so we can move on to the next baking stage now which is the meshing stage so scrolling down here you can see we have mesh you don't want to go ahead and check that you're the up-res factor which kind of adds another layer of divisions over these fluid to make it a bit of a higher quality fluid so even has 64 divisions if you have it set to an upper s factor of two it's gonna be a higher quality than 64 divisions of our old fluid simulator inside of blender what you also want to do is enable use speed vectors this is a way of adding some motion blur to your fluid because it really helps the realism of fluid to add a bit of blur and it doesn't really work with these cycles blur because it takes insanely long right now to render might be a bug but if you choose use speed vectors 3 has a way that we can add some motion blur to it using compositing so go ahead and choose use speed vectors so that's really the only setting you need to change you can play around with some of the smoothing options here but I found default to look just to get enough for what I need so I'm gonna leave it at that and choose bake mesh so he have a fluid stimulation that I think looks pretty cool and I'm ready to move on to the particles and then the rendering so there's one more stage baking as I've been saying it's the particles and here we're gonna want to enable spray foam and bubbles you can see we have a lot of settings for fine-tuning the particle simulations here I didn't really find that I needed to change any of these a lot of these settings change things very subtly so it's not gonna be a big obvious change the biggest one is gonna be the UH pres factor this is going to take a lot more time to bake if you increase it but it's going to give you a lot more particles and a lot higher resolution particles I guess I found that you really don't need to use the UH pres factor if you have about 128 divisions or more on your fluid simulation but you can do like your low quality bake on your fluid here and then a higher quality version of the particles by uh pressing it here changing it to two and getting more quality but it does select it all we need to do is choose bake particles this again will happen quite fast at only 64 divisions and there you can see we just got a little bit of extra particles added to our steam and if we go ahead over to the particle simulations here because do we have all of those particles as particle simulations now in blender so I can turn off the view on some of these and you can see that the spray is the particles on the edge of your wave they're kind of creating that spray that's something that's really cool and mana flow to kind of be able to add that spray was something that's really hard to achieve before now it's gonna be a lot easier now before I get into rendering our finished fluid I'm gonna go ahead and bake this at a high resolution that I want for our scene I can see the simulation is working and now I want my higher resolution so for my final bake in this tutorial I'm gonna go for 128 divisions I recommend going even higher if you can but it's going to be hardware limited if you don't have the hardware going up to 200 looks pretty nice all the way up to 256 looks really cool if you can go that high and what's cool is that the fluid particles are going to automatically increase with the resolution of your simulation so you really don't have to change into particle settings as there's just gonna be more particles with more resolution so while we're doing all this baking I got something I want to quick tell you about if you want to build a website hassle free to get you up and running quickly check out this video sponsor or Squarespace whether you want to build an awesome-looking portfolio blog or e-commerce site Squarespace makes it all easy to with their powerful tools for appointment scheduling social media sharing email campaigns and much more it's so easy to use actually that I'll be building my own site in the next few weeks so excited for that head over to squarespace.com for a free trial and when you're ready to launch your website I can save you some money if you use my link in the video description with the coupon code CG geek you will save 10% off your first purchase of a website or domain so now we have a much nicer looking bake at one hundred and twenty eight divisions and as you can see the quality it already looks a lot better and we have a whole lot more particles being added into our scene which is really cool so let's go ahead and start rendering some of those we'll start off by right-clicking and shading smooth our fluid there so now all I need is a fluid material and an environment to add light to our scene so I'm gonna go ahead and split my window here so I can bring in a shader editor up on top here I'm going to give our fluid a new material by deleting the principal shader going shift day and adding in a shader glass shader here we're just gonna change it to one point three three three three and that will work just fine for our glass shader connecting it up there change it from a V over two cycles just as it's a bit easier to get nicely looking ourselves with cycles and then I'm gonna jump to the world settings here and choose an environment texture under the color here choose environment texture and an HDR is really important for the look of your water using different HDR s will give you very different results so it's gonna depend a lot on what the light shining and reflecting off of that fluid is gonna look like for this one I found a colorful studio HDR from HDR Haven looked really cool I'll link to in the description you guys can check it out so go ahead and open that up and if we switch to rendered view here at the bottom you can see that we have our fluid being rendered unicycles now I'm going to jump over to our render properties here and under the film I'm going to choose transparent and then here I'm going to choose transparent glass now this is a pretty new feature and actually might be in the 2.83 alpha only so you guys might want to download the latest version to make sure you have that feature but if you choose transparent glass that's gonna make it look a lot more like water not a sound I like the look of transparent glass without it reflecting the environment so much just taking the lighting basically and as you can see it looks a bit more like water in my opinion now we just need to start rendering these particles so the particles can be rendered as ICO spheres so we're gonna jump back to solid view here I'm gonna put my cursor over to the side here and go shift a and add Animesh microsphere now I'm gonna change the ICO sphere settings down to just one subdivision because we're gonna have a lot of these particles in the scene and we want them to be as low res as we can get away with and what I'm also going to do is add a material now to this eco sphere so we're clicking new material and up here I'm just going to delete the principal shader again I'm just going to add in a diffuse shader here now I'm gonna add in an ADD shader to connect it up with another glass shader so I'm going to also add in a glass shader we'll change it to 1.33 again connect the glass into the bottom socket the diffuse into the top and then I'm gonna take the color value down a little bit by taking the value here down to about eight point five connected up to your surface and we have a simple little material here that will look like a nice little foam bubble once it's rendered our fluid then for the bubbles you want to make a separate object so I'm just going to hit shift D to duplicate my little eco sphere there and for this is just going to be the glass material I don't need the diffuse or the add so I can delete both of those and you can make the color a little bit brighter and maybe just a tiny bit blue for these bubbles also when you duplicate that material you'll want to make sure you hit that two button before you change anything materials otherwise you would delete your original material like a dummy dumb and they have to go ahead and recreate it like I just had to do here so then under the bubbles we're gonna choose that to be rendering as an object as well except this time it's gonna be I Chris V or one which is gonna have that new bubble material on it and then another little bonus tip here is one of the issues I've found within mana flow is that sometimes you'll get a pattern like a grid on your simulation this is something I sell a lot of people talking about you notice that the particles look kind of like they're on a grid pattern on your fluid simulation now I always told this is a bug that will likely be fixed in a future version of blender but kind of a workaround to hide this pattern at the moment is to duplicate your ecosphere or multiple times make a collection out of them and make them all a bit different in their rotation so for example here I'm gonna go ahead and hit shift D to duplicate my Aqua Sphere here scale it down a little bit and then I'm gonna tap into edit mode and pull it off of its orange origin point right there you can also kind of mess with the scale here a little bit if you want to make some of those particles look a little bit different in shape then you're just gonna go ahead and grab all of those particles go ctrl G to make a new collection we can go ahead and name the collection right here something like splash and if you jump to your particle settings here and change it over to render as collection and then choosing that splash collection that we just created you can see that this helps break up a little bit of that grid pattern it doesn't do it a hundred percent but it definitely makes it a little bit less noticeable also choosing pick random then in that collection will give it a little bit more random variation of course you want to go ahead and do that as well for the foam particles here now adjusting the scale of these IKOS spheres will adjust the scale of the particles in your simulation so you don't want to make sure you're pretty happy with the scale of these particles by scaling up and down your ICO spheres here a little bit now as you can see with all those particles our viewport gets very sluggish so what you want to do to be able to keep your sanity and keep moving functionally in blender is turn off the view of all of these particle systems by clicking the little monitor screen there this will give you a lot more responsiveness in blender not having all those particles being visible and as you can see we get our sanity back then my last little bonus tip for you guys here is you can add in a mix shader' on to your little particle splash and then use a transparent shader in the bottom socket so go ahead and add transparent connect to the bottom and then add in an input object info node where is it right there connect the random output to the factor and this will give your particles a bit different of an opacity a little bit different transparency between every particle make it look a little bit more like foam I found it looks kind of cool well also improve the look of the stimulation a little bit it's adding a little depth of field through our camera so I'm jumping into our camera settings here enabling depth of field and a viewport display just choose limits so we can see where we're focused at is that little orange plus single there and we're just gonna change the distance until it's right on the center of our fluid there I'm gonna jump over to our render layers here and the one thing I want to add is the vector paths for adding some of that motion blur end so go ahead and choose vector there and we can go ahead and see what we're looking like now when we render mana flow bro mana flow bro don't you know about that so here is what we get rendered and this is looking a really cool you can see all those splash particles and we can make this look a little bit better with some motion blur as well jumping over the compositing tab here to add some of that motion blur and we're just gonna go ahead and go shift a add in a filter vector blur connect it right up there add the image to the image sockets the depth to the Z socket and the vector to the speed factor there so now if we go ahead and control shift click that dunno to bring it up in the back wrap I was gonna see that's crazy blurred way more sold and we would probably want so I'm gonna take the blur factor all the way down to be 0.15 found this to look quite a bit nicer and also choose curved ineffective or settings here you can see dropped all the way down to a point 1 we have a much nicer amount of blur the last thing I want to point out is the vector blur is not as good as the cycles blur but it seems to really be the only option that works right now and you can make this look a little bit nicer as you can see you get some weird blur on the particles here and what I can do to kind of fix that is by adding a maximum blur speed here I'm just going to change this to about a 256 I found to work pretty well and you can see some of these jagged blurred particles just look a little bit cleaner but it still adds some of that nice fluid motion to the fast-moving fluid so if you want to you can go ahead and render this out as an animation now and get some really cool mana flow animations but I'm really excited to start seeing mana flow simulations all over the web is a ton of fun to play around with yes there's some current bugs and issues with it but it is way better than the previous fluid simulator that blender had and it's gonna open up all kinds of possibilities in the future so I'm really excited about it hope you guys are too and I hope you like this video that's gonna do it for me though I'm gonna see you guys all in a future video bye bye
Info
Channel: CG Geek
Views: 581,776
Rating: 4.8798504 out of 5
Keywords: Mantaflow, Blender, Tutorial, Simulation, Water, Realistic, Animated, Animation, Free, New, Fast, Squarespace, Blender 2.83, Particles, eevee, Fluid, Simulate
Id: JYc_6fXEjw4
Channel Id: undefined
Length: 19min 12sec (1152 seconds)
Published: Mon Mar 09 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.