Maya 2018 Bifröst WATER Webinar

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello my name is olondria I am an technical specialist at Autodesk media entertainment in Europe in this webinar I'd like to talk about water simulations in Bifrost I've collected a number of topics in this slide here that I want to talk about so we're gonna pick a few of these topics in my first webinar about the basics in Bifrost I was already talking about liquid simulations motion fields caching and a little bit of rendering and if you have not seen that you can find this recording in my youtube channel and in this session here about what simulations again of course we are gonna going to talk about liquid liquid simulations we all we will also touch the Bifrost ocean simulation system called bas motion fields again with geometry guided simulation of course for simulation of oceans for example and then again a little bit about the rendering topic of Bifrost so my first example he is a is liquid in the small which has some very special challenges when we talk about the forces here because to make things look small I have to increase the gravity a lot so the gravity has to be huge and for that we have to find ways to get around you know the liquids freaking out after that so we have to deal with a very high gravity so we're gonna talk about scene size how to resize the scene using the settings in Bifrost and with that also talk about transport and time step adaptivity which is a which was a very helpful topic here because you can learn a lot from it when I think of fluid simulations there's always a certain scene that comes to my mind and I'm probably not completely alone I want to simulate pouring a glass of wine it's probably much easier to film this thing which means there's hardly any reason to do this work however I would like to use the example to address some problems with this type of simulation as I said I'm probably not the only one trying to simulate such a scene here are some pictures of tutorials I wonder who would pour a glass of wine like that maybe you get the last drop out of the bottle but otherwise you can't just turn the bottle around and let the wine gurgle out so I have my own setup here the wine should flow from the bottle into the glass in a controlled manner for simplicity the bottle is not animated instead of filling the whole bottle with wine I make a smaller emitter in the bottleneck the emitter is located in a collision object we can hide the bottle right now I also cannot use the glass in this form the walls are much too thin to work as a collision object therefore I simply create a better collision object starting from the wine glass okay the procedure is always saying I select the emitter and go Bifrost liquid then I select the liquid node and the collision object in the bottleneck and make the collider I will do the same with the collider for the glass but I deliberately separate the two collisions objects because this way I have two collision property nodes and I can set the properties for the collider separately oh and finally a kill plane in case I spill something are we done yet no in my first webinar about the basics and Bifrost I always pointed out that you should be aware of the size of the scene before starting the first simulation this scene is huge for Bifrost the wine glass is 15 meters high and the neck of the bottle has a diameter of 2 meters actually the wine glass should only be about 15 centimeters high the scene has to be about a hundred times smaller I explained in the first webinar how to scale the scene sizes in Bifrost if you didn't attend the webinar you can watch my video on my youtube channel first the gravity must be increased by a factor of 100 due to this high gravity the movements of the liquid appear much smaller but we will have immense problems with assimilation next the density of the liquid must be adjusted in the emitter the value 1000 set here is the weight in kilograms for one cubic unit of water by default one unit is one meter for Bifrost and one cubic meter of water is 1000 liters and that weighs 1,000 kilograms if I reduce the scene size by a factor of 100 then a unit is only one centimeter so I have to enter the weight of one cubic centimeter here a litter consists of 1000 cubic centimeters and if it is water then it weighs one kilogram one cubic centimeter is considered to be the thousandth part of one kilogram therefore we enter here one divided by 1000 equals 0.001 and of course I must not forget to enable the emitters continuous emission otherwise not much wine will come out of the bottle before I start the simulation I should think about the mass the voxel size at the moment master voxel size is set to 0.5 which is much too coarse that's probably why we see only very few particles I like to use the grid to help visualize the master voxel size this would be the current master voxel size of 0.5 this would be 0.25 here we see 0.125 that might be enough for a start alright let's start the first simulation the simulation speed is just bearable right now I just want to see some frames to decide what needs to be sit hmm unfortunately the simulation is not very stable the liquid jumps wildly around and doesn't deliver nice picture this white behavior is mainly due to the very high gravity for simulation in this size range you have to either make the master voxel size much smaller which of course increases the calculation times or you have to calculate finer steps which unfortunately also increases the calculation times I tried first with finer calculation steps the transport step adaptivity value is used to calculate particle movements in several steps when the particles move too fast say a particle moves through ten voxels in the frame the particle flies through walls because they are less than ten boxes thick so as that the transport step adaptivity to simulate all particles that fly faster than five boxes per frame with more calculation steps this table shows which well used for transport step adaptivity generate new calculation steps at which speeds if I now increase this value I get more precise movements and especially the collisions become more accurate I'll put the value up and the simulation will look like this hmm that didn't solve the problem transport step adaptivity actually helps when it comes to collisions but when it comes to wild simulations or the interaction with very fast animated objects you have to use time step adaptivity the same table applies here too there are min and Max step settings which are very narrowly set in the contrast to the min and Max of transport step adapt to the gene so I have to think about how many steps I want to take at all remember all transport steps are executed in each time step the number of calculations can quickly become very high that was the values depending on the velocity of the particles is a lot of guessing if we don't know exactly how fast the particles are fortunately such values can actually be this plate here in the particle shape there is the possibility to display numerical values for example velocity when I turn this on and zoom in I see that the velocity is about 30 to 50 that's quite a lot I think so our first set time step adaptivity so that the computation is done all five voxels and it should be a maximum of 30 steps things calm down now after a few frames we have a quite stable simulation in the head-up display I see that up to 12 time steps can be reached I could now simulate batch tests serious to find the optimal values but it might take as much time as if I simply set the values high and accept the longer simulation times long story short I then half the mass the voxel size and the simulation looked like this that's all right I guess when I render this though it looks a little bit unrealistic ly fast so you should keep an eye on the general speed for me it was also a surprise to find out you know when we when we simulate water on us on such a small scale or in such a simple example you know it looks very simple it's just a glass of water come on companies can't be so difficult to have all these challenges you know this overwhelming speed of the particles this force that cast them apart and lets them explode it gets even worse when you start to use surface tension that I didn't even use that here because then your particles completely explode as soon as they touched something you have to over semble a lot to you know calm this down and get something that looks a little bit like water with the surface tension so be careful with this stuff always check is it necessarily really simulated or isn't it cheaper to just you know film it on a table with the tablecloth sometimes it's easier but let's assume you know whatever we do is necessary because you know filming it would cost us even more so next example is a bigger size a much bigger size we talked about an ocean you know you see this image here on the right side with a ship that is one of these examples that we always show when we talk about guided simulation so guided simulation means we have an ocean that is already moving so we have some sort of waves going on or something in some ocean already and we want to simulate on top of that using that using that motion that we have already so best example is a very high wave and then you know something crashing through the wave at one specific location so we want to have that wave is fine but then we we don't want to simulate the whole ocean that costs too much time and we don't need that so what we need here is guided simulation with Libya we take this animation that we have already which can either be some some geometry or it can be some lower is a low resolution liquid simulation to guide our high or high resolution details that we need in a certain point in a certain spot so instead of a ship I'm doing something else here and again it was a challenge a surprising challenged because this my example seems to be more difficult than the ship example here because with a ship you have a relatively flat ocean most of the time so in this example at least it's relatively flat and the challenge is more to you know find the right values with high resolution so that the form looks nice for instance and then blend these animations together with the rest of your ocean so in this example I want to talk about guided simulation in Bifrost guided simulation means that you have some simulation already if either some polygons or some low resolution by for us and you want you to use this and transfer the motion over to some higher resolution simulation so here's the page from the maya 2018 manuals for the guided simulation and you see this nice illustration and I recommend you to walk through these instructions because it's really step by step instruction to how to set it up so in this example here you see that labeled with a we have some sort of an ocean and animated mesh in this example can also be animated Bifrost similar liquid simulation that is the Guyot B is our emission region that is the region where we want some liquid simulation to happen to have some higher resolution around a Collider which is labeled with C here so the ship for example the typical example is this image with the ship that drives through the ocean with the various layers that are then blended together for the final result I'm gonna make something maybe more difficult this example here for a lighthouse in the middle of the ocean I want to have some waves running over a rock for example and you know water is running off the rock and simulate that so my example is very simple I have made this very simple Collider for a lighthouse let's say the top of these cylinders that is my actual lighthouse then the middle level here is also some concrete construction and then the lowest level here that would be the rocks and I expect the water to run off of these and you see here great should be my sea level in some waves are washing over this rock level in other ways you know are below and then the water should run off of it I'll start with creating a polygon plane like so I have a certain size in mind I want to want it to be 15 by 15 meters and I also have a certain resolution here so I set it to 200 which looks very dense at the beginning but it's not for all the details you get from such an ocean wave simulation this is actually pretty long and to create this actual simulation ago to but my bad Frost's settings into the boss editor the Bifrost ocean simulation system and with this polygon selected or create such spectral waves solver that has a lot of settings to define how the waves look like you see when I scrap the timeline and we see some waves going from right to left here I want to turn this around and frame one is always nothing because in the solver we have framed two as a start frame I can simply go to frames 1 and say set staff start frame for all so that makes it already so for the settings first the direction of the waves down here in wind attributes I can sit this angle to 180 and then this turns around the whole simulation here we should set this patch size so what we look at what how big is it what we are simulating currently because that defines the size of the waves and also the height of the waves I can later define the height of the waves a little bit higher and also use horizontal displacement which makes the vertices not only move up and down but also left and right and back and forth which is important when you drive a liquid simulation with that one I can set a wind speed let's say 150 meters which is a storm so it's a pretty strong storm already so you see when I when I do this while we get very high waves so that is a that is a stormy sea already and it washes over the base level of my of my lighthouse here are the things that I consider is adrift for example so the water flowing from one direction into another one let's say we make something like 2 meters per second which is strong you know that's a strong current going from from the left to the right you see that the waves are moving in that direction and of course that should have an effect because the lighthouse stands in the middle and the water has to flow around it so we can use this polygon geometry here as sort of a collision object in the boss editor so this is now an influence object and it should have you know because of this current here we have some sort of a wave happening behind in the in the director of the current wave happening behind this collision object because this becomes slower now slower and slower the more stuff we define here it becomes slower and slower we should also use the cache and I'm gonna do that and and stop the recording for a moment ok now with the cache I can scrub back and forth and I'll see all the results of my simulation some of the simulation will only will work forward but now with the scratch cache I can I can use that to be a little bit faster so now what's the liquid simulation so we need to bind in this surface here as a guide we need to have this as a collision object obviously and also an emission region which is here I have it as a template object that's this one here so that's my emission region and we're gonna use that as well the workflow is so that you first select nothing and go into Bifrost and create a liquid that is completely empty has no connections to anything so there will also be no particles then with the liquid selected you also select this polygon animated polygon object and go Bifrost at a guide so this guide will now drive this liquid if we still don't see anything because we also need to go select the emission region together with a liquid and tell Bifrost at this as an emission region and from that moment on you're gonna see some party that's here you see the bounding box appear the partings are very thin that's why I'm gonna go into the outline the attribute editor fluid shape here here's my point size so I'm gonna make this a little bit bigger so here are my particles I can then again hide my emission region I don't need to see that one anymore and also in the liquid shape I can turn off the bounding box which is sometimes quits at least it's not needed before we do anything else we also need to set this as a Collider together with a liquid so here under liquid we go add Collider and then when it refreshes you see that there's a big gap between the particles the liquid and the actual Collider object and that is why we need to set now a few more things together with the guide at the guides guided simulation so the first thing here is to go into guide property into the guide properties node that is there all the time when you do liquid simulation but now we actually need it so here on the guided simulation you find this input section and here we have a guide voxel scale so that is a separate scale for for just for guided simulation and it also influences the scale of the thickness for colliders so I want to turn this down a little bit because this gap was too big you see now it's it's much better and when as soon as I increased the master voxel size this is gonna happen work better and the particles go closer to the actual geometry the next value this one here min simulation depth will look down below this thing here wow there's a lot of particles there it's actually a volume and that's what it creates it does not just simulate on the surface it creates a real volume so in case something splashes into the water or in case you have waves that do something that that need a volume to simulate this is too big I can turn it down to two or maybe 1.5 to have less of these particles below the sea because it also you know slows down my simulation times the next settings have to do with the emission region you know this hidden template object here so in the emission you would set the type of liquid that you are simulating here in this case it's water because one cubic unit of it weighs 1000 kilogram as we can see here you could also influence the size of the scene with the density of this object here we can send a death age so when particles escape this emission region after three seconds they would simply disappear and die so it's removing this part of the simulation that escapes the actual way here and this blend with guide value is important because at the border you know at the border of the cylinder here the particles are gonna follow the guide but right beside it they are not following anymore so there the liquid is doing its own thing more or less and with this value you can bump this up so here with one you would have a full following here on the border and you know it decreases going to the center in a linear fashion using this value okay this this this is a setting that you should definitely do and now I'm gonna run a simulation and we have a look what it would it look what its gonna look like maybe I'll increase the mass the voxel size first a little bit to 0.25 or so so that we have more particles and you also see that this gap here is gonna be reduced with more particle I'm gonna run a simulation and stop the recording for a moment and here we go you see this is the simulation with both objects on you see that that's a funny behavior you know some some of the particles some of these liquid particles flow over that animated guide surface which looks really funny they also interact with the collision object so with the lighthouse and with the rocks with a lower law rocks layer but something that I don't like is that some particles seem to be underneath the surface yes underneath the surface of our similair of our animated object and that's a problem so I've made the second version of this animation which is this one here where I have cut out that region where my liquid happens actually took a copy of my emission region and cut it with a boolean operation cut it out of this animated ocean surface so that we can better see what happens with the liquid not everything is perfect so we have some problems because this region is too small but I can clearly see how the water runs through or and around this lighthouse and off this rock layer rock level which is exactly what I wanted so so far it works fine now let's talk about rendering this whole thing because we have some special problems here with the two objects intersecting each other so I consider the particles here the liquid simulation and object and of course the polygon animated polygon plane is also an object and the two intersect each other and we need to separate them and create a proper mask to be able to render them separately because let me first create a light here from our not physical skylight and then increase the intensity a little bit and make an initial render so here you see both objects together and the the polygon plane has a standard Lambert shader and gray and the water here on top is how it's actually hard to see but the two objects intersect each other and I cannot just render first one and put it on top of the other because it's not exactly it's not a thin object so our water object is not a thin object so when I select this polygon plane here and hide it and render just the water you see oh there's there's a lot more underneath we have some depth to it and we can even see it better when I create a separate shader to for it let's say a standard surface shader and this standard surface shader I'm gonna make it or it's white by default so here we can clearly see what the problem is so we have some surface on this object and some parts down below and you cannot separate the two there's no way to say hey this is the surface and this is down below because it's a it's more or less of volume and we need to have some sort of a mat channel to separate the two and there's something built into this into the liquid note here into the liquid shape note for rendering so down here in the render settings and I closed the the points controls and the volume controls here under the surface controls you find ocean blending and ocean blending oh I want to enable it of course so let me turn it on this alone doesn't do it so the whole process is a little bit more complicated as soon as you enable it this value is gonna be output to the shading system the ocean value you can call it whatever you want so I could make a channel called Roland for example and it would use that as well so let's use the standard ocean value or ocean name for rendering so first we need to connect the bus output to this one here and that unfortunately I cannot drag and drop it so what I need to do is to turn off auto load and then take the bus output and say use selected so now the boss output shape is connected and I can turn out a load on back on it's still not gonna work so now when I render it I see this oh my god what happened so my whole liquid simulation seems to have disappeared and we substituted by simply a plane a planer thing that hides my complete simulation you can use this value here the vertical offset with the negative value let's say three units or so and move this plane down by three meters so that it's downloaded you see three meters is not even enough here here on the side it's diving into this so let's make this four meters four and render this one don't go too far because that's gonna cause other problems so here you can see we have this plane and then you know this this this volume portion this underneath portion is also here so now we need to set everything transparent that it doesn't belong here to our surface and that is done with this value so using using this this new surface shader here that I have applied to my liquid shape I'm gonna going to create a new node called user data user data float because this ocean value is just one float and I tell the system here I want to please give me this ocean value I want to work with that one I can't use it right away because it's in the wrong direction I have to reverse it so I'm gonna create a reverse node and feed in my output value into all three inputs because I basically need a color as an output so now we are there already maybe I do something else because there's also a note called remap color which I can use to take such a color output and adjust it a little bit so I could use ramps for example to bend it and I can use these input and output ranges to work properly so for my shader I pluck this color into opacity which is some sort of a visibility for my shader so here you see already oh this is not so bad so it blends out most part of it and make some sort of a some sort of a ramp here between black or this is half transparent so I can even go and and bump this up a little bit by either using this minimum input value so let me turn on now the IPR here because then this border here in the back which is the back of this plane of this liquid plane here also has some right values and we need to need you remove them right so we going up with this one here a little bit until these pixels have disappeared and actually this region down below here has has to disappear there's another thing that you can do in the liquid shape here you have this boundary radius thing let's try to bump it up and see what happens you see it's even you know going denser so now we can actually remove more part of this and get get rid of this of this edge here in the back in the back of the shader so I also have a bump this up here so that the edges already become transparent that's what we want to do so this is just an example shade I'm gonna remove the shader altogether and actually I want to for my liquid I want to assign this water shader again assign material to selection and then I then I poured it in here because I want to pluck my output into this opacity of my watershed and you see now the water shade up can now blend into the rest now I'm a unhide my boss output and I take this shader and drop it on the boss polygon as well now we have both objects here with the same shader together and now it's blending together actually this is not gonna work so what I'm telling here is nonsense you cannot render them both at the same time so what you really have to do is to hide this object render this portion first so we need to have a match channel which we cannot see properly here because the SkyDome is in the back so I'm gonna turn the visibility of the sky dharm down and then when I render this I can switch on the Alpha Channel and here's you see in the Alpha channel we have an alpha Channel well that we can use to bring the two images together so the background + these this liquid on top of that so that is the workflow you have your user data the ocean that comes from the liquid and will be blended together remember to reverse it and then remap color it so that you have some values that you can use to to drive this up and down so this was my example for the guided simulation just the takeaways here so we were using we were using the boss the buffers ocean simulation system to animate this plane here and then you know generate a liquid simulation just to get the details where we want them so here in the middle around this supposed lighthouse where it was and then we needed ocean blending to put these things together ocean blending was particularly difficult for me because the manual the help manual was was not very helpful in this case I mean it was talking about the right things but I you know the step by step thing was missing so I couldn't figure it out so this is my third example this again is a very scripted and very formalized thing so we get through that very fast because time is running out we probably gonna over run but this is a very interesting example of the waterfall because it's you know heavily using the foam so normally I click on foam and leave the values like they are and before this one he needed some tweaking and two different fields one for the water and one for the foam separately because the tool have a different behavior okay so let's have a look in this example I'd like to create a waterfall a waterfall is easy right just create an emitter and let some water flow over some rocks and we are done but when you search for waterfalls in Google Images you will find that there are many different kinds of waterfalls there are small streams splashing over cliffs powerful waterfalls when an entire River thunders over ledge long thin ones when the waterfalls very deep and almost completely turns into spray I chose this one as a goal this is vernal falls in Yosemite National California actually this waterfall is already a bit too big I would like to have it a little smaller and see how the water in the air is torn up into smaller and smaller droplets and then become spray which is carried away by the wind but I like these structures when the water falls down and dissolves here I have a super simple experimental setup where I can test the different settings the water will be emitted from this simple box and run over this collision object and fall down I built the scene in the right size the trough is about two and a half meters wide and the water will fall about fifteen meters deep I select the box and create the liquid then I select the liquid and the trough and added as a Collider oh and let's not forget a kill plane so that the water is removed when it gets out of sight I put that one down here okay let's run a first test oops I forgot to set the master voxel size to 0.05 otherwise we won't see any water particles also I need to set the emitter to emit continuously okay let's run a first test here's our waterfall well it's a bit boring isn't it the water particles fall straight down there are no turbulence azure swirls or anything maybe we expected too much strictly speaking the liquid and Bifrost moves in a vacuum and therefore there can be no interaction between water and air there is no air in Bifrost that could be added at all all we can do is to imitate the effect of air resistance we can do this with a drag field the drag field is part of the motion field so let's add a motion field and turn off everything except the drag field the first value drag is the proportion of velocity that is transferred from the motion field to the particles since the motion field does not move in this example drag acts as a kind of friction in space and slows down the particles we leave the value quite small the second value normal drag is a bit more complex normal drag works similar to drag but considering the surface of the water more drag is applied on the front of the liquid surface than on the back this causes the liquid to break up and spread I set this value higher than the regular drag with these settings the water will already look pretty good we will get structures that look like those of a real waterfall however it will be difficult to intensify the effect the drag field slows down the fluid too much in the settings of the motion field however it is possible to limit the influence of the field to just the surface of the liquid I set this value very low so that the drag field can actually only slow down the fluid very superficially just as the real aerodynamic friction would do here you can see the result first of all the water is slowed down slightly and forms into lumps these lumps are then repeatedly flattened and torn into smaller pieces eventually it becomes droplets that spread further all this is still too blue and watery for me but I think we are moving in right direction actually the blue color we see here is only a so called diagnostic shader and has nothing to do with water what we see here is a ramp which represents the velocity of the particles as a blue gradient if I adjust this a bit it looks like this foam or spray on the surface this is of course only an illusion we have to create the film explicitly as a separate object at least it's pretty simple I select the water and go Bifrost add foam at first it looks like this at certain points in the water white foam particles are created and then simply fall down infirm properties I can now adjust how many found particles are generated under which conditions they are produced how they behave and how they finally dissolve first I lower the emission rate then I have to set the conditions under which foam is generated on the water surface when the water exceeds a certain speed when the water is agitated swirled up and stirred when the water exceeds a certain curvature but how should I know which well use are correct here how do I know which well use of velocity churn and curvature are present in the fluid Oh for speed there's actually this diagnostic shader which shows the velocity as a blue gradient hereby I can easily visualize where the fluid reaches high velocities and also in which range these values move unfortunately churn and curvature are missing from this list I have to switch on the calculation of these values explicitly in the liquid properties node and then repeat the simulation see here now the values are available in the diagnostic shader so that I can visualize churn and curvature let me adjust the values I also adjust how deep below the surface of the liquid foam particles can be created if I increase the minimum value a little then not as many particles are produced at the surface emission flatness to surface set to 1 will always transport the particles immediately to the surface of the liquid emit motion streak randomizes the particle positions along the velocity vector when they are emitted higher values may help to reduce banding but also may result in a noisier appearance now to the settings for the behavior of the form particles I turn on evaluate neighbor tile and compression model those are supposed to simulate a kind of volume so that the foam particles influence each other evaluate neighbor tile also includes the setting preserve volume and the volume behavior this should be greater than 0 the value target density belongs to the compression model together with the value point radius it defines the accuracy of the a calculations of the compression model dissipation rate defines how quickly foam and spray these souls I'll set it a little bit lower buoyancy finally causes the phone particles to rise to the surface of the liquid that doesn't really matter here after these settings the simulation looks like this at the moment this doesn't look very good and that has to do with the representation of the particles all particles are displayed as single pixels the foam particles are completely white and opaque I'm now going to enhance the display of all these particles by using the diagnostic shader that way I don't have to render to get an idea of the look of the simulation this looks better already I'm now going to make another motion field for the foam to carry the spray away and swirl a little bit this motion field is not particularly complicated I switch on directional to and turbulence the directional field is supposed to represent the wind as direction I enter a vector to the top right then I put drag a little higher to slow down the spray a little bit finally some turbulence ready the simulation will then look like this not so bad right the spray may be a little bit dense but this is just a hardware rendering we get some characteristic structures here in the water and the movement of the water and spray looks already pretty good especially considering that we started this test with a really simple test scene so the general setup was a very super simple one so when you look at a an example of a waterfall like this picture here you know you are tempted to make a difficult setup you know with a complex complete collision object and so try it simple first try the super most simple thing that you can think of to get an idea of the values you know you have to set it up a few times to get an idea where are the values that make sense and what doesn't make sense otherwise you create things that don't make any sense and just slow down the whole thing and then of course have a look at the diagnostic shader it's a lot of information in there that will help you find the right values sometimes I felt a little bit lost you know when it comes to min liquid churn and maximum liquid curvature and that kind of stuff I thought where the hell do they get these values from that's exactly from these diagnostic shaders and of course the numeric display so net next and last example it's not the best example I personally I like the waterfall a lot because the outcome is really something looks already very good you know you know it's hot it's a whole illusion we didn't set up a shader we didn't set up something that really renders good with shadows and so it's just an you know the thing with the diagnostic shader it's just a Harper shading that looks nice that's why I like it a lot so my last example here is this waves crashing on a shore how do we create that how do we make these waves how do we push the liquid to you know produce these subsequent waves that crash on the shore and that there's also a very simple example a simple demo that we did on you know just a laptop I have to prepare all these big assembles on my laptop which is an HP Z books that we received from HP with some 64 gig of ram so it's a zet book g-iii which is good machine it's a very fast machine has a lot of RAM and of course that helps but for these simulations you know all the kind of rendering power that you have is very useful so with that said let's dive into our last example here I'm gonna turn off the video and the microphone and show you this last example okay here's an example of how you can use a geometry or a motion field actually to create waves for a beach or you know a shore situation where you want to have waves crashing on the shore we all know this beautiful example of this speech rendering here the waves crashing on the beach and onto collide or objects onto collision objects and of course in this resolution it takes a little bit longer as always we start with a very simple example I haven't my scene here a few objects that I used to create this water situation so the first of which is this wedge-shaped block of water that sits in a bunch of collision objects so what we can do now here is to take this simple object and go by for us and create a liquid out of that I can then immediately hide this object I don't need to see the object anymore but we need to keep it as an emitter object for these particles that gonna show up when I'm at frame 1 and then I will you notice it the particles a little bit bigger so that we can see mobile so I want to start simulating with a very relatively low resolution and then you know adjust the values and then go higher so this model he or this system is now in a perfect rest when I use these colliders here and add them as as collision objects and by for us their nothing's gonna change when I hit play you won't see any motion because the collider or the water block fits into the colliders perfectly so now I want to start to create something that creates waves for this I will use a simple polygon plane let me move it up here a little bit and scale it so that it intersects with the collision objects around it so we don't have any spill at the borders so it will perfectly control the liquid around so now move it back so that it you know releases these waves here on the on the beach I don't want to coentrão control this very thin layer of water here on the beach I just want to release the waves and then let the liquid simulation do its job so and then I move this down here to the level where it intersects with the particles and what I also do is to increase the resolution because now when we add some simulation to it or some waves wave deformer we need some resolution to actually show this and the actual wave deform of that I'm gonna use here is is the boss tool so I'm gonna open the boss editor and emboss with this geometry selected I'm gonna create a spectral wave solver the spectral wave solver has a bunch of settings that allow me to control how this object is going to move so right now when I scrub the timeline you see that some some waves they're gonna move sideways here from the left to the right and that the first thing that I can change here is the wind direction here in the spectral wave so I set it to 90 degrees and now the waves are gonna go into the correct direction so from in this case from the right to the left onto the shore this is an important one and then of course also the wave heights and the depths so let me go back to frame 1 here and set the start frame for this to be frame 1 so the wave height defines you know how how strong this de forma is gonna work and I actually don't like to have the up-and-down motion too much so I set this to a lower value as the default I want much more is this horizontal displacement so I set this up and when I overdo it 3 here you see when I when specially when I turn on wireframe on shaded you will see when I scrap the time and what what it's doing so it's doing a left and right you know left and right back and forth but not so much up and down movement and we want this back and forth movement for the waves to push them a little bit in a certain direction so I set this to one higher than the actual wave height and with that the settings for the spectra solos are okay so I'm now gonna use this geometry I can turn off the wireframe on shaded now use this geometry and the liquid and go into Bifrost and add this as a motion field so in the motion field and I can hide the geometry instantly so in the motion field I need to first set what I want so I want the geometry to influence my object here and I don't want any directional field or anything like that so all the settings that meta are here in this in this geometry section and the thing that I want to do is to inherit velocity so when the when this geometry moves back and forth it's gonna inherit this velocity and actually enhances or makes it stronger so that this movement of the waves will be transferred to the liquid and also it has a fall-off so it only works in a certain distance which is OK for me and now when I start the simulation I mean we look at that it's gonna look like this so as you can see we have quite an interesting motion with relatively a little effort that was easy to create and the boss spectral solver actually serves a very good as an as a as a wake for these for these waves because these are real waves or these are you know this is a simulation that is very close to real waves so when I take a look at this I can also go into the liquid shape and change the colors a little bit you see this ramp here for the velocity of the particle suspend for you know a unit range from 0 to 20 when I turn this down to like 10 or so we see in white a little bit more of the actual velocity of these moving particles which to us looks very much like you know like foam on the surface but we have to create the foam separately so I simply select the liquid and go Bifrost at foam now that creates another object you see here we have now a phone shape and it also has a point size let me set that to 3 all the way and in the foam properties I can now define how and when and how much foam is going to be created so for example how fast this the liquid have to move to create some foam so I can set this up a little bit I don't want you know to speed the speed to influence the foam too much but on the other hand you know I want to have fun created when the liquid is churned when you know when the waves are breaking that is when I want to have fun so I lower the minimum requirements here so to get more foam when the liquid or when the waves are crashing on the shore so when I have this I can start the simulation and I've cached this already of course for you and it looks like this now you see the foam here is alright also very realistic already with very little effort we can use these these default or almost these defaults to create a very interesting simulation with a few clicks and with very little effort in terms of calculation time so this is still very low resolution I have not yet increased the master voxel size coming from 0.5 so that was relatively quick to simulate but then of course you know as soon as we add more things like stones and stuff like that and we want to have final resolution finer details then we need to increase the resolution and run more tests to see how these attributes behave so here is an example of such a test where we use a variety of settings like inherit velocity for example to test how the water is going to behave and how the simulation is going to go and that of course you run it over night or on big server machines to you know free up your interactive machine for simulation like that so finally here's the final simulation of the shore of the beach situation it's a beautiful rendering I really like it a lot yeah I wish I had the rendering power to make a simulation like this one here and to you know have nicer examples but of course that that takes a little bit longer you know to look at that level of detail for the farm and also for the liquid you need some more rendering power you also see here something that people have asked me already how do you make the beach wet so in computer graphics we all know things like rain on the surface is nice you can simulate some stuff but to make things wet really is a difficult problem so how do we make that that was a post thing so in the post somebody you said okay when when we have some water in this region here we simply take the mat and do an average over several frames and this average is used as a wet channel or you know a mask for wetness on the beach here and that's how we or how they created this this image of the wet sand that you know when the water flows back it also removes the this liquid from the sand interesting example here okay with that set or takeaways here start low resolution and simple setup always don't try the full-blown thing like we have it here in the nice example to try the very simple thing to find the right values as always use the diagnostic shaders and you should really plan when you start with Bifrost you should really plan and say okay I want to try different settings I can't do it right now so write down the batch commands for these different settings and run them overnight you can do that in Maya interactive so you can tell by for us not to run in the background there's a it's a check for background processing turn that off and then you can scripted it or collect a bunch of you know commands that are echoed when you started interactively collect these commands and say okay I'm gonna run these overnight because you know that's that's when I don't use the machine and I can and I have time and I want to see the result tomorrow so we are over time already thank you very much for being here so a few links before I go so my email address is simple to get rollin dot Raya at autodesk.com send me a mail if you have any questions find my channel on youtube i will upload this video as soon as I have the recording and edited recording and you know cleaned it up a little bit I will load it up there in my youtube channel takes a few days or so and you will find other interesting videos and since you have my mail now you can also send me send me questions and send me a proposals of you know what what a good webinar would be my colleague John talked and Carlo was also there you see his YouTube channel here on the upper right he's gonna make a webinar about Errol the use of Errol you should have a look at that and then of course we also have this Maya Learning Channel about Bifrost there are interesting things there you should also have a look at that there's one more question here okay yeah about the about the mixing of liquid and boss so here in the scene of the beach there is no bus or bus is not a renderable object so the water surface is an old boss simulation the liquid or the water in this scene the beach scene is really a Bifrost liquid simulation so you can of course render there together with a foam you don't need to render them separately I recommend to do the ogre so because you can tweak it in the post but there is no boss so the boss simulation thing was a special case when you have an ocean for example you want to have this endless ocean that's an ocean shader basically and you you can't simulate this big thing here so that's why you create a plane and with displacement maps you create waves etc and then you to cut out a piece and say I need to separately simulate this part here to have you know collisions with rocks or with a ship or so so in the beach scene there was no interaction between between or don't know no visible interaction between boss and Bifrost thank you very much for joining me and as I said visit me on YouTube and join me on LinkedIn Facebook or wherever you find me just google my name thank you very much and bye bye you
Info
Channel: Roland Reyer
Views: 30,898
Rating: undefined out of 5
Keywords: Maya, Maya 2018, 3D, Autodesk, Bifrost, Dynamics, Simulation, FX, Waterfall, Shore, Beach, Guided
Id: PRy7MjmQmFQ
Channel Id: undefined
Length: 60min 42sec (3642 seconds)
Published: Mon Feb 26 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.