Bifrost Master class: MPM solver

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello and welcome to the NPM master class I'm Ted ghast from GCC effects and I'll be guiding you through the material point method solver or the NPM solver in Bifrost NPM is a method for simulating a wide range of physical materials from sand and snow to cloth and fibers it works on repeatedly switching between a particle and voxel based representations of the material the particle representation is used for tracking the motion of pieces of material these are the so called material points in the name the voxel representation is used for computing how the particles should move in the next time step the interaction between the particles with each other and with the colliders is all mediated by the voxel representation and understanding these two representations and how they work together is key to a deeper understanding of MPM so I'm gonna start with just a simple simulation that I've set up I'll just show you quickly what it does it's a snowball that hits a block and then slides down and hits the ground all right so let's first take a look at the Bifrost graph I've got set up so here we have the sphere shape this sphere shape is coming in from Maya and it's basically telling where we're specifying where we want to create the snow and we passed that geometry so basically it's just a mesh geometry that we pass into this source MPM snow where we set all the different parameters and whether or not we want it to be continuously emitted and so on and so forth and then we pass it in to this main solver simulate MPM into the sources as one of the sources of snow so then we have our two colliders we have our cube and we have our plane and they're both passed in to these collider nodes and then in to simulate NPM and then finally we have the NPM solver settings where we set the various settings and then we pass those in to the settings port on it a simulated NPM and then we take all the particles out of the main solver and pass them into the output so that they can be viewed in in Maya so let's take a look at this sim again so if you notice there's this rather large gap there and it depends which version of Bifrost you're using but a lot of them will have this large gap and I want to show you basically how you can correct that so basically what's going on there is there's a very variety of different detail sizes and the detail sizes on the colliders and then there's the main detail size on the MPM solver and the collider detail sizes by default are said to be relative which means that how accurately they're Vox alized is determined by their overall size so since our ground plane here is rather large that ends up meaning that the voxels for it are rather large so we get a large amount of special of separation here so what I like to do is just set up a global detail size that's used for all of our different things so I'm just going to take this detail size from the solver and put it in it as an input from from Maya I'll show you how we can change this within Maya in a bit so if we notice here it's it's basically paused because it's it's trying to recompile the entire graph so currently it recompiles the entire graph every time you make it any changes so that can get pretty slow sometimes so what I like to do is just press control period and that will pause the execution and then I can continue editing so now let's see we've got another open up this common properties on the collider put in the detail size open up the common properties put in the detail size the next thing we want to do is switch from relative to absolute relative to absolute and then reactivate can compilation with control period again and now let it compile and then switch back and look at the graph look at our output and go over here so we can see we have our Bifrost graph we can set our detail size right here in Maya that gets passed in to the Bifrost graph and now let's go back to the beginning see your particles now we get a much closer collision than before okay so now what I want to take a look at is another one of these global parameters on the MPM solver setting that is this one this scene units in meters so the scene units in meters tells Bifrost how big the maya units are so in for instance here this sphere that we created that's hidden right now for our initial snowball that sphere has a radius of 1 so it's 1 meter so that means it's quite a huge sphere so I actually want to make this a bit smaller I think that this scene units need to be shifted somewhat so I'm gonna say so let's pause the compilation and I want to say that my scene units instead of being one my unit is one meter I want to say that one my unit is instead a quarter of a meter so in other words our sphere now instead of being one meter the one myosin unit now late Stu a quarter of a meter so our sphere is now a quarter of a meter in radius and in doing so you have to remember all of the other parameters so the sizes get changed but all the other parameters retain the same units in particular the detail size is always specified in meters basically all the parameters that get passed in not through the geometry themselves are going to have units in meters so when I change the scene units in meters I'm actually going to effectively change the detail sighs so let's just see what that hide our sphere again and go back to the beginning you need to resume compilation all right so we can see that our particles have become quite a bit larger now because they are represented relative to the detail size so in order to match this we're going to need to shrink our detail size again so let's see let's take it down to point zero four it's roughly the same a little bit different but so now the overall sim looks a proper approximately the same you can see that there's a little bit of a difference in the speed that the particles fall down because of the difference in the influence of gravity and the way that they spread but it the overall this it looks very similar all right just so let's see the next thing I want to do let's do another one of these global settings I personally prefer the to the disk I prefer the sphere I just find those look a little nicer and we don't really need our spheres to face the camera that's more for the flat ones all right so now we see we've got a bunch of little spheres instead okay still looks more or less the same we've got a little bit of a gap here but we can refine that by decreasing the detail size even further these particles are still rather large so let's but before we mess with our sim more I wanna we're gonna focus on changing the look of the snow and for changing the look of the snow we have a whole bunch of different parameters down here and we're gonna be investigating those now now I'm gonna go into a bit of a deep dive here we're gonna get a little bit technical on what exactly is going on so what we're gonna do is each of these little particles in addition to tracking its position and its velocity and those properties it also tracks how much it's been deformed and it uses how it's been deformed so how its been squashed in different directions in order to decide how it's gonna push back on the other nearby particles and so what we're going to do is we're just going to go into a little bit of a deep dive into how do we track this deformation and what does this mean for the sim and what do these parameters have to do with that tracking process and and so forth so I'm going to open up a new Maya scene that we can use to take a look at that all right so now I've got this little cube and this cube is what we're going to use to talk about the deformation so for this little cube we can see these are there's three axes three main axes for the cube right we've got the top and bottom side to side front and back and basically what can happen to this cube so the cube overall can be rotated right but that that sort of rotation is it doesn't really affect how the how the cube is going to push back I mean if we change the orientation of the cube then it's gonna change the direction but overall it doesn't it's not gonna change the amount and what not so we're basically going to ignore the rotational component of the deformation for from now on out we're just gonna assume that we've got a little cube and that the that we're gonna stretch it and we're gonna compress it in line with the axes so here we go we've got a little cube I'm pushing it squeezing it in I've got it in ping pong mode so it goes backwards but you can basically see that we're squeezed squishing our cube in so this is basically just like a pure pure scale in the Z direction okay so that's that's pretty simple right now for for us what we're gonna be focused on here instead of thinking about it in the three different axes right we can think of it as squishing in each of these there's another way of thinking about it there's another way of parameterizing these deformations and that were what that's what we're gonna look at we've got what I've called out over here the volume strain the shear strain and the load angle and now let's just go through what these mean one at a time so I'm gonna change these other ones to zero and just let this one be save one so what I'm calling this volume strain is basically just a pure scaling it's a uniform scaling the same in all directions and as you can see this form of scaling is basically in it looks the same no matter how we rotate because it's just uniformly scaled in the same way so now let's look at the next form which is going to be the shear strain so for the shear strain basically what these do there's actually a family of these but the idea behind the the shearing strain is that it's going to preserve the overall volume of the cube but change its shape so in this case what we can see is we're pulling it along and this pulling process when we pull it outward it shrinks in the court in the opposite directions so that the overall volume of the cube stays the same under this deformation and now let's look at the load angle so the load angle is basically this third parameter changes the different types of shear strains that we can have so it effectively changes whether we're squishing it majorly in one direction whether we're and how much so and and so forth so it has a variety of even things here we're pulling it apart on this side and squishing it on this side but in all of these different cases no matter what the load angle is we're getting the same volume for the cube the volume is overall preserved and the way that we change the volume is by changing the volume strain so we put this in there and then we can see that now we are changing the overall volume of the cube and that's what I want to say about that so now let's go on to the next phase which is how is the cube going to fight back against this deformation so I'm going to switch to another scene so now we've got another little cube here and I've got the same controls over here as we had before right but now I'm gonna put on these arrows right so the base the most basic form of fighting against or creating forces to push back is what's called elasticity so elasticity means whatever we however we squish or squash our cube or stretch or cube we're going to fight back against that overall deformation so here we can see that basically as we pull the cube push the cube inward we get these arrows and these arrows represent the forces that the this particle is going to use to back against the neighboring particles so when we push it in when we squeeze it inward we're going to we're going to elicit a force that is opposite that basically pushing back to try to regain our original shape so that is that's the basics of what elasticity is these arrows and whatnot and how they're computed the sort of the the state of these forces we call that the stress so this is we strain the cube by changing its overall shape and then it reacts by creating a stress that pushes back against the strain that's sort of the more technical engineering terminology for it and so we've got this guy we're gonna push and pull so now let's take a look at some different kinds of strain and what the what the stress is gonna look like so let's say that we get rid of our shear strain and now we've only got volume strain so when you've only got volume strain you're changing the size of the cube and so the overall forces are going to be wanting to change the size and they're basically uniformly outward in all directions in this case when we're straining it when we're making it smaller whereas if we were to say get rid of this negative sign and we're making our cube bigger now the arrows point the opposite way because we're gonna try to shrink down the overall size of the cube so it's pulling back inward in all direction and this particular form of stress has a name that you might be familiar with it which is just a pressure so these changes in volume elicits pressure and that's basically if you're familiar with safe fluid simms where they have a pressure solve you're basically taking the you have your velocity field of your water or whatever and then you try to compute a pressure that can basically cancel out any of the volume change that the flow would create and these pressures here are similar except in this in the sense that for these elastic materials they they allow the volume change to occur right so we're allowing the the individual grains of sand or snow or whatever to gain to get larger but then they pull back in so for our elastic material we're basically when we grow we're gonna pull back in when we compress we're gonna push back out all right so that's that is the volume strain and then for the shear strain you basically get these similar well they're kind of weird-looking forces but basically they are still acting to bring the bring the cube back to its original shape so we're changing the overall volume but we always want to the stresses overall are going to try to bring us back to our original shape and now what we can get into let's let's go back to the uniform case because I think that one's the best for our purposes so we've got a negative 0.333 so now we're back to the uniform strain in one direction and now what I want to do is talk about so these guys weren't actually parameters of the sim they're just sort of things that happen to our particle but now we're going to get into the volume preservation which is one of the snow properties and sand properties and whatnot and so basically what the volume preservation does is it balances between how much force the how much force we're going to resist changes in volume versus changes in overall shape so what that means is that so right now with the volume preservation of zero we're not we're not going to increase the amount that we're trying to preserve the volume over the the shear strain they're basically perfectly balanced and then when we as we increase it so let's say we take it up to 0.5 now we are increasing the amount that we want to preserve the volume so in other words since the the there's two things that happen to our cube right we push it in on the sides and that is going to change the shape of the cube but it also changes the volume right and so basically what this when we increase the volume preservation now we're saying okay well we want to increase the amount that we are going to push back against that change in volume and so our cube now when we push it in the the arrows don't point exactly back outward again they've also point like right these guys they point upward they're not just trying to do that and basically what this is this is responsible for is say when you are for most materials right if you were to compress it like this it's going to try to push outward right it's not going to just push back in the exact same direction when you squeeze something it pushes outward in both directions in order to retain its volume so in other words the the strength of the amount of volume preservation is higher than just trying to purely preserve its shape and there's a similar thing that will happen when you are stretching it which is that you can see that it pulls back inward right the forces are going to pull it back inward and that's why when you stretch something it tends to be that its forms those it forms these sort of arcs where we can where the overall material tries harder to preserve its shape or not sorry not shape it tries harder to preserve its overall volume then then its shape so when you stress out the stretch out the cubit doesn't remain a cube but the forces can figure it so that it will get that little arch there and and whatnot and that's basically what this volume preservation parameter provides now if we set it all the way up to one when you set it up to one basically it no longer is gonna even consider the shear strain anymore at all and it's only focused on preserving the volume which means that your material will then behave more like a fluid in that it's not you're going to be able to mess around with it quite a bit more and it's not gonna care because it's only going to be focused on preserving its overall volume so as we can see if I say change this shear strain to be say 1/2 or 0.2 the overall arrows are not changing the shape is changing just because of the difference in this shear strain but the the overall forces are always trying to preserve only the volume all right so now let's continue on with in the next visualization all right so this visualization this one is actually very similar to the previous one but I just want to show you a bit of a different way of thinking about it so in this visualization we're gonna visualize what do these forces do right so in these previous ones I was straining it and then we were seeing what the direction of the forces were but now what we're gonna look at is instead when you have some sort of initial strain and then we were to allow the material to change based on what the the direction of the arrows originally we were showing the action that we were doing to the cube now we're gonna show what is the response of the cube gonna be I've still simplified it in that it's only going to take into account what the response would be just at this particular second it's not going to take into account sort of the evolving change right because at every every step when you were to if you were to change it it would sort of change its shape and then there would be a new stress in response I'm not gonna bother with that we're basically just looking at so how do these arrows affect it right so that's so this is basically our pure stretching case and now when we boost up our volume preservation like before we can see that now we're also trying although we were initially shrunken in volume we're also now we're basically trying to grow in size right and we can look at different cases right so if we were to that's a little bit too much look at different cases we can see how these overall stresses will affect us so now we gained volume so our cube tries to go grant get smaller and so forth alright that's all I wanted to show for that one that's just basically a simple visualization of what the forces are gonna do okay for this visualization I've basically created a grid of those little cubes that I had before now they're all colored green and what this grid represents is I'm gonna change how I'm deforming each of these cubes in a different way so this axis right here is going to change volumetric Li either they're all going to uniformly increase in size or uniformly decrease in size and then along this axis up here I'm going to increase the amount of shear strain so let's just I'll just play through that so we can see here we've all grown inside here we've all shrunk in size and here we've all shorn and then over here we grew in size and we shared and over here we shrank in size and we shared so what is this visualization for well basically what I want to talk about now is the concept of plasticity so basically for an elastic object all of these different states it's always going to try to return back to this rest state the state where there's no deformation occurring right we would take something that grows in size we're going to try to pull back shrink in size where we share we're gonna try to return to the original shape and so on so most of these granular materials though that we're representing an NPM they don't always do that in particular let's say you were thinking about something like dry sand if you have something like dry sand what does it mean for this little box to grow in size well basically what it means is that locally to the particle the region in space that it occupies is growing in other words the other particles are pulling apart away from it so when when the other particles pull apart away from it the sand doesn't actually want to pull them back in because there's nothing connecting the the grains of sand to the neighboring grains of sand so you have to think about this not as just like what's happening to an individual grain of sand but what's happening to the bulk behavior of the sand so when when the region around the part of grows like this really what should be happening is that there's air flowing in and so the particle the sand is not gonna try to shrink that back down so what that means is we want to have a model that can basically be more specific about what sorts of things can be admissable in other words what sorts of deformations are we allowing to to happen and well not what are we allowing are we are we going to fight against and which ones are we not going to fight against right so we basically will allow all of these deformations but only some of them were are we gonna fight against and so that's what this visualization is about right now everything's green but let's say so here we've got our two main parameters for the plasticity for the for the sand we have this friction and then we have the cohesion and basically what the cohesion does is it tells us how much of this volume change we're going to allow and how much we're not so in all cases when the minimum amount of cohesion is zero we don't support negative cohesion basically what you what you can see is that we only are going to support fighting against deformations that shrink us down so in other words we can only have positive pressures pressures that push us back out and no negative pressures so this means that the sand is going to be very dry in other words when the sand tries to expand just a little bit there's no forces there's no water or anything that's going to keep it together so it's basically free to expand outward and it will not try to fight that all right so now let's look at this second parameter basically the second parameter is related to this shearing and it's particularly related to this line and how steep the line is so in other words this is controlling how much shearing can we under go relative to the amount of volume strain so how much shear strain can we have relative to our volume strain and still we want to fight back so in other words as we decrease the friction so if I say 0.1 now you can see that my line has gotten much less steep and there's a much smaller amount of shear that we're allowing to occur before we fight back it's much easier to shear too much and the material just sort of continues to slide and that's basically what what this idea of friction is all about is that when you have a small amount of friction then it's very easy to slide against each other and it won't fight these sort of shear strains as much and if we increase the friction we can see that it gets higher and higher so basically the way that I've constructed these parameters you can never get this line to be fully vertical it would require a state that's not accessible but it does get increasingly and increasingly vertical so that's basically for the what the friction does in terms of this we'll look at this a bit more later into how how this will actually affect the behavior of the sand but I just want to give you this demonstration so we can see what is actually what does that friction parameter actually control and now let's look at the cohesion I'll look at varying it so basically as I said varying the cohesion is just going to shift this guy oh this line along this axis so when we have 0.5 cohesion now what that means is that there's a little bit of volume change that will fight so if we if the sand pulls apart a little bit it's still going to try to shrink back and otherwise it's not going to shrink back at all so if we if we pull it apart too much then it will give up and and so forth let's now talk about what exactly happens when this the state of the sent and gets into this red region right so basically what's gonna happen is the material is gonna forget about some of the deformation that is occurred and I'm in this forgetting what that means is that it's no longer gonna fight about against it it's just going to forget that it even happened so the rule for the sand is actually fairly simple and I can explain it like this if you have any amount of volume strain that's above our cohesive limit right what's going to happen so in other words if we're over here in this square over here it's we're just going to forget about all this strain over here and just set our strain back to this so we're basically just going to forget that we shared it all and we're just going to forget that we grew in volume at all we're just going to go back to this amount of volume change and that's how much we're going to fight against and then for anything above the line strictly above the line what's gonna happen is it's just gonna forget about any excess amount of shearing that has occurred so in other words this guy down here is going to go down to like right here these guys are going to go down to here these guys are going to go down to here so in other words it's going to forget about the shearing but it's going to remember the amount of volume change that has occurred here I've I've Illustrated that process we have this now I've cut I've changed the shape of these red guys to show you what is the deformation that they are actually going to remember so in in other words just as I was saying this guy here is sets the deformation that all of these ones remember so this guy at this tip and then similarly here they all remember this deformation and and so forth and if I change the values we can see how it changes so now we can never remember any expansion we're always just this size so in other words when you have cohesionless and it cannot remember being pulled apart and so that's why it doesn't have any cohesion because it will not pull back in if you pull it apart if you break it apart okay now I've switched the visualization so that instead of showing us what has been remembered I now show what has been forgotten so over here in the green region now everything is just a cube because I am remembering everything so nothing has been forgotten I've remembered that the this has happened and while over here I've forgotten that we grew in volume so this can be interpreted as some volume gain and then I've also forgotten that the that the sand was sheared and so we can we can also change these parameters here and we can get a look at what happens so now we there's less volume change that we actually know there's more volume change that gets remembered but and less that is forgotten when we change that and similarly if we shrink down our friction we can see that there's quite a bit more shear that's forgotten okay now I have a similar visualization but instead of for the sand model it's for the snow model again I've got the total deformation here so we can see we've got increasing in volume in this direction decreasing in volume in this direction and increasing and share in this direction so for the snow model instead of being just a line that we look at whether we're above or below now we have this little ellipse that we that we look at and to decide whether or not we're going to be elastic or plastic so that means that now in addition to gaining volume when we when we're over here and the we forget about our volume change we can also lose volume when we're when we're over here and in that case it basically signifies that the that the material is actually compacting like how you can compact snow down to make it more tight and so that's really the main difference between the snow and the sand model so even though they're called snow and sand you can use them for a wide variety of different materials in like dirt and clay and whatnot and actually this model was originally used for clay so it also works great for that and for other sort of things like that so let's go over what these different parameters do the cohesion actually has actually let's start with the firmness I think that's that's sort of the new parameter so let's start with that one so the firmness basically what that controls is how far over this other point is so where we start allowing for compaction and where it will start stopped of doing that so if you set the firmness to zero then effectively what that means is that we're gonna allow anything to happen and we're not gonna fight against any of it that's what firmness is zero will do and then what we can do is we increase it it basically [Music] increases where we put this point so it increases the allowable deformation along this axis and because of the lips shape it basically means we allow more and more shear as well so you can see that that's basically what that does it it allows us it increases the size of the elastic region and allows there to be more and more things that we're gonna fight against in other words that's why it's called firmness is because the firmer you make it then the more it's going to fight against stuff all right let's see let's let's take a look at another one of these parameters so now let's go back to the cohesion so the cohesion has a similar meaning to the sand but it's not exactly the same because now the cohesion is always interpreted relative to the overall firmness whereas before it was more of an absolute cohesion it would slide this point along this axis now what it does is it's more of a relative cohesion so if you set the cohesion to 0.5 basically what that means is that if we think of this distance the distance set by the by the firmness as 1 then this guy is going to be 0.5 so it's going to be 1/2 of that and that ratio is what is what is preserved so in other words if I set the firmness to 0.5 now the cohesion is going to be half of that or or the like the absolute cohesion would be this distance here would be 1/4 of that so what is that what does this mean it means that you have to remember that the cohesion is always relative to the total amount of firmness okay so that's basically what our cohesion does so it again it allows us to to fight against some increases in volume and that's what makes it stick together the next thing I want to talk about is the friction so the friction has a similar sort of behavior in that it will increase the amount of shear that we can satis relative to the amount of volume change so let's say we put that up there so now we can see that this guy is larger larger region of allowed shear and if we put it down here there's a smaller region of a loud shear but it's always basically keeping the same overall shape of a note of an ellipse and just this height basically depends on how much friction we allow so how much sheering will be allowed is a function of not only the friction but also the firmness because if I increase the firmness you can see that this size of this guy has increased and actually the way that this is designed is if you look at the point this point on here this point as we increase the firmness keeping the friction fixed this point at the top of the ellipse basically trake traces out that same straight line that we had before for our for our sand model and that is actually an important property and it's sort of the unifying thing that unifies this friction with with the previous one all right and that and that is because there's another parameter another plasticity parameter that we haven't talked about yet which is the hardening and the hardening is actually a different sort of thing because if you notice I call this the here the firmness but on the actual parameters in the snow there's initial firmness and hardening and that's because the firmness for snow is actually tracked as a dynamic property it actually will change as the snow evolves in other words as you compact the snow it's actually gonna get firmer and as you pull it apart the snow if you break the parts know apart it gets less and less firm so the initial firmness only sets the initial value of that firmness parameter and it the firmness actually will evolve over time being tracked on a per particle basis depending on how the material is changed so I'll just go into a little bit more detail on that but the basic thing that happens is when we perform this procedure we're where we see okay well we're outside of this surface called the yield surface and we're going to yield our material is going to yield and it's going to basically forget that deformation that we had before we look at how much the volume has changed so if we're forgetting about a gain in volume or if we're forgetting about a loss of volume so if we're forgetting about every gaining volume so we're d compacting and if we're losing volume we're compacting then basically what we will do is we will take that value that we get multiply it by the hardening and then add that to the firmness what it means is that when the when we when we're over here and we're compacting so basically anything on the side of if we look at this top point here anything over here is considered compacting and it's going to be losing volume anything over here is can is actually gaining volume so anything so when we compact what's going to happen is we're going to gain firmness and when we gain firmness that means that our material is becoming more and more strong against compression and conversely when we when we're over here and we're being pulled apart we actually lose our firmness because we're being pulled apart and we get weaker and weaker until we get to zero in which K once we're at zero basically we just let let whatever happens happen until such a time as we lose more and more volume so we're compacted again we can in fact get positive firmness again and in fact we we don't just stop our firmness at zero we allow it to become negative and when it becomes negative it effectively acts the same as firmness zero it's just keeping track of how much extra volume we have gained and once that volume gain has been eliminated then we will and start to increase our firmness and start packing more so if you want to have snow that is basically you have just free grains or whatnot that don't affect each other then what you want to do is set the firmness to a negative value and then it can become compacted over time as it depending on what happens to it and I can actually be a very useful way of sort of identifying where you're getting some debris because most of the time you're gonna see that debris particle is gonna have a negative firmness value all right so this is all been rather abstract with these deformations and whatnot and now I want to return to our original snow on the block diagram so that we can get a more intuitive understanding of what do these parameters mean so I've explained the parameters in terms of these sort of mathematical diagrams and showing how the the strain and the and so forth affect what's gonna happen but all of that is is pretty abstract and I want to get into the sort of the more intuitive specification so just to see just to be able to visualize what is going on and we're going to still use all these notions in the in the following they'll even be able to plot out these sort of similar diagrams see this the the volume gain and and the shear the volume strain and the shear strain and so forth and get a sense for what is actually happening well as the sim evolves okay now I'm back to the simulation that we were looking at before so I've updated the graph a little bit I've put in this split points by material now we only have snow particles but that's just for clarity sake we only want to take all the snow particles and then I'm gonna put them into this MPM snow scope which is a compound I created to help us visualize what's going on in the particles in other words all that internal state that I've been talking about we can actually visualize it so what we can see it's got a bunch of different colors on here so I'll just briefly go through what these mean so the debris color essentially as I was talking about before it will track the firmness of an individual particle and when that firmness becomes negative is more or less debris in in the sense that it would just get sort of pushed around until it's compacted enough that it will reactivate and so whenever it's firmness is less than zero set it to be the debris color which in this case is just black then I have the undeformed color the undeformed color means that if effectively the deformation local deformation that it's been tracking on a particle is zero so it hasn't changed at all from its initial state and that color is as we can see green and then I have the deformed color which essentially sets what color something is as it is deforming within the elastic region or the region where it will continue to fight back against changes as they come so in other words if you think about our ellipse from the previous example as we get closer to that ellipse it's going to turn in more more and more to the deformed color which in this case is yellow and then we have two more colors and these relate to what happens once we exceed the ellipse or once we're starting to deform plastically or in other words we're not fighting against the deformation entirely where we're starting to flow be it to squeeze down or stretch out and that's exactly what these two colors are used for so the unpacking color is basically the color that's used when we're when our firmness is going to be decreasing in other words we are gaining volume and in that case we turn this unpacking color so our snow is unpacking it's being split apart what not that color is cyan and then the packing color is the color that we use when it's it's compacting when the firmness is increasing and that color is blue and these two colors are fairly close to each other so it can be a little hard to tell the difference but for our purposes we don't really need to tell the difference that much but if you if we're looking at something else you might want to change around these these default colors so this diagnostic geo essentially just outputs the particles with those colors and let's take a look at them now so right now we can see they're all green because they're all undeformed and then I can run the sim now immediately we can see some massive changes we're getting a lot of debris and a lot of blue particles blue this light blue cyan means that it's effectively unpacking and we can see that because we're getting a bunch of debris and then that debris is all piling up down at the bottom so just from looking at this I want our snowball to be a bit more firm in the sense that in this kit in this example it's just bursting up into a bunch of debris immediately I want to try to get something firmer something a bit more solid so what I'm gonna do is head over to my source NPM snow and now we can mess with these parameters so in order to make it firmer well just change up our initial firmness so let's change it to 10 okay so let it recompile that go back to the beginning and let's look at what has changed so we can see we're still seeing a lot of this deformation a lot of destruction there's a few more chunks surviving but I think I want to boost it up even more all right now let's boost it up to a hundred see what what that does okay so now at a hundred we can see that the the thing is more or less elastic it's perfectly balanced at the tip of that cube and so there's a variety of things that we can do we can keep tuning these parameters but another thing that we can do let's make it I actually hit that guy with some velocity let's say that we're we're it's not just sort of appearing in midair hovering there but in reality we would have a snowball that was actually hitting at some speed and this is a trick that I use all the time for when I'm doing these snowballs is that there's no real reason to simulate the entire flight of the snowball you can more or less just backfill those in based on the velocity and unless you want like the snowball to sort of break apart in midair and have chunks coming off of it there's no real reason to simulate that part so you can always just sort of backfill those in later so I like to just sort of start it out very close to the collider and then just set some initial speed on it so I'm gonna set initial speed of 10 so that's fairly fast but not too fast that you couldn't throw that fast and let's let's see what what we get now oops go back to the beginning and we can see all right so we're getting we're getting some chunking now but its overall behaving more like we want maybe I'll decrease that initial speed some so you can see even though when we looked at it before it was complete it was pretty much a solid when we sped up the impact it was still able to to break through now one rough guideline that I like to use is that when I'm going to balance out the initial speed versus the firmness if you have something that's the velocity of that that object when it hits something is say so right now since we're starting out right there our velocity is 10 so balance out with the firmness you more or less want to square the velocity so look at the velocity squared and balance it out against the initial firmness so that's why I chose 10 here because 10 squared gives us my initial firmness of a hundred and you can do the same thing more or less if you were say starting from just sort of dropping something on the ground you can look at the height that it falls multiplied by your gravity that will actually give you a rough estimate of what the initial speed squared would be which and then would give us a rough estimate of what the initial firmness would be more or less for it to start breaking apart although that's always basically a guideline it's not a strict rule and remember that these other parameters like the friction and the cohesion also come into play into how that initial firmness gets interpreted right so if you remember the initial the firmness more or less talks about like the the packing side on the like the compression side when you're pushing it in whereas if you want to look at when you're pulling it apart like we're more pulling apart or breaking under friction so if you're pulling apart uniformly in three all three directions that would just be the cohesion times the initial firmness and then you also have to take into account the effect of the friction times the initial firmness and that also will change the shape of that ellipse that we were talking about before to make it narrower and thus less able to resist sharing so let's let's go back here and now let's let's take a look again okay so now we're getting some good solid chunks still quite a bit of debris I want to reduce it somewhat let's look at this again let's take is down too let's change our initial speed let's go down to let's go down to six see where that gets us okay so now we can see alright now we basically get it cracking right down the center and then half of it sliding off that looks pretty good for what I I'm going for I've got a lot of debris everywhere and now now what I want to show you guys is another piece so right now I was just I was just showing you the diagnostic to you now I want to show you this pressure sheared view now what this is it's more or less transforming each of these points it's putting it into that pressure and sheer space that I was talking about before basically the except where the ellipse lives so now if we look at the this we can basically visualize where all of the individual points are within that ellipse and I've just set up a little translation here so that it's not in the middle of our geometry and we can we can look so let's let's look at that so go back to the first frame alright so we've got our guy in green here that's seeing our point let's advance one frame just so we can alright so here we go we can see quite a large region where where this ellipse is now as you remember it's a bit more complicated than it appears but because each individual particle has its own independent ellipse that it's that it's tracking more or less and you can more or less see that for most of them there's some sort of ellipse shape right here so we can see down here green this is where it's not very deformed and as we get out here it's yellow and it's more and more deformed so essentially what we can see is that these particles so quite a few of them are still not broken but there's quite a few that are down here with these black points and then we have the blue particles that are plastically deforming and by and large it looks like most of them now let's just get our bearings based on this color right we've got that the cyan side this is the unpacking side so and then the blue side is the packing side so we can see more or less that we're more on this packing side or unpacking side actually and less on the packing side if you notice there's some sort of slope here this basically has to do with the has to do with the friction because yeah it gets complicated because all the different ellipses are all drawn on top of each other so don't want to get too into it but one thing that you notice right away is that most of the states of stress that we're in are in this portion right there's not a lot over here there's not a lot over here and that's basically because it's very very rare while you're deforming your sim for you to be squeezing on it in all three directions uniformly or pulling it apart most of the time you're going to be up here so let's do another step now we can see now to be honest I usually don't turn this guy on because I just find it a bit of a distraction but it can definitely be helpful especially if you have some individual particles that you want to figure out what's going on you can isolate those and then they can be a more clear signal on what's happening now let's let's just turn that off okay so now we've done that let's now take a look at some more of the parameters so first we were just messing with that firmness to get it to to more or less break apart immediately when it hits now I want to look at the effect of another one of those parameters let's just take for instance the cohesion right so if we if we lower the cohesion then what we're going to do is more or less we're gonna get smaller chunks when when it breaks apart it's still gonna break apart there's no doubt about that we're just gonna get fewer chunks and the chunks sizes are our overall gonna be smaller as we can see and that's basically on account of the fact that the cohesion shrinks down the amount of expansion that we can take before we start breaking apart so let's let's put that back actually let's go up let's set it to one now and just see what happens there no but this we're gonna get larger chunks and actually here we can see we didn't really even break apart yet let's look at that in our visualization of the stress so so we can get a sense for what happens when we don't break apart and put that back in there okay so now what do we see so we can see there's a few guys that are black have basically more or less failed already but we've got quite a few guys that are still yellow all the way up here we can look at all these states of stress and there's so many that are still all inside but if you notice the overall stress distribution looks very similar to what we had before right so one thing that we can that I like to do in order to sort of try to predict what's going to happen when we change our parameters is say you're doing like an impact test like this basically what you can do is you can run it with some very very elastic parameters so that you can more or less see the stress in the entire thing like we've got we can see basically what's gonna happen and then you can save out that sim with all the all the snow particles and then later on as a in post you can run it through the snow scope and experiment with what would happen if you were to change some of the parameters and the parameters are snow stored on the snow particles so to do that all you have to do is mess with the stored parameters and you can see how those plasticity parameters would change what happens so you can basically get a predictive sense of okay well if I were to change the cohesion like this then these particles which right now are together would then break apart and so you can more or less use it to visualize what particles are going to fail and where they're gonna fail and then you can further use that to sort of set your initial state on the particles just to basically figure out okay well I want this part to to fail now so I want to set these particles to have a different parameter value and so forth and that sort of advanced usage can be very helpful for when you get into large sins that take quite a while to run because it it more or less gives you the ability to make inferences and guess about what's going to happen the next time you run it without having to rerun the entire sim you can just sort of mess with the properties in the visualization and see what's going to happen now of course the more you're messing with the parameter in your test the less it's going to less information it's gonna give you and it more or less works best for men for figuring out stuff near the beginning of the sim for stuff closer to the end it can be more more difficult let's do another test this time I'm going to decrease the friction we're going to keep the cohesion where it is right now but we're going to decrease the friction and this is going to shrink the the width of the ellipse and so we should still see some we should still see some breakage now so let's go back to the beginning alright so now we're seeing that breakage and as we can see if you look at this the overall height here has shrunk considerably because of our friction so we're seeing that we're getting yellow right here was before we were quite a bit higher so this is just going to show us what I was talking about before so now let's actually look at what's happening with our object we're getting a lot of breakage but then we get some we get some healing and we can see that now we are pretty much done so we were getting enough compacting there that it was able to heal itself and not further deform so we had some plastic deformation we had enough plastic deformation to get us to this state but we didn't actually get enough to majorly break us other than right here at the at the interface this ends this NPM master class video for now but look for more tutorials in the future
Info
Channel: Maya Learning Channel
Views: 16,458
Rating: undefined out of 5
Keywords:
Id: GGnyd4zD5pY
Channel Id: undefined
Length: 70min 13sec (4213 seconds)
Published: Wed Feb 05 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.