Dune Solver - Stream setup from scratch

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay i think this thing is working okay so i got houdini here um and the first thing you want to do is you want to once you have the dune solver downloaded you want to so this is just a brand new scene you want to go up to install asset library and make sure it's installed and depending on where you put it in your folder structure it when you open houdini it might automatically find it and install it um you can check that by um going up to assets and asset manager and then you should be able to search for like just like dune and um i think in this case you can see nothing comes up but if something comes up then then it will point to you to where it's installed otherwise go up here to uh install asset library and you can say you know install it just in this file or put it into one of the asset library directory so that it always becomes installed go over here in this case i'm going to go to let's see if i can remember how to navigate to it hda folder where i have it downloaded and uh i'll just do this one i think accept and you can just do install and now it's installed and now if we go up to asset manager and research for this i hope this should come up now current hip um well you can see it at least here um let's see dune yeah there we go now it shows up so you can see it's installed into the current hem file now the way you want to set this up is first we will do a height height field you can just drop down a geo node by itself but height field kind of works now in the height field node one thing to note is a height field is made up of two primitives by default and these primitives are basically uh 2d volumes made up of a lot of points kind of like think of like a two grids of points and so each of them stores a a array sort of like a grid array of float values um and we can actually let me just make sure this is isn't too big so i'm going to set this to 100 by 100 and grid spacing of like 10 so this is going to be a really low-res one and then if we turn on uh voxel data you can actually see all the data stored in each every single voxel you want to be a little bit careful with this because if you have a really dense grid it will or a grid with with a lot of voxels it can take a long time to populate this so um but turn that off and so you can see voxel resolution so see it's 10 by 10. one thing i like to kind of turn on sometimes is there's this volume max value and a volume min value those are kind of nice to sometimes keep track of what your volumes are doing but anyway let me uh get back to just making this a simple intro and then i can get more into the specifics later so in order for the dune solver to work um we need a little bit of additional layers and the way we are going to do that the main layer we need is a sand layer and so we can create that by saying a copy height field copy layer so that's going to take one of those two height field layers that that are created by default either the mask or the height and create a new layer that we will call a sand and so now we have a sand layer it's it's an empty sand layer the source was the mask in order to make that to give that sand layer some value we can actually just we can do uh noise we can do height field high field noise and we can add that noise to directly to the sand layer let's make sure it's adding and that we're not centering it and we can adjust it here can look at the height and adjust it or you know if we set this to sand what's going to happen is we don't see it anymore it's still doing it if we look in our geometry spreadsheet you can see that it's still affecting our sand layer but it is uh no longer visible very well if we want to view it we can do um uh i feel there's some uh visualize height field visualize yeah actually no we want a isolate layer so wait isolate layer i filled isolate layer this is a quick easy way to to see a layer so we can isolate the sand layer and now you can see what what this sand layer is is doing um yeah element size you know so we can the amplitude is like how deep it is so you know we can just do do like a lot of sand anyway now if we just plug this in to the dune solver it should work so this is basically just like added sand on top um and it might take us a little bit to calculate oops let me uh save this somewhere um okay let's see visualize uh why is it not working um it might we might need a uh i think sorry i'm not i'm not used to doing this without the setup tool but let's uh add another layer uh going to do bedrock and i think this will this will probably help there we go and we can also so now i believe this will start to work right now there we go and we got it working so this is like the the very bare bones is you need um a sand layer and a bedrock layer and basically the sand gets added on top of the bedrock if you want to have a bedrock layer that isn't perfectly flat um then you want to add some noise to that height field noise and we can just put this here and let's add this noise to the bedrock and again if we do this isolate layer and pick the bedrock then this will be the bedrock here and the bedrock can can be i believe the bedrock can be negative so you should be fine with having having some negativeness in the bedrock you can increase the size there yes that gives kind of an interesting interesting bedrock change the offset a little bit get some different patterns in here um yes we got the we got our bedrock we got our sand and our sand let's um oh sands down here let's change the noise for the sand we could do um a crazy alligator do some like piles of sand like this um and then you know obviously this is getting a little bit hard to visualize so the way i like to visualize it is with a height field visualize and actually one one sort of issue is the the end result oops the end result of the dune solve is basically the sand plus the bedrock so it takes the bedrock puts the sand on top and we can um we can do that with a little bit you can do this a bunch of ways but the easiest way is probably with a volume wrangle um and just a tiny bit of code and then we'll basically get a really good preview or actually no maybe uh how about a slump i think we can do this with a slump slump node uh might work well too so plug this into here and again we can we can see now we have um yeah so we've added the we have the the height the mast with our which are the two default ones that come in from the height field node then we've copied them added the sand to the bedrock then we've populated them with some noise values and now we're going to slump um and i think the slump oops the slump has some nice options to we're going to turn off this flow field see these like flow directions they come from this we don't need those um and so this this uh slump node has some nice features where we can set the bedrock to be bedrock this is kind of where i got the name from and then the um we can set the material material slump to be sand and i believe flow field and then yeah we can add the material to the bedrock so if we have if we have the so this will add the material to the bedrock and then if we isolate the um the bedrock this is basically where we're going to get so you can see now this slump node is adding the sand to the to the bedrock to view it so that's one way of viewing it and then you can even um you know set a set of repose angle which is kind of similar to the repos angle of sand which is about 30 spread iterations you know so now we have our piles of sand so you can do it that way the other way you can do it if you want to do a wrangle is you can just simply say f at height equals f bedrock plus sand so this is because the sand is going to be on top of the bedrock and this will give the same thing but it won't be slumped um uh the dune solver itself will be slumping it uh over every iteration um but as you can see you know that you get something pretty similar from from these outputs uh obviously no no wind or anything has been taken to into account yet but um and then we still don't have a good colorization uh the way you can colorize this is um with just a height field visualization and again like if you if you want there's a bunch of there's two helper hdas uh that you can install alongside this um on orbital that are that are both free um and i might work on a hip file that has them embedded but there's two helper ones called um dune setup which does a little bit of setup stuff and um dune smooth that that kind of does a little bit of a post smooth which i can go over but this this uh video example here is just meant to show how to set this up and use it if all you want to do is use this dune solver hda and you don't want to mess around with others and it kind of gives a glimpse as to sort of how the others work and what's going on under the hood so this is just the normal height field visualization tool that comes with houdini you let's say like compute range or something gives you this like gradient across it the key thing is um you want to set one of these to like sand and you set that sand and immediately you can see oh that's where the sand is and you know you can if you want to make this a little bit more like bedrock we could delete these and so now you have the uh the gray for the bedrock and the orange for the sand and this will you know this this would work uh here's here as well anyway that gives a gives a good way to do it and so you can see these these things that i did where i'm adding the i'm setting the height to be the bedrock plus the sand that's that's happening within the dune solver so if you just add the dune solver you kind of see that here too um i think i have a colorize oh yeah actually nevermind i also have this like colorized so you can just turn on this colorization uh the gradient's a little bit a little bit way is is a little bit off if your train goes into the negative but anyway gives gives you a little something um i think that's because up here if we turn off uh yeah if we turn off center noise so that our terrain is all in the positive so you can see here in the geometry spreadsheet if you if your bedrock goes into the negative then it kind of gets cut off but if you keep it all in the positive positive height then then this colorized thing should should work work great um yeah let's not look at that and now i think we could just play and we get some some dune movement um and you can see you know a big part of it is there's there's wind and so there's wind blowing and you notice we never set the wind direction and that is something you can set uh a bunch of different ways if you get the dune setup tool um for free on orbit then that comes with like a a wind setup but um we can also set a wind without that and there's actually this little hidden thing they haven't shown yet called a windrows setting and so we can actually feed this student solver a wind rose which which might be the easiest way to get a quick direction we can do that is just um let's do a point maybe point i think it's add point and it's just point i forgot how you add just like a single point oh yeah here we go just add a now i guess we uh wait to make point point to generate i know there's some simple way in houdini to to generate a single point ah add okay that's what it is so we add a point and this point you'll notice this point is um make this visible it's just at 0 0. um if we transform i don't know if people know what a wind rose is but it's kind of like used in weather to show how frequently the wind blows in different directions and i have this little second input called the wind rose and you can put a windrose into it and the your windows could be a circle it could be a single point it could be multiple points basically something where we will scatter random points on that windrows shape and generate different wind directions based on it so if i move this point you know off over here now that means the wind will blow in that direction and we can visualize this with the dune solver by turning on this visualize wind trails you'll see they're kind of going all different directions but uh maybe we need to i see we need to update a little bit first or oops maybe this needs to be a circle after all let's make this one drive as a circle and we'll set this to polygon sorry again i'm not like super useful used to setting this up without the the setup tools but it's been a little while okay this should um okay oh i see it's the should be on the xc plane there we go and then let's transform just move it out over here and now let's see if we move this over here okay never mind we're going to set this up a different way we'll set this up with a volume angle and for this volume wrangle we're going to well first first we need to set up a the wind layers so we're going to do another one of these layer copy nodes and we will copy from the mast into wind v dot x and wind v oops when v dot y and wind v dot z okay so now we have a x y z um and now you can see in here geometry spreadsheet we've got wind so this is this is basically a um three three sets of floats that make a wind vector coordinate that that goes across the entire entire scene to do that we are going to use uh let's add um well let's just let's just make it keep it super simple for now i guess and we'll take uh so we're gonna do v at wind v and we're just gonna set this into uh channel channel vector wind vector so this is just making like a we're just going to set that wind vector to whatever vector we make here and so you hit this you hit this thing and it will make this a vector for you and now we can set this vector uh you know we can have it come from the positive positive z direction and now you know the wind is uh is blowing in the positive z direction if we want it like i think this one might look neat if we blow the wind oh that's a pretty good direction but you can change the wind um and uh it's i think it's fine if it's not normalized you know um right now it doesn't pay attention to why but in the future it might but you know if you play it if you have it come from so now it's coming in a diagonal x and z uh so you can change it that way the other way if you want a little bit more interactive uh rather than having typing different values in here you can use that um that add point thing i was showing earlier set a point and feed this into maybe the second second coordinate thing and we then we can say um v at wind v equals point and we can just read the position of that point so one for for this these inputs are numbered to zero one two three so we're gonna do one and then we're gonna do um the p i think wait i always forget the syntax of these so uh geometry string attribute point number okay so i think i think we want um p for position and then point number zero because there's just one one point and might as well normalize this there we go and now i think if we you can kind of see this working here yeah so after we as we move this around and now we should see um if we check this geometry spreadsheet yeah see now we're getting a wind vector from from that point position and so now the wind will blow based on where we place that that point which is kind of a little handy interactive way of doing it one thing you might notice that might be looking a little confusing is the wind if we look at the wind trails now the wind you know it's not going that much in one direction and that's because the default settings warp the wind quite a bit based on the height and so if we turn this these off you will see the wind the wind is straight going straight across there and that will give you you know if we now if we move this point yeah really nice and interactive um and the wind is blowing in the direction of the point so the wind's blowing from the center towards the point so if i move the point over here now it's this way yeah and now we can go back and let's uh turn on that colorization again and play it and now we got some sand piles blowing across and eventually they'll start forming what looks more like sand dunes and you can see i mean this is simulating in real time it's it's very fast um this isn't like the most dense grid it's two million voxels but yeah i hope that at least like helps people get get started with this um where to go from here you can you know there's lots we can tweak um let me just tweak this a little bit so we're getting something that looks a little bit more like normal sand dunes um you know normally sand needs a little bit more of a flat area to to really start to form some dunes but so we're going to yeah go to the bedrock here and lower the amplitude and you can see it's all it's all updating uh pretty nicely now um maybe 300 element size bedrock and then we're going to uh this is the noise for the sand still i kind of like the alligator noise for the sand piles let's try keeping some sand piles going um and yeah see how that looks yeah i can see we're starting to get some sand dunes now some of those crescent-shaped dunes yeah i think that's i think that's the the basic setup um [Music] but now i will go into a little bit more like how to change the look now i think and and sort of refine it you know this is we're getting shapes but it's it's a little rough um so how to refine it will be next um actually let's i think we need a little more sand first i think we need a little more sand first one thing we can do here is we can set a minimum sand so let's do a minimum of one sand and a maximum of 10 maybe and actually i guess this is i guess those minimums are as a percent of that so i guess what we want is like let's set this to maybe 50 or 30 and then let's set this clipping minimum to uh be 0.1 so it will be 10 of that next one there we go so now we still got some sand piles but we got sand everywhere also and then as it blows yeah you can see we're getting some some dunes the way we can refine this bunch of ways go into our height field right now the grid spacing is at 2 so each sort of effective grain is two meters if you're using the one unit equals one meter let's set this to one that immediately gives us a little more resolution uh the other thing you can do if you if you want to refine this is this grain height ratio this is sort of like how much sand it's moving each iteration so we can lower this to let's say uh 0.2 and the more you lower this the longer the slower the sort of the the movement will be so you can see you know it looks like it's really moved slowed down it's simulating at the same speed as if this was higher but it's moving less each time so it looks like it's slowed down yeah but it does so if you get the smaller you can see this sort of this grain here and unfortunately the only the ways to get rid of that are to increase the the sim resolution to decrease this or to do a bit of post smoothing i will decrease this and yeah i can see it's it's a little smoother probably one of the best ways of working is to kind of take it in steps so think about it as first you're going to get your big shapes in and to get your big shapes in you can even you can even increase this you can even go like you know 0.6 and simulate this for a little while and this is going to get you some really bigger dune shapes especially if you're starting with from some place like this where you want like quite a bit of dune evolution so we're going to start with that like pretty big have this go for a while and maybe you know like frame 200 or something we'll stop it at and so we'll put a time shift down and this is really super helpful node to um let's uh to kind of like freeze the simulation on a certain frame and so right now you can see it's cooking there we go cooked to frame 200. still still very fast and now what you can do is just put down another dune solver and do like a refinement solve on top of this oh it's trying to calculate all the way to frame 60 though um so the time shift basically you know freezes you freezes the simulation whatever frame but now you can go back to frame one and then drop another dune solver after it um and then for this tune solver if you get this red button you can just like reset it seems to work well there's a seed down here you know kind of gives you some changes the randomization um there's also sub steps so you can if you want you can have this calculate multiple sub steps for frame so now we can lower this to like say 0.2 and that's probably the main thing lower that and oh yeah you know has this wind warping defaults on again so we can look at the wind trails and see what that's doing and i don't know i think it's kind of doing some nice stuff it's kind of trying to use the height the height of things to adjust the wind strength the other thing we can check is this height reference blur so this is sort of like what it's looking at in terms of its reference height when it's trying to figure out how the wind moves over the train and it's also what it uses for for the wind speed height wind speed which is this where it's trying to say like hey is the wind blowing faster or slower in different places um because if it's blowing faster that that will change the the shape of the the sand dunes so you'll get like a little bit more rounded tops to them um yeah anyway let's uh let's simulate with this i think this will be pretty good settings and you can see it's now if we let it simulate for actually let's lower this even even more let's do 0.1 and let's go just jump to frame 120 then it's actually a little faster i think depending on your settings to jump jump a few frames ahead than to to watch it play you can see it's it's pretty fast we're doing we're at 11 million voxels now um and so now you can see it's it's kind of refined some of that that grain away yeah so this is the same resolution voxel grid but just now this is uh without the extra sim and this is now with the with the extra sim and you can you know you can keep going further you can you could resample this height field and then put another dune solver after it uh you can you could get this really really super refined um but it will take longer and longer which isn't necessarily the best for a uh live stream video um so instead i'll show you another way to kind of get rid of a little bit of this grain stuff and sort of help out with the the sand dune shapes and that is we're going to do a uh slump first we're going and then we're going to we're basically going to do a slight slump and i think we'll do a blur also height field blur these are these are this is kind of the same technique that you'll find inside of the uh dune smoother so we're gonna smooth the sand a little bit by you know just a little bit of a radius of one and you're not gonna see this unless we do isolate layer nice sand there we go uh override mask and so blur with no blur so blur it a little bit and then we're going to um [Music] the the reason you don't see it here is this is we're just looking at the height field and so we're not recalculating the height field so if we recalculate the height field by doing a wrangle volume wrangle and we'll just recalculate by height equals um i think we can even leave off the f sand plus yeah so now you can see this blur is uh doing something so if we blur this a lot whoa and you'll notice like oh why is that still looking noisy even though it's blurred and that's because that's the the bumpiness from the the bedrock coming through and that's where this re-slumping it will help in a few ways so for the layer bindings we'll do bedrock and sand is our material to slump and we don't need the flow field and let's not add the sand to the bedrock now you can really see this is doing a lot and so let's set our let's turn off our blur and just focus on the slump um what you want to do is kind of set this to maybe like 12 depending and spread rate and just kind of play around with these settings a little bit maybe uh 16 and you'll see this uh it kind of can smooth it while retaining some of these nice dune lines and then you combine that with a little bit of blur and i can help a little bit give a little post post-process effect so this is uh now before um well you can if you want to also you can even do this kind of post blur and then run a june solve on top of it that can help for now though let's go back and i will uh i think the next thing i'll show actually is how to cache this um so you know say you're running a doom tune solve um and you want to be saving this out to a to an external file what you want to use is a file file cache and this is this is the way i do it anyway um you can run the tune solve into the file cache and just save that out that can work you know you can do that one or this one depending which which stage you want to cash out the the downside is if you cash this out you'll be saving more than you need because you'll be saving all of these layers and so what you can do is do blast oops blast and delete all of the layers except for the height one is probably the best you could you know you basically can either delete everything except for the sand layer or everything except for the height layer i'll show you everything but the height layer so we're going to do height i think um oops and delete non-selected oh i guess i need that there we go name that there we go um yeah so now we just have the height and now if you look back in the scene view so now this file cache will save everything except for the height the question then is well how do you get the colors back and all that stuff um the way you can do that is by just grabbing back from the dune solver so i'll drop and hold down because you'll need to save the height every frame but then you can use the um i'll show it from here i guess you can use this information to sort of rebuild what the sand layer is in the bedrock layer um angle i'll show what that looks like so the way you would recombine these is um you know let's take the height from here and the bedrock from there and so now we can say um uh f uh so we're gonna try and rebuild the sand sand oh and actually i should do this the other way around i should do this into that slot and this one into there so let's put these on the correct side play this looks a little bit more organized now so we got our blast our file cache and now we're going to reconstruct it here so we've got our f at sand is going to equal um the uh bedrock well we're gonna do now we're gonna do uh volume volume [Music] and this will sample the volume and so we're going to do we're going to sample the the other volume uh so volume at volume we're going to pick input number i think this is what i want and i'm not the best at explaining this under pressure at p and let's see i think this is right volume returns the volume yeah variable containing p oh actually yeah that's what we have a volume sample that's why it's going to be yeah volume sample and so we want it from from geometry one which is our this like second input down there uh primitive number we can also use the volume name so we're gonna do height and then vector position yeah there we go one um and at p at the v um and from height uh did i get these back mixed up volume sample i wish i could get this documentation standing stay up oh yeah i reversed these so we want height and then that vector at the position so this this is this right here is going to give us our um the height from our cache and so what we're going to do with that height is we're going to subtract the stored bedrock we have and then the difference will give us back our sand it might not look like much but now if we isolate uh isolate our sand layer we should see some sand yeah and so this is the the sand from from the the file cache sort of reconstructed and now if we take this and simply feed this back into you know we can we can just do our reconstruction here which is just the height equals the sand plus bedrock just the reverse of that formula and there we go and if you want to do again the visualization is the the height field visualization to see the sand you just kind of plug this in here and compute range and set this to sand and there you go if you want this to be gray it's the bedrock yeah and then you can you know change change the color all you want and now you have your cached dune simulation um okay i'm going to continue on and show how to do crescent dunes now let's turn this off and i'll go through this go through this again with crescent dunes so we're going to start with the height field again we are going to do a copy height field copy layer and i'll show you i think i'll do this a little different way sand and so we're going to take our bedrock from the height you know so let's say you have this train actually scratch this i'm going to start with one of these train tool things terrain effects so let's add some dunes on the uh on the moonscape okay wow this moon skips kind of crazy actually okay so let's say you got your train here and you want to add some sand to it what you're going to do is do copy layer and first we need to make we need to make this the bedrock so we're going to do source height destination bedrock okay now we got our bedrock and you should see it in here these extra ones were created by the um by the moon we don't really need them but they can stay in there so we got our bedrock the other thing we need to do is set up a sand layer so we'll set up a sand sand layer and you can see a source of our sand layer is is the mask that's that's fine it doesn't matter that means it's you know our mask is zero so our sand is zero right now um then what we need to do is uh uh we need to give give some value to our sand so there's a bunch of ways we can do that we could you know do a um do a noise and set our sand that way um i think there's a bunch of other ways too we can also we could also just uh i'll just do a wrangle triangle or let me see actually if there's a um there might be a layer height field layer property head field layer file clip fill layer output i'm not sure if any of these give you like a super easy way to just have a slider oh i think there's like a clear layer clear yeah so this is one way you can do it so this layer clear node it's called clear but it will actually just set one layer to be one value and so we can just say sand and we can set the sand to b10 so now our sand everywhere is 10 which generally in houdini that's 10 meters so about 30 feet 33 feet and then we're going to drop a dune solver and we can't see our sand right now because it hasn't been added but as soon as we put this down we should see our sand and we got some sand and if we turn on the color as up here yay sand and you can see you know if we adjust this this directly uh well if it was if it was updating this would directly um affect how much sand we have so the slider now we've got a nice little sand slider here um the sand isn't isn't simulated yet but if we hit play now we got simulated sand flowing across our what was a lunar surface you can see we're getting some dunes forming you can see by default the sand just moves in the positive x-axis it does have some warping you can check out the the wind wind trails here so you can see these are these are the um direction the the sands going in there where the wind is flowing and so by default the wind will kind of try and flow around based on your terrain and we can we can adjust that down here with these settings the warp based on height if you want to change your wind direction um a bunch of ways to do that but one of the keys is you need to create a wind layer so to do that copy height field copy layers and we'll call this we'll use this to make our wind layer so wind layers are a vector so it's wind dot wind v dot x and then we need a dot dot y and a dot z and you can see as soon as we are feeding it wind layers now it no longer is going to give us that default wind direction because we're feeding it like a zero wind direction um and so now the wind's just kind of like i don't know where to go and it's trying to try to normalize from a zero direction a easy way to give it a wind direction is to use a wrangle a volume wrangle and you can just set this wind direction to something v at wind v equals channel vector and again the if you get the dune setup tool it has it makes this like super easy and you can download that for free i'm just showing it again how to do this without the the dune setup tool uh wind vector and hit this and it will give us a little little thing and now we can give it a uh yeah we don't want any y give it a we can change the direction here and put this back to colorize and now if we play you know the wind's going that way i think we need to normalize our wind though it's uh going a little crazy there we go that should help there we go got some got some nice tuned pattern for me uh yes this this i will post this uh later i think i'll try and edit this into a couple a couple quick videos i just figured i might as well try and do this live first um yeah so that's that example uh i think i'm gonna try one more example and i will i think this time i'm going to do it with the with the dune setup tool uh just this little easier and i will also try and show the collision um which is kind of how i did the did the the ball in the sand dunes before so i'll try and do a setup like that so uh start with a height field again we'll call this a dunes ball and for this i'm going to go back up here and i will install the uh dune setup tool uh which you can download this for free even if you don't buy the dune solver i'm not sure how useful it will be if you don't have the dune solver but you can download this for free um at or bolt and so if i install this now i can do uh setup to setup and feed this into here and you can see it immediately colorizes it which is kind of nice excuse me um it's got a whole bunch of settings for like wind it's got settings for visualizing the wind just a bunch of nice stuff you can set the wind from an angle you can also set it from a spline which is kind of handy we'll do it from from angle for now and something like this you can also give it some noise now yeah i think that'll be good sand depth this is in you know units which are generally meters i think this needs to be pretty high for this for this ball example try try 20 for now um and yeah this is can you can set the sand on a bunch of different parameters like you know flat bedrock flat bedrock this is i can i can show this i guess real quick um i feel noise so say our height field had some had some noise to it already um what you can do is set the sand then you can say actually i want a flat bedrock going across here um and that bedrock i want any any height above that to be sand and i guess this works better if i center this oops so you can see this is the noise and then we're saying like flatten the bedrock turn off the and any anything above this is pure sand and then everything below it is bedrock and so it's just it's just another option like way to set how much sand there is and what the bedrock is so you can see if i isolate the bedrock it's just flat the other options for the dune setup tool are you can set it by height mast which means like over a certain height don't don't add the sand um you know so if you had so this is only adding sand this is just adding two meters of sand below below these height cutoffs and then that case your your bedrock is is just whatever the height was before anyway it gives gives you a bunch of fill fill depth is just like fill this amount of sand everywhere and i think that's the one that we're gonna we're gonna go with for this example so super simple flat bedrock flat sand filled to 30 meters and then we'll do a dune solve solver so oops i was i hate that when i forget to put it back to frame one and then it's trying to calculate all of a sudden but anyway there we go um you might notice you know we get this ripple starting here at the edge um there's some ways you can fix that a super easy way is just make your train big enough that you can crop that out um other ways you can do it you can you can do this like loop wind shadow and that will try and use the dune shapes that are forming over here to affect the shape back over here almost like looping but it only loops it in terms of the wind direction let's play it again it helps a little bit but it's it's especially if if your height field has any kind of like noise to it it's not very noticeable but if it's really flat like this and smooth it tends to be hard to hide the the fact that the sim is starting at this like very defined location um we can turn on the seamless sand can help sometimes too yeah there we go the seamless sand will actually try and make it seamless in all in all directions which which can work pretty well if you're just kind of trying for a fairly uniform like sand pattern and actually right now i think i'll show how the sand depth affects the different um dune shapes uh and this is this is true in in real life as well so let's lower this to like sand depth of three from 30 and now if i play it you should start to see see the bedrock poke through and that will start affecting the dune pattern um get more kind of let's lower it even more actually you'll start getting more uh more crescent dunes like a different different dune pattern here in the example uh hip file if you buy this from or bolt uh the example hit file shows shows a bunch of different settings and different ways to get different patterns but yeah i can see the and you can also see how fast this simulates um okay back to our collision example we're gonna fill this up and then we're gonna do a sphere uh i don't know how big the sphere should be like like 20 i guess it oops let's place this and i guess the height the center should be half of the scale and let's make this uh polygon mesh or polygon i guess you can see there we go nice sphere and this part of the dune solver isn't is a little bit experimental so hopefully this works but basically you can take geometry and you can feed it into this collision objects here and the dune solver will you can already see it's made like a dent there it will try to use that object sort of as um in in its calculations for how the sand moves and what you want to do you know generally these objects are separate from from the sop network so what we can do to visualize it is like kind of merge it back in if we want to see it there we go and let's just type playing this with the default settings hopefully i set them fairly well yeah and you can kind of see the the the wind is being shadowed behind the ball which is why the dunes aren't forming behind it i think let's make this 60 it's bigger yeah and let's um let's show you some of the the settings here um this so the collision settings are buried under this if you hit plus basically get kind of some settings about what sort of impact your this object that you're feeding it has on the sand and a round object is kind of one of the trickier ones if you're if you're just doing a box you know it's it's easier because the profile doesn't change in in the vertical but uh this gives you some interesting things so we can show show our collision shadow and so this is basically because the simulation you know is semi-2d we need to project this collision into this 2d grid and so this gives us some options for for doing that and you can see as we adjust these it will adjust kind of the the impact that it will have and then these ramps are for the shadow ramp is is kind of for controlling so you can see the red here this is the zone that the sand will get slowed down in uh and the and so that's what that this ramp is for and then the sand ramp is for the carve out sort of like you know so if i adjust this this affects like how much sand is built up around this thing and that's what's affecting this kind of crater shape around it um voxel size yeah we can show that collision again yeah let's check that um if you want this if we want this ball to be sitting more in the sand what we need to do is not have this sand ramp go down to zero so we can see this is if i um if i get rid of the sand ramp now it's sitting a lot more in the sand there we go and you can see this like kind of shadow wind shadow area that's where it's slowing down and not making dunes behind it that's from we can adjust that with the the wind shadow ramp i think if we also go to view the wind shadow here and let's uncheck this there we go now you can really see the uh the wind shadow formed from this and we can adjust this a lot i think this is this updating okay let's uh check oh i see the part of the problem is the windshot is forming from that from this lip so okay let's try and get rid of this lip let's kind of clear out the sand from around it or there we go yeah the stuff's still a little bit finicky unfortunately yeah this is this is an area i'm gonna try and work to improve but let's try and lower the amount of sand here should make a little bit easier uh yeah this is kind of part of the problem is it's it has to rely on right right now it's sampling this as a as a 2d thing so it's trying to rely on the the biggest area to get the to get the shadow so one thing you can do is um do a peek and bring the collision in a little bit can help um and then also if we want this to kind of form faster we can uh increase this grain ratio to one should should give some sand dunes real quick real fast um i think also right now might be the the height speed up let's lower this and also the height work let's turn off the warps there we go yeah that's looking a little better so it's still a little bit finicky with the collision stuff but you can can be useful probably still for buildings and different things based on what you're doing you can still see it's kind of hugging kind of close to there can probably adjust this more i think we need the the shadow to fall off faster might help a little bit we shouldn't go wait a no sand yeah i think that's the problem is we've gone we're getting rid of all of the sand under it first instead of letting there be some sand under it yeah and a ball's the hardest case unfortunately two there we go kind of working and even um if we make this more iterations it's like five sub steps so now it's really moving so now we're doing uh five sub steps per frame and one thing to note is right now i have the wind speed up uh turned down to zero and what that means is this is going to the dunes are going to get taller and taller as that happens which is which is kind of a real phenomenon like the what kind of starts limiting the height that dunes grow to is one changes in wind direction and two as the dunes get taller the wind sweeps across the tops faster blowing the tops away which is what the the wind speed up factor will do if you turn that back on but there we go we got a little something um yeah i think i'll make a better video on this collision stuff soon but hopefully that gets anyone that's interested in it started um let's look again at this um this uh visualize um wind trail so you can see this is the sort of the the wind shadow trail being created by by that object that gets fed into there um anyway i hope that was helpful for people and i'll do more soon
Info
Channel: Barrett Meeker
Views: 2,900
Rating: undefined out of 5
Keywords:
Id: -5cJUkqnuSA
Channel Id: undefined
Length: 73min 27sec (4407 seconds)
Published: Wed Sep 01 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.