Maya 2018 Bifröst BASIC Webinar

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello all together my name is Roland Alya I'm the technical specialist for Maya side of things in Bates and Germany you can hear it from my accent I'm living in the area of this old off and today we are going to talk about the basics of Bifrost so I'm trying to explain the very basics if you already do by for simulations this might be a little bit boring for you but if you've never touched it because you thought it would be too difficult and you know you have to dive too deep into the technical details then this is the right thing for you here we start from scratch you can all the things that you see here you can do immediately on your own machine I have used a laptop for this preparations and so any any any kind of computer will do mmm the faster of course the better 4x4 simulations you need a lot of rendering power to be able to you know bump up the resolution in get really really nice results so Bifrost I was trying to collect I was trying to collect some topics for Bifrost when we talk about Bifrost what what is it what are we talking about of course it's the simulation of liquids like water and honey oil lava for instance all that kind of stuff and that is the main thing so what we see of by Frances mainly ocean waves or you know ashore or waterfall or something like that that is simulating the simulated in the computer which is good enough it's very it's a very good thing that we have that and we don't we don't need to film water all the time in in reality because some things are not so easy in reality Bifrost also includes a module called arrow which is there to simulate smoke steam cloud seclusions and stuff like that and my colleague from John Paul Giancarlo is going to make a separate webinar about the arrow things that you can do in Bifrost at the end of this webinar I'm going to share his name and you can find easily on YouTube for instance and you will also see an announcement on the media experts website about this webinar we're gonna talk about we are not going to talk about the Bifrost ocean simulation system called bus that is something that I'm gonna do in my next webinar which is about water only so we're gonna talk about water oceans and you know or water in all sizes and there I'm gonna talk about the bus system in this webinar we will touch motion fields because that is an important part to control water and to shade it or to push it into the right direction there is something or there is a possibility in Bifrost to have and or to have the simulation be adaptive to the camera or to a certain mesh so you can tell by first I want you to simulate only where the camera is all in the camera first off so to make sure that you know it's not simulating around you behind you it will only simulate the things that are actually seen by the camera a very good thing I'll handle that in the next webinar because it's also more you know about oceans and big big masses of water the same with guided simulation I'm not going to talk about this in this webinar next webinar we're going to do that but here we're gonna talk about caching and rendering the simulations where at least you know ask the time you know if depending on how much time we have for the whole thing we can't go too deep into rendering so we end up with something like this year liquids motion fields caching and rendering these are the things that we we are going to talk about in this first basic version of the Bifrost webinar and as I said I will have another one another webinar called Bifrost water and my colleague John Paul Giancarlo is going to make a webinar about viscous liquids and also about arrow and explosions so that might be interesting to you as well so let's jump right into it into the water before we start with the basics I have to say something about the preparation of this of this whole webinar so normally I love to do live demos so I love to out my and just you know show everything life to also prove the point that you can do it life is that you can do it with your hands it's not a sped up videos with video with all tricks behind the scenes you can do it last in this case it's not possible to do it life because the simulations you know even when you run up a small cash in my that takes too much time and some of the simulations you see here for example one of the images that we have here on the right side this simulation took like in the highest resolution took like three and a half hours to finish and of course you know we can't wait for that and even if it's all cached and it's pre calculated it takes too long to load the stuff that's why I choose to record videos and to you know have all the simulations instantly there which will be different of course when you do it at home you will see that you know time passes well while you're looking at the at the timeline and see you know another frame and another frame drops it so that's why I'm I'm I'm playing videos from time to time and of course we I'm gonna stop it and you know we cap what we have seen and highlight a few things that are important here for all the examples here I've tried to show you everything that is necessary to do that so all of the steps that are necessary to have this this result there's nothing behind the scenes there are no secret secret settings or something in the preference or so that you don't know about so when you see something here and you follow all the steps it should be possible to reproduce the same result with these settings that you see on the screen that you hopefully see on the screen we will see how zoom does with the performance here and the quality okay so first examples we start from scratch or mostly from scratch so what what I'm using here is as models you can build from scratch in a few minutes and you can you know start right away so we talked about the setup the first setup how do you make some liquid in your scene we talked about colliders collision objects so as a container for example for your liquid you need collision objects we talked about kill planes kill planes are very important to you raise things that you don't see anymore because it's useless to have waters what assimilated that's far away already the scratch cache in the timeline so it's building up as cache so that you can scratch the timeline and see your simulation so find a better with a better performance and then diagnostic colors of course how do you how do you check your data what you have simulated so far and of course we talked about the master voxel size the master voxel size is the one value that drives the quality of your simulation master voxel size what they're I mean the name says it already you decrease the master voxel size make it smaller and then you have a higher resolution better results longer rendering times okay and then scene size the gravity and density you will see that it is important I'm going to show you an example so let's jump right into the first into the first video I'm gonna check the sound here if you hear something and I hope that is the case okay let me start it now let's have a look at a very simple example of a liquid simulation that you can build from scratch in minutes and that helps you play with Bifrost and learn how it works here I have a box as my water container of that with a cutout that have made from a simple polygon cube inside that tub there's another object a cube which will be the water it fits exactly into the container so that the water doesn't need any time to settle I can now easily turn the blue box into water by selecting it and choosing Bifrost liquid a bounding box appears around the water object and there are tiny little blue dots which are the water particles the water box is still there it works as in the meter for the water particles and must not be deleted I can hide it with H but I'll keep it in my scene now we can see the water particles they are only 1 pixel wide and sometimes hard to see when I select the liquid object either by the bounding box or in the outliner I'll find a setting called point size which defines the width in pixels just for the display that has no effect on the simulation let's set this to 3 for now when I start the simulation now the water will fall right through the container box because I have not yet registered the container as part of the simulation I'll select both the liquid and the container the order doesn't matter and go by thrust and under add are added as a Collider another object is added to the outliner a Bifrost Collider properties which carries the settings for the collisions now I can hit play and watch my water simulation when the liquid is selected you can see colors in the timeline yellow and green the yellow frames are queued for simulation and the green ones are done already I can stop the playback and scrub the timeline in the green area to see my simulation so far you will also notice that Maya isn't slow even though the simulation is using all available resources the yellow frames are still being simulated and you can stop this process by choosing Bifrost stop background processing we can see that the liquid is flowing out of the gap in the top and then falls into empty space the bounding box becomes bigger and bigger and that is a problem because it will slow down the solver alot so in case we need just to see the box in a close-up we can remove those particles that fall down and escape the area of interest I can create a kill plane to remove those particles that pass a certain region in this case the plane below our water trough now those particles are deleted as soon as they cross the kill plane let's add some more stuff to our simulation to make it more interesting I turn on a ground plane with some obstacles and add all of it as a collision object in the outliner we can see that the new Bifrost collision properties node is added let's also add something to the water to get a bit more action I create a cube scale it up place it above the container and make it wild and selected with the liquid object and go Bifrost at emitter which makes it part of the existing liquid notice that in the outliner we see a separate Bifrost emitter property node we'll come back to that in a few minutes I'll hide the splash box now a big cube of water is going to dash into the container in a hope it's going to splash properly let's start the simulation oh yes this is much more fun the water splashes out of the container clashes on the ground and onto the obstacles and then runs off and is removed by the kill plane you may have noticed that the particles somehow become brighter when they move this is a diagnostic color setting from a liquid shape currently the velocity of the particles is used to address this ramp and pick a color for the particles I can set the range for the velocity with these min and Max settings these settings affect just the display of the particles very much like the point size when I take a closer look at this simulation I notice two strange things the water that flows out of the cut out of the container has a different much smaller size than the cutout and the water doesn't seem to flow between these obstacles it looks as if they were grown together what's going on here although we only see particles acting by frost is also using voxels to simulate density velocity churn etc and collisions of the liquid the size of these voxels defines the quality accuracy and the level of detail of the final simulation currently that voxel size is only 0.5 units as you can see here and the Bifrost liquid properties note the grid in my scene has a spacing of 1 unit so that the vocalized objects would look like this now it's clear why the water flow in the cutout has the shape and it's also clear why there's no water between the obstacles all calculations for forces movements details etc are done in this raster and you can imagine that this is not sufficient to simulate water with this necessary level of detail on the other hand this low resolution is fast enough for us to do the basic settings position objects and to run the first rough tests here is the playblast of our simulation at a voxel size of 0.5 which is the default if I have the size to 0.25 I get 8 times as many boxes I have it again to 0.125 and then again to 0.06 that amount of accuracy has its price of course this table shows how the voxel size affects the calculation time of the 120 frames in our animation the lowest resolution has only very little detail but the 120 frames were simulated in under two minutes the highest resolution may not even be fine enough for production but it took already three and a half hours to calculate that's almost 2 minutes per frame let's leave this at a master voxel size of 0.25 and the display size for the particles of 2 now it's time to think about the size of the see because at the moment assimilation behaves like a fairly large amount of water and not like a small tub of water the default values of Bifrost attributes are based on the assumption that one visible grit unit is equal to one meter when linear working units set to the default value of centimeter that means that in my example scene the water tap is about ten by ten meters in size and now it becomes clear where this white and dramatically slow movement of other water comes from our water table is actually a small swimming pool let's change the scene size to something smaller in a simple way considering only gravity and density in a large stream gravity may appear to be small and things fall slowly over large distances to make a scene look smaller or ten times smaller we need to multiply the gravity by a factor of ten the density values of the emitters in our scene show a default value of 1000 which is the weight and kilogram of a cubic unit of water let's have a look at this calculation by default one unit is one meter for Bifrost one cubic meter is made up of 10 by 10 by 10 decimeters one cubic decimeter equals one thousand cubic centimeters and that is one liter and if it is water it weighs one kilogram one cubic meter therefore consists of 1,000 cubic decimeters or kilogram and that is what the number 1000 in the emitter says so if we want to make the scene 10 times smaller then we divide the meter by 10 and then this block is only 1 cubic decimeters which equals 1000 cubic centimeters which equals one kilogram of water and that is the value we need to enter in both emitters 1 as for one kilogram of water for a cube of one unit come back to a scene with one grid unit being 1 decimeter instead of a meter the whole water tap is now only 1 by 1 meter which should result in a different behavior let's compare the simulations on the left side you see a large scene a 10 by 10 meter pool with a 3 meter cube of water splashing into it and on the right side is the one by one meter tart with 30 centimeter cube of water splashing into it you can clearly see the different behavior so that was a first first look at a very basic scene let's recap what we have seen here so we were talking about the master boxercise that's the one most important value in the whole in the whole simulation here so let me take smoke here so master boxercise that is the most important thing with the master boxercise you control the whole quality which is a very good thing because then you don't have to control 1000 different values to to set a certain quality or so but of course there are more values to you know fine-tune the whole thing and to keep the master voxel size as high as possible because you don't want so long simulation times you've seen that it can take three and a half hours for a simple scene like this one here already so we want to keep it keep it the resolution as long as as low as possible check the same size be aware of the scene size where it's all right when you build it already be aware of the scene size and what you have to do to make it look like realistic water in that scene size or you you know you know intentionally changed its in size to make it look different you know like a slow more water splash or something like that so since I is very important kill planes to remove unwanted simulations you don't want something you know behind the scenes to happen with the particles that slow you down combine the colliders that is something that I didn't mention in the video but I did do it and you saw me combine these obstacles all together so the ground plane and all the cubes that are the obstacles were combined into one Collider properties object and that's a good thing because if you want to set something for the collider or the emitter for example if you have combined these objects together then you have just one setting in one place and you don't have to change it for a number of different objects diagnostic colors you know the white color for velocity of particles as soon as they move very fast that is just one example you can use the vorticity the density and you know number of values to check what's going on on the surface of the water and to use that for settings for example we come to that in a in a few minutes okay that was the first basic check if you want to start with Bifrost make it simple make simple blocks and so and the simple testing environment where you can play around with these settings and you should constrain yourself to the master box will size for example and find out you know when it starts gets slower and slower okay there are some questions what are the specs of my computer my computer is a is a laptop it's a zip-up it's a pretty fast one so it has a number of course and a lot of memory also it has 64 gigabytes of memory of main memory so that helps of course a lot so especially when you when you load a scratch cache or when you load a cache into memory that of Base very helpful to have a lot of main memory but it's not the fastest fastest machine under the Sun the problem is if you have a fast machine then you also bump up the resolution so much until it's slow enough it's very much like with rendering there is a there's a pain point with rendering when it becomes longer than that you do something about the rendering settings and this is the same here so if it becomes too slow you have to do something and say ok let's decrease the resolution and see how else we what else we can do to make this render faster so the massive oxidized production should be not enough it depends very much on the scene itself so there are scenes that are pretty okay with the 0.06 as a master boxercise even a higher master voxel size could be okay it depends on the scene so if you have a very large scene with with ship in it for example model to real size so ship I don't know how long ship is hundreds meter meters if you have that that simulation and the master voxel files will be much much higher and you still have a very nice simulation only in small sizes you know you have to bump to bump up the resolution or decrease the master box of files to get all these little details can we just model the scene in meters and leads a gravity untouched yes of course you can it's the same thing you can also scale everything if you realize oh I modeled in the run in the wrong units you can scale everything up or down to get into the same into the correct into the correct sizes can you explain the gravity multiplication again I will do that in one of the next videos again to give you an idea there's also on the Maya Learning Channel there is an example of how to recalculate it using simple variables when you say like my ten Maya scene is ten times larger then I have to multiply the gravity or divide the gravity by ten and I just shown this example of the tower and the pencil as you know a reminder like on the tower on the on the big scale it looks like the gravity is low because things seem to fall very slow if you want this to make this smaller and you rise the gravity so that it's boom it's it's on the ground already that's my you know that's my my help here will there be a recorded version yes I'm recording the webinar right now and I'm and I'm trying to to load this up as soon as possible okay so let's go to the next one here rain affect somebody's talking about the rain effect so maybe the next example will show you already some some examples but there is a rain effect example on the Maya Learning Channel I would have to ask colleague how they have done that I had or I have a Radian idea but yeah I would use little collision objects that's one one thing and of course you can use Bifrost droplets to make the rain but if you want to control rain then use little collision objects let's step to the next frame here so now we want to animate the liquid so right now we've used only gravity to animate the liquid you know have this box of water splashing to the top and then animate something somehow what if you want to animate a fountain for example how do you make the water you know come out of a nozzle normally everybody would think about an emitter for example because there is you know that's how we think in the in the 3d computer world with an emitter you emits liquid and then it splashes into the pool in this case I'm going to use the liquid that's in the pool already and just use a field that does that thing the message is here is be simple you know build up your scene as simple as possible even if the pool has a very nice complex model don't use that as a collision model it's gone if you can slow you down think about the thickness of if all the collision objects we talked about motion fields talked about background simulation what we currently do and we talk about incremental ISM I look that word up incrementalism I'm what I mean with that is that you start with low values and then try to increase them a little bit and see is that okay no it's not a case or increase that oh then I have to increase that again okay that is incremental ISM get slowly don't pop the resolution up you know and then wait for three hours just to find out it's not good go slow if if possible so let me start the video in the next example I'm going to make a fountain let's assume my supervisor gave me this expressive drawing the fountain consists of a small round pool maybe three meters in diameter filled with water and then a jet of water shooting up and falling back into the pool the pool is very simple I've made it from a poly cylinder using extrude I just needed as a collision object the actual rendered object will of course look different Bifrost assumes each grit unit to be one meter so the radius of our pool is only about 1.5 when you make such an object you should have an eye on the thickness of the walls don't make them too thin because the Bifrost particles could fall through when they have a certain speed if I model in the meteor object that fits exactly into the container then I don't have to wait for the water to settle inside the container in this example I would simply duplicate the ground polygon and extrude it voila I'll color the objects you know the following steps already select the water and create the liquid hide the emitter and increase the display size of the particles make the container a Collider and finally add a kill plane for the particles that slop out of all land beside the pool okay that's very few particles what's going on here in the first example we learned about the voxel size in Bifrost by default it is set to 0.5 look how big the voxels are at that size for this example that's too low vertically there's hardly any space for one layer of voxels that's half the size to 0.25 that's better but still the pool isn't round and there are too few voxels for the water for now let's bump up the resolution to 0.125 the voxels would look like this that seems to be okay for the beginning that amount of particles looks better okay wait there's a gap between the pool and the water this is still related to the voxel size this offset from the actual surface is a safety distance to make sure that no particles will pass through the geometry I can adjust the thickness of every collision object in the collider properties under conversion currently the thickness is related to the voxels which means that it will change together with a master voxel size I leave it as it is so that when I increase the master voxel size this setting will automatically work better for the waterjet I'm going to add a motion field to the liquid the motion field is a multi-purpose field that includes a directional component a vortex noise turbulence and even a way to use the motion of geometry as a force field when I start the simulation I see that it is actually pretty quick cueing the frames for simulation and then going back to see the simulation so far is a few more clicks at the beginning of the setup in this case I personally like to turn off background simulation in the Bifrost settings so that I always see the frame that's currently simulated now when I hit play the play had always displaced the last simulated frame okay the field points in the wrong direction let's do the settings in this section you can set an overall magnitude and turn on the various components I leave just the directional field on down here are sections with controls for the field components in the field Direction section I can set a local magnitude a direction vector and some settings that let you turn the field into a radial field vortex etc I just bump up the magnitude to 10 and set the direction to be why aha when the field points up and why I need to increase the magnitude global or local and then the water behaves as if there was a turbulence field but it is actually a result of the fact that the complete water body is lifted up by the field and it is drawn back by the gravity to create a nozzle we have to set a size for the field or a boundary when I enable that I can choose a shape and I'll pick the cylinder and of course that's too big I'll scale it down a bit okay we seem to be on the right way the main problem here is the fact that for the small nozzle we need a very small master voxel size I'll increase the resolution or rather decrease the master voxel size to 0.06 and turn back on the background simulation because now it is too slow to watch it simulates single frames the result is very turbulent when the fountain falls back into the pool it churns the whole liquid that even slops out of the pool well that's actually no surprise because when we check the size of that nozzle it turns out to be 20 centimeter in diameter and that's a very solid and heavy jet of water so let's make the nozzle smaller maybe 7 centimeters at this size the simulation isn't smooth anymore there are too few particles for the thin water jet so you know what's coming will increase the resolution you see that it is a back-and-forth between the lowest possible resolution to keep simulation time short and the necessities of the scene that force us to increase the resolution this is a master voxel size of 0.03 still not smooth and this is 0.01 5 we are getting closer this might already be good as an effect in the background in the next step we have to think about caching the simulation to bake our current results and to avoid recalculation caching is pretty straightforward just select the liquid container and go Bifrost compute and cache to disk you have the option to cache the simulation which includes voxels and particles and/or to cache a mesh a renderable surface the cache files will be written into a folder was the name of the scene and the subfolders were the names of liquid containers you can of course override that to use your own scheme the right mode lets you either write the complete time range or append the cache to existing cached frames when we start the caching the current scratch cache will be erased and the frame range will be simulated the caching flag and the name of the cash flow is automatically set here in the liquid properties container you can also set this by hand if you want to load any cached simulation into your scene when you load the scene with the cached file attached the cache file will not automatically be loaded this will take too long when you select the liquid container that has a cache then the timeline will be dark blue when you start a playback the cute frames will be yellow and the frames will turn green when they are loaded this was the second example in my introduction to Bifrost we've used our first motion field and slowly increase the resolution for the solver to get closer to the desired result so you see with the motion field you can I mean that is one one very basic example for the motion field to push liquid in a certain direction you can use it without a boundary or with a boundary like this one here but it's a it's a very simple example of how you can do that and I have to say it was surprised myself how simple the setup for that scene is but it has one problem of course you see that the fountain is disturbed by the surface of the water so as soon as water drops back into the pool and starts to make waves you know the fountain becomes very unstable and you know falls to walk from one side to another one because of these waves because it has to go the new water has to go through these waves so I've found a very simple workaround for that and that's this animation here on the left side you see the original found like in the video on the right side you see the workaround which works so much better the settings are identical in both cases the simulation is the same times but we have a little Collider here there's a little physical cube Collider around this motion field to prevent the you know the the beam of water the jet of water from these waves so it's a very simple thing and it helps a lot and you know mix makes the simulation look so much better so analyze you're seen think about what happens here and think about where where do these problems come from and try very simple things to calm this down mmm so you can use the turbulence field of course to make the volume or your your liquid more turbulent but you can also use very simple things to calm it down and to reduce the turbulence so increase the resolution or decrease the master voxel size and steps incremental ISM so make sure that you don't overshoot with a simulation because that you know it's gonna cost you a lot of time while testing the whole thing if you know all the settings you can bump it up all the way and simulate it over over the weekend or overnight but while you are playing you want to keep it as low as possible and keep the parts as simple as possible and always you know keeping them in the back of your head what's the master voxel size what's the size of my boxes in the scene why does it behave in a certain way so the screen resolution is too low I don't know what's going on here because on my screen on my second screen it looks good it could be that zoom scares it down because of a bad internet connection it's a way to loop the simulation perfectly not that I know I know for particles there are ways to do that to loop it perfectly because you would have to you know have an end frame as a kind of goal and use that as a start frame again I don't know if that is possible I keep it I keep it in mind and maybe I find a solution to to have it you know cycle as in a perfect way but as far as I know it works on me with particles because it's in this simulation it's difficult to do you know both the voxels the pressure and everything and the particles the motion and everything to have a perfect cycle I've tried already set the start frame or the start frame for a simulation at a certain frame so basically the technique would be take the end frame use it as an initial state go back to the start and then you know start simulating I'm not sure if that works I keep it in my mind and maybe I come up with the solution I'll post a video about it what's the best way of creating small-scale heavily are directed um we'll come back I thought actually I had a video about that so in the in the next section I have a video about this about fields or how you can use fields how you can use these motion fields so here in this video we see some motion fields and using these particles without a gravity so these motion fields are pushing and pulling particles in a certain direction and that way you can art erect particles on a small scale so these ones here are kind of tourists like fields misses its fill in the field with around the access forces to make a perfect wave you know out of nothing you have a perfect wave crash I don't know how this one is done but it's you know using the same technique it's only the one motion filled with different options this one here the waterfall is using a drag field to pull the water apart and create little droplets and those little droplets form create all the foam and this one is using geometry to attract the water into a certain shape so you can heavily attract the liquid using these fields certainly possible and this other video here is about geometry when you create a motion field and you have also a geometry selected then this geometry can act as a field you can use this together with all the other features for the motion field with inherent velocity you can set the amount of influence that the actual geometry has on the liquid here I've got some examples for the things that you can do with a simple geometry a rotating motion will of course create some sort of a vortex translations will also create very obvious motion note that the geometry is not acting as a collision object but not only transformations are possible all kinds of deformations will work like this bend deformer or like this vertex animation which leads to this example that's a very simple wave deformer on the geometry and if I apply that wave Li for mo to a polygon plane then I get this this is in fact the best method to create waves on a liquid it works much better than to try to push the liquid with a collision object with just this simple motion field that has all these appearances you can you can do a lot with particles and art direct them even in a in a very small scale spline paths not that I know maybe you can do something with geometry too create something like that but you know a regular spine class water flows from here to there to there no no not with nerves maybe it would be nice as a suggestion to make the Bifrost team think about it can I use a tube sword of geometry to direct the liquid yes that is what we just did you know with the nozzle it is a it's kind of a tube but it's not it's not a you know a hollow geometry you can use that as a collision object so you can really make shape a tube and push velocity your lip will also push the liquid through it and let it flow through it you can even place little fields in there to make sure you know it flows into all corners of your hollow geometry and fills everything as intended how do you solve voxels that shaded cubes I've used the mesh player plugin in Maya to create these voxel cubes and just as a as a way to show it in Maya in Bifrost you find a switch to show on diagnostic voxel display because the voxel size is also adaptive they are much bigger outside of the of the liquid simulation and you know the tiles become interactive that is not so nice to see so I made these objects in in NASH how can you emit fluid that is pressed out of a tube for example Sketchup okay so emitters when you have an emitter the emitter has a value called expand expand means that it it not only creates the liquid that is you know in this volume and then the liquid would fall away from that meter you can have a continuous emission and then expand it and create more that's actually in this volume so we're gonna talk about a continuous emission in the next example I'm not going to cover the expand example so you know pushing something out also means to force the liquid and I can tell you by frost doesn't like that at all don't force the liquids it's gonna you know you have to bump up the the resolution a lot and you have to cut the time into smaller pieces if you want to force the liquid do something like with a very high gravity that would be a high force or to force it you know through a small nozzle and do something like you know squeezing ketchup out of a part of the bottle it is possible it's definitely possible always think about the fields if you want a liquid go through a certain shape or so think about the fields you know a directional field with a boundary that's exactly the one that you want in inside your bottle and then you know just feed some liquid to go after that that will do already that will do the trick okay let's have a look at the next example because we're going to talk about the emission or continuous emission in the next example so what if you want to fill a container with liquids like under you know of this example here the image on the right side well how would we do that I can tell you this this emitter and that was my answer to that question this emitter here is continuous it does not expand so the liquid that flows out of it is simply pulled down and then the empty emitter volume is filled again with liquid that is also pulled out so that how it produces or keeps producing the liquid if you don't transport the liquid away it's not going to produce anything unless you expand you push it out and that is the force and then you have to chop the time into smaller pieces but we're gonna talk about this in this example so I this time I first stop the video and then start its first of my my what can here and then start the video just a second now let's have a closer look at in meters in Bifrost we've used the meters already but only to create a static amount of liquid for a constant flow of liquid we need to set something in the emitter again I'm using a super simple setup to test things out I have a simple trough and the box up here shall be my emitter the goal is to fill the trough was liquid in a specific scene size I'll make the box in a meter and the trough Collider and I'll create a kill plane in the emitter settings I'll turn on continuous emission the first simulation at the standard resolution of 0.5 shows that the emitter now keeps emitting the liquid splashes into the trough slops up the walls and does not fill the container hmm okay before I even try to fix the problem let me first check the scene size the pool is too big it is almost 20 by 20 meter let me scale everything down so that the trough is only 1 by 1 meter oh and by the way that's gonna make the problem worse I'll set the gravity 10 times higher to 98 and the density currently it is set to 1000 because that is the weight of one cubic unit of water by first zooms 1 unit to be 1 meter what's the new weight if the new scene is 10 times smaller than the new cube of one unit is 1 meter divided by 10 is 10 centimeter a cube of 10 centimeter filled with war is exactly one litter and weighs exactly one kilogram welcome to the beauty of the metric system so I'll enter a one here for one kilogram this is the same simulation at the smaller scene size the higher gravity accelerates the liquid so much that the particles are pushed through the walls of the trough also the liquid seems to disappear as if it would evaporate the general queue is always to increase the resolution or rather to decrease the mass the voxel size this simulation was done with a four times smaller master box'll size the particles don't get through the walls anymore but the liquid still seems to disappear or at least doesn't add up properly so let's turn back the master voxel size to 0.25 and see how we can solve the problems using some fine tuning options in the solver at this resolution there are some particles going through the walls of the trough looking from the top we can clearly see that the particles travel in one frame more than the wall is thick so in one frame they are inside the container and in the next frame they already are outside the container we need to calculate more steps to get this fixed and that is in fact possible in the solver with these adaptivity settings there are two sets of values the transport step and the time step adaptivity the transport steps help improve the accuracy of fast-moving particles while the time steps help improve the interaction with animated objects how does that work the adaptivity values define how far a particle can travel in one frame before its calculation is chopped into smaller pieces to make it more accurate the current setting for transport step adaptivity means that the particle can travel up to five voxel lengths before it triggers more sub steps in our example our the grit to show the voxel size from frame 15 to 16 the particles travel 9 voxel lengths so the calculation will be done in two sub steps in the next frame the particles still have that speed and again trigger a sub step but because the sub steps still have about 4.5 voxels some particles get through the collider wall which is only for voxels sake here's a table for the adaptivity values that show how far the particles can travel before triggering a new sub step so let's increase the transport step value according to the table maybe two zero point four and in the resulting simulation we can clearly see that the particles accurately stay inside the collision object the min and Max steps settings define minimum and maximum steps this way we can clamp the maximum iterations per frame and also easily set a minimum number of iterations however the adaptivity method has the big advantage that slow particles do not trigger extra sub steps and are therefore faster in the calculation the adaptivity is also highly dependent on the master voxel size let's say at a certain voxel size the settings trigger new calculations when the particles travel more than eight voxels in one frame all the red arrows in this examples are longer than eight boxes now when I decrease the master boxer size and the particles are still traveling at the same speed they would travel through more voxels in each frame now more of these arrows are longer than eight boxes even if the arrows have not changed as soon as you decrease the master voxel size many of the problems are going to disappear therefore it makes sense to adjust these setup tivity settings only when you have the desired master voxel size set and you still see problems like leaking colliders or inaccurate interactions with animated objects looking back I have to say I have to say that this is not so much about emitters basically it's more about you know the quality adaptivity settings the master voxel sizes so this should give you because that you know that is the most important thing how high do you have to go with your with your resolution you have to go very high to get all the details of water you know the little drops that escape from the main water body and that kind of stuff so before you increase the master before you before you increase this step adaptivity make sure that you you don't produce something that is not necessary that will go away anyway later in the in the process like here in this example we've seen that you know the problems that particle goes through the collider are going to disappear as soon as I have a higher a higher resolution or lower master voxel size so but I just want to make sure that you understand what these settings are because in some cases you have to go do this one do the adaptivity settings instead of the master boxercise because these adaptivity settings can save you a lot of time in the next example we will see one more application of this in reality so what we were talking about here is not so much emitters it is more you know analyze your scene find out what the problem is is that problem gonna go away when I increase the mass the voxel size do I want to increase it even further or you know is it problem gonna stay there and I have to do something about it also with their you know the thing with water disappearing this is sitting in the properties that erodes the water that removes water to make it you know create a crisp water surface in Nice waves this is under erosion you'll find these settings you can set these values to zero all the way and try them so it could be that the word did you know it much better fiddling in container with water and maybe you know you have to find a setting somewhere in between to make this make it look nice so with erosion settings feel free to play around with it it's nothing nothing's bad is gonna happen you know I was too careful with those and I've seen that my colleagues you know just play around send it to zero said to do one and you know compare the compare the values there okay so shortly about the emitters we didn't push the water out too much so we don't have problems there's one question here how can you morph one fluid shape into another completely different shape you can use a geometry to attract attract the water the liquid and you know that would be a way for me you can you can move a morph emitters for example and try that way morph fields so you have a motion field with a geometry try that to bring it you know change the values and one motion field fades and the other one is is kicking in so two two shapes of water like that I would try that immediately another question so I want to control the velocity of the particle so for example when particle speed is exceeding exceeding 10 kilometers per second or 10 kilometers per second is a lot there are maximum velocity settings in the properties in the properties node I think where you can set a maximum velocity so the particles don't go over that so that would be your way to keep the particles from you know overshooting from overreacting and also you can chop the time into smaller pieces if you know particles are exploding I had these cases when I turn on surface tension for example everything explodes and flies away yeah chocolate everything into smaller pieces and then you know the time especially and that's gonna work fine so chopping time into smaller pieces we can't see that in the next example I have to speed up a little bit because we are running over time already so in my next example I'm gonna use this Casa de of something and here we have this problem of the time steps that we need to chop the time into smaller pieces have a higher frame rate so to say and this is my example here I'm gonna turn off my video and then start this recording here with this same scene I'd like to talk about an attribute of liquids that we did not yet address this caused a team in all my examples of simulated water which doesn't seem to have any noticeable viscosity of course water does have a viscosity but it doesn't play your role in our simulation especially not in larger scenes but if we want to visualize viscous liquids like honey oil chocolate or lava then we need the viscosity sitting there will be a separate webinar about viscous liquids by my colleague John Paul Giancarlo where he gets more into the details in my example I'm using a continuous emitter and since the ground plane is still about two meters wide I'll bump up the viscosity setting to 600 as you can see this is already pretty stiff but it still melts together after some moments this is of course just the first rough test at the default master voxel size of 0.5 when the overall behavior is okay you can start to increase the resolution which means to decrease the master voxel size I'm going to set it to 0.125 which is 64 times the number of voxels it looks much but there are these weird segments the segments are artifacts of the emitter that we normally don't see in thinner liquids close to the emitter you can see what's going on in each frame the emitter is filled with liquid and only the gravity pulls it down freeing up space in the emitter to emit new liquid so this is actually a problem with our frame based animation approach we can now chop these segments into smaller pieces by either increasing the frame rate or with the time step adaptivity minimum steps I'll set this to - to get twice the number of calculations per frame now wait let's use the adaptivity setting to visualize it I'll set the grid size to 0.125 the same as the voxel size I want to trigger more calculations up here where the particles travel four or more pixels per frame so I set the adaptivity according to the table to 0.6 or higher so that our extra steps when the particles are faster than one box will per frame I'll also set the maximum iterations to 16 to see how high it'll go here's the result before after that's good isn't it the iterations went up to 10 for some frames you can see this information in the Bifrost head-up display which also shows the number of voxels and the number of particles be careful with the time steps because each time step executes or transport steps so that simulations become pretty slow when you bump up both values so here you've seen an example of me increasing the frame rate so to say so if we need to chop the time into smaller pieces instead of just saying okay I'm gonna have a larger frame rate and therefore you know I make more time steps the adaptivity makes sure that it's only doing that where it's necessary where the particles travel very fast and therefore trigger this this recalculation that's a very smart way actually and it's you know keeps your simulation times short so that you don't have to you know each time when you when you double the frame rate for example you would have twice as long time for simulation so the adaptivity helps you make that better again analyze your scene you see it here on the right side analyzing means try to visualize how big is your master box with files for example with a grid that's easy try to understand what's going on here why is it behaving in a certain way and just you know pick the right value to make that I could of course also in this icon will just increase the mass of oxidized until it is nice it's until it is good at a certain point this would certainly happen but as I said I'm simulating that on a laptop and I try to keep the simulation times as short as possible there was a question how could you inject thick fluid into an object yeah I have a question already so to inject the thick fluid that means to force it into you know force it into a certain region so what you could do of course is to create a collision object your so instead of having some liquid and a pump and you know pump it into a closed object you don't have it in in Bifrost so what you need to do here is to have you know a collision object for example in there an emitter with an ex-con setting so it pushes out the liquid that you want onto in check and try that you know with a certain expanse setting you produce more liquid then there is volume so it had it's gonna push the itself into into the container into the object that's one way another way would be a force field so a motion fear the directional motion field for example at you know the size or the shape of a pipe and you know keep feeding the liquid into that object then push it one advantage of Bifrost is that you don't have to deal with the air in that object so you don't have problems with air keeping the liquid into the last corner there is no air so it's not dealing with air density it's just the liquid so you can push it and we'll fill all corners of the empty object I would try I would have to test it I've never done that before but that's you know having little fields to make sure you know the liquid also goes in this corner here that's actually a good idea and that way you can art direct what your liquid is doing let's go on to the next one here the or the last one the last video in this in this presentation is about rendering how do we render these particles it's pretty simple when you use Arnold and that's actually good idea too in the first place just use Arnold and see what what comes out of it because that's very straightforward and very simple and you get results right away so by default it's using an implicit surface you see here they're the examples of the two renderings on the left side we have their implicit surface which means it's going to create a surface directly from the particles it's mathematically not very difficult and on the right side it has turned this thing into a geometry so we are talking about a polygon object the two are different because this one here the implicit surface is set in Arnold to be non opaque so it's transparent and it has a transparent shadow according to its transparency settings and this one here on the right side has an opaque shadow so it's not said to be transparent if I set or uncheck the opaque flag on this one here on the right side it's gonna look very much like this one on the left side here okay so with that set let me start the video the reef let's use this example to have a look at rendering a Bifrost simulation with Arnold I've added a physical skylight to my scene and increase the intensity a bit this is the initial render the liquid has some water shader attached it does some ray tracing and the very subtle shadow what we see here is an isosurface around the particles that is created at render time you can do some adjustments to control the creation of this isosurface and you can also cache this isosurface as a geometry the settings for rendering are in the Bifrost shape node named liquid shape one here I'll close the display section to get a better view when you open the section render you have the choice how to render the Bifrost shape by default it is set to surface it will create an isosurface at render time points that's actually the particles rendered as small spheres and volume for a cloudy volumetric effect the settings for each render type are down below here the layout is a bit confusing maybe you better collapse the sections you don't meet for the surface rendering there is by default of water shader attached since we are rendering with Arnold this is just the transparent AI standard surface shader when you render as points then the a our standard surface shader will simply be applied to small spheres in the case of the water shader with ray tracing this is a bit over the top when rendering as a volume you need to assign a volume shader otherwise you won't see anything in the surface controls you have the choice to create the surface from the boxes or from the particles voxels is the default but when you set this to particles you get some settings to influence the creation of the surface these settings are available to all render us and it depends on the renderer to use them or not so currently it is so that each time we start a render there has to be a surface created that can be rendered this process can also be cache which further reduces the possibility of things breaking in the production pipeline you can enable the output of a separate mesh in the Bifrost shape under Bifrost meshing there are the exact same settings as in the render settings of the note but the two are independent from each other as soon as you turn this on there will be the polygon mesh object visible in the scene it has the same AI standard surface shader attached to it as the ISO surface of the particles you should then hide the particles or voxels otherwise you would render both objects to cache this mesh together with the simulation turn on the mesh option and the cache elements in the compute and cache to this dialogue if you already have the simulation cached and you just want to also catch the mesh then enable Bifrost meshing select the mesh object and then go to cache Biff cache export selection to Biff with this polygon cache you can delete the Bifrost notes from your scene and import the cached meshes as a new object assign a shader and you are ready for production so you see going to render that is pretty straightforward if you use if you use Arnold anyway you can use other renderers if you catch the geometry any renderer will do will do just you know write out the geometry and it works all fine of course it's a resolution question I mean this is a very problematic example here because just such a viscous liquid melts together so there you know the surface is touched and then they mill together and you need a very high resolution to get all the details and you know the sharp edges between the different layers of viscous liquid so I found that a little bit problematic so we you know this is this example here has a very coarse resolution and to cause actually to to look anywhere no it's the same from water of course when you simulate water you have all these little droplets and you it's really hard to turn them into geometry and to preserve all the details that are necessary there so with the geometries sometimes you know you have to cheat a little bit in and we're gonna talk about that in the next webinar about water how to cheat with the little droplets that is the foam actually that you would create to produce water spray in little bubbles under the under water or little spray that is surfing on top of the on top of the surface here so depending on your renderer of course you know some things are easier and some things are harder depending on the check with your renderer vendor if they can render that directly the Bifrost stuff otherwise you would have to cast your my3 your cash points you know it can write out all kinds of various caches so we are coming to an end already let's recap we have looked at you know basic starts how to start with a very very simple scene so there's nothing to download no special scenes to download here you can all build from scratch what you've seen here can start create liquidity playing with basalt viscosity the resolution and scene size playing with motion fields cache the simulation as data and as geometry and render the whole thing so start playing around in a few weeks we're going to come up with the water webinar actually mean this one here with the by first water webinar it is scheduled for February 22nd and I'm gonna talk about water in general I'm trying to cover small amounts of water as well but I'm telling you that is difficult to simulate so if you can film it somehow a small amount of water to the filming otherwise if you try and simulate that you need very high resolutions and high frame rates to really capture that because it's a difficult thing to capture or to simulate water in that size bigger amounts of water like there around the ship or shore or a waterfall are much simpler to create and produce better results in shorter simulation times and with lower resolution with that I'm gonna go back one frame here for the links section my name is ole Andrea you find the my email address here don't hesitate to write me an email but keep in mind I'm gonna go on holidays tomorrow so last day last chance for you otherwise in February on February 12th I think I'm gonna be back and answer your questions you can also find me on youtube I have a YouTube channel and I will post these videos as much as I can on YouTube maybe all together as one piece or a single pieces I don't know you can also follow me on Twitter Facebook Linkedin and also have a look at the Maya Learning Channel there's a by first section you have to search for by first and then you find some interesting Bifrost examples that maybe two or three years old but many times are still accurate and tell with the right story especially you know this thing about the timestep adaptivity and transport step adaptivity and my colleague John Paul Giancarlo is also gonna make Bifrost webinars in the next time so check out this meaty experts website with that I thank you very much I'm gonna upload the recording as soon as possible keep checking the website and my youtube channel thank you very much bye-bye
Info
Channel: Roland Reyer
Views: 62,176
Rating: undefined out of 5
Keywords: Maya, Maya 2018, 3D, Autodesk, Bifrost, Bifröst, Dynamics, Liquid Simulation
Id: -oSoX4RXXFY
Channel Id: undefined
Length: 73min 44sec (4424 seconds)
Published: Wed Feb 14 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.