H17 Masterclass | Terrains | Heightfield Scatter

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
howdy everyone this is re Danish with side effects and today I want to talk to you about well an extension of the h17 terrain master classes I posted the other day this time we're still gonna be looking at high fields and trains but we're gonna understand the new high field scatter so why a new high field scatter actually a complete version 2.0 of it well we wanted to solve two main problems the first problem was non moving scatter points when additional scanners are added so imagine you just created your terrain and now you want to start decorating it probably the first pass you're going to do is place your major trees or villages things that are going to be used for way pointing so once you put place them and you're happy with the placement you don't want those points to be moved around if you do another scatter so we saw that by a problem and now you can do multiple scanners and have the previous scatters stay locked in place then we also needed to have a hierarchal scattering system why well again you placing down villages or your major trees let's say and now you want to put down the bushes you want to make sure that the bushes don't intersect your trees or if you put down buildings you want to make sure that no trees are growing through the buildings so we wanted a way of making a hierarchical system where you go from your large items to your small items without one self-intersection no use of placing points down that again they have buildings intersect each other and to that if you have subsequent scatters for smaller things like bushes but they're not going to intersect your larger areas so an example of a hierarchy would be villages two buildings two trees and bushes rocks and twigs in addition to that we want to solve for well think about a tree a tree has two really rady eyes it has the trunk which is kind of a hard radius that you can't penetrate but it also has the canopy of leaves and that canopy is high up so you could place bushes or small sapling trees underneath the trees canopy as long as it doesn't intersect the trunk so he wants it a way to say what is the heart radius and what is the fall off the other thing we want to do is while scattering points at a certain level of the hierarchy there should be control weighted variance and let me repeat that again controlled weighted variance what I mean by that is again take the example of placing bushes underneath the canopy of a tree it doesn't have to be just one bush that could be a three or four different types of bushes are placed there and that would be all at the same level but it's there Bush bushes but what you want to be able to say is I want Bush one to occupy 60% of the placements Bush two to be another 25% of the placement Bush three to be 15% and Bush four maybe five percent so you get this kind of organic blending of your bushes to make again the terrain look nicer the other thing we want to do is make sure the scatter system wasn't locked to a certain level and what I mean by that is we could have said hey you get five levels of scattering but there should be user defined so HF scatter now is I'm allowed to be cascaded so you can put as many HF scatters one after the other you want and each one will be your different level of your hierarchy and it will keep one to hide field and to the previous scatter points and use those points to determine where the new point should be placed so I write prepare for us a high field so we can start playing with high field scatter so I'm just gonna drop down the high field scatter and you'll notice now that it takes three inputs to high fields those green dots and a geometry field we'll talk about this a little later the first one is just basically wire in your high field and here I go you can see that I got a ton of scattered points here so let's create a mask so we're just gonna focus on a certain area well we could go here now and we have mass paint so I could go here and just pick a small area and you can see as I am actually painting I am getting that scattering going on which is really cool and I don't know that you just noticed I added strokes and let's see if I could just really zoom in here and you can see that as I asked strokes I cross over not much is changing in the old one so it's locked down pretty good just by default okay if I don't want to paint I could do the old fashioned wait way here let's just cut that out and go here and do a mask for instance by feature and I can say anything let's say a slope of five degrees to slope of 16 degrees and you'll notice that and not much happen here I got points going everywhere my scatter well that's because I need to art the mask into the second input once I do that you can see now that I have it locked down pretty well okay I'm going to do a third thing here and just because I found for demonstration purposes it's actually a lot easier to understand instead of a mask by feature I'm gonna go here and just draw a mask not very realistic when I'm going to choose basically it's just going to be a shape but again to understand the parameters of a scatter makes it so much easier so I'll go here and just say I want to make points in this area great okay so that's why our in our scatter and again we got points gonna be everywhere put it in the mask and now we're locked down just the area of the mask so in the high fields scattered the first thing you'll notice is there is now a parameter called tag name tag name is going to basically be your hierarchy name so is it village is it gonna be buildings trees and so forth and by default is set to dollar sign OS for operator string so if I middle click on it right now it would just say height field scatter 1 let's change this to high field scanner trees there you go you can see it just gets adjusted just trees middle click on the tag name again and it says dollar sign OS the next thing you're going to notice is by the scatter method we added a couple of new features or new features is a good word for it I coverage using mask layer so that means is depending on the amount of coverage here which sets cover the masked area by 0.5 and you can see if I decrease it it's gonna be a lot less sparse and if I increase it to one it's gonna be really high heavily a high-density if I change this from coverage to the next thing density using mask layer density is how much coverage per square meter G wants and so now you can see that says density 0.01 as I increase it per square meter you're gonna get a lot more trees the third one is the total point counts so that's kind of like you know the full thing in a high in a regular scanner and the fourth one we'll discuss a little later per point count using source points which especially when it comes to creating trees and saplings under the trees or bushes is really useful okay so I'm going to go back here to buy coverage using mask layer so we ready to talk to what coverage does how much do you want here then the next question is the outer radius now the outer radius and I'm going to start zooming in so you can see what's going on and you know even better I'm gonna put down a tube here there's some end caps let's give it a color I'll make it green and I'll copy two points so you can just see what's going on here there we go so let's put also a merge for now by the way this is not the way you're going to be doing it I'm just doing this because we haven't discussed all the features yet so we'll do it step by step so just so you can see your terrain and the trees that we just laid down here they are and let's go back to that Michael scatter so the outer radius is saying what is the outer radius of your hard limit of your tree so right now my tube is set to a radius of 1 so if I say my our radius here is 1 and my fall-off is 0 you can see that I'm not getting intersecting circles at all ok I might get circles that are going underneath the ground but I'm not anything else now what is the full offset the fall-off is saying what is this soft radius I like to think of it as a penumbra when you put a spotlight down it's what's that fall-off of the brightest of the light to the gray area so as I increase the fall-off that means other things underneath it can start to intersect a bit with that I should mention this parameter down here called relax points if I turn off relaxed points you'll now see that it's like a regular scatter and I do get all sorts of intersections that I probably don't want so I'll turn that off the other one is self overlap do you want to be able to intersect or not so in the case of trees it makes no sense to have any overlap but if I'm gonna be placing a bunch of boulders or rocks down it might look good if they intersect and become some are just individual rocks and the other ones are conglomerations of multiple rocks and that's what this parameter self overlap does okay so now the next big thing after outer radius and fall-off is the variability we got lots of different ways of doing this first one is uniform distribution so if I were just to change this to one to one you can see now that every single circle is the exact same size of the outer radius of one or what I copy to my tube which was again a radius of one here what I'm saying here in uniform distribution is what is my lower radius let's say let's make it point two five so good it really exaggerated it so now you can see I have some really trees with small thin trunks and let's make this three and some trees are really huge now as we get there you're gonna see that you are gonna get some intersection and that's because again of the fall-off I really don't want that intersection just increase or decrease I should say the fall-off to something that will make sure that we don't self intersect like that okay so that's uniform distribution and again the key thing about uniform distribution is that if I have a range of 0.5 to let's say 1.5 the average here is going to be 1.0 so the average size is going to be one point out with an even distribution between the minimum and the maximum of 0.5 to 1.5 if I change my variability from uniform distribution to normal distribution things get more interesting the default is such at a point five which means it's almost exactly like a uniform distribution in that most of this the trees will fall off right in between 0.5 and one point five as far as size and then it will slowly decrease to this minimum and maximum it's no longer going to be a uniform distribution think of it more of a you know like a bell curve time its distribution but if I change this from a spread of 0.5 to 0 now you can see they're all the same size so now we're saying there's no spread in this range find that the mean find the the middle between 0.5 and 1.5 and make the trees all that same size and the other hand if point 5 was where we had almost a nice even distribution a bell curve distribution of the sizes if we start increasing this what you're going to say is I don't want the middle at all or make it minimal and put the probability of a tree at the minimum or maximum as the greatest factor in determining the tree size so that's normal distribution and the exact scale is that it's just a scalar multiplier of whatever the input is going to be okay so I'm going to change variability back see deform distribution and I'm gonna actually make my tube a little higher as far as the Hyksos so let's say maybe 5 just so we could see something here and put the center here relative channel reference divided by 2 jesso we can see what's going on ok so here's my little forest of trees and go back down to my hierarchical scatter and in my heart'll scatter when i want to show you next is let's say I have this a to total point column using masks later I really crank this up so it's set to 93 thousand points now it's not going to be able to have that ninety-three thousand points and yet a fall-off of let's say zero and it's still not being intersection and having any intersections so what's going on here well it's going to delete points that's it's going to force itself to delete points that will cause intersections so you could do one of two things here you'll see there's a point removal method here and the point removal method you could either say remove or only flag and you see when I change this to only flag I get all those original points back and they're all intersecting but maybe you need those points for some other purpose so how does that work well let's go first to remove here and I'm going to go and open up this the geometry spreadsheet so if I go here and spreadsheet you'll see that hierarchal scatter sets up some really nice attributes for you the footprint is you know exactly how how big is the radius of the footprints of each point the fall-off right now I have a full off of zero so you can see each one of these is a full off of zero but if I increase this you can see that I get them updated to point two six three and so forth oh this is a good point to bring out why do I have the first footprints here zero and the first fall off here zero well this is by layer okay and if I go back to my article scatter here I go to information you'll see that I have mass bedrock sediment height debris and water so what it's saying basically is I don't have that information for these layers here it's only when I get to the layer that has all the scatter information do I actually have data for this I hope that makes sense anyway so to get back to our point removal method the point removal method right now is removed so we're going to delete points but if I change this to only flag what you'll see is I have a attribute in my spreadsheet called remove flag you'll see that some are such a 1 and 0 so the ones that are set to 1 are the ones that we would have deleted if we had this set to remove but right now it's just an attribute to say if you wanted you further processing in the future it's still there just know that we would removed it if you need it to be non-intersecting so a few more parameters to get a handle on close the spreadsheet we have a keep incoming terrain so if you don't need to train you just need the points you could turn it off that there and that's really quite interesting because look at the output flag of our heikal scatter it is a volume right here but we're actually spitting out both the volume and the geometry all through this node so by these parameters here you could turn on and turn off what you want you want the high fields you want the geometry or do you want both so keeping coming terrain the train is back if you look at these guys they're all at different angles they're conforming to this slope of the terrain underneath if I wanted them to be just basically Y up I could change this match normals and turn it off and now you can see they're all set straight up with that I could also randomize the yaw and you see let's see if I show you that here you can see well it's tube so you can see slowly that they are spinning if I change that just temporarily to a box you probably see it much better box I believe it you can see it just look here and Heikal scatter and you can see that those boxes are turning that's probably the easiest way to see it and then randomize up is the same thing for the up so if you want to get them to be in crazy directions that's what randomize up is for okay I'll just switch everything back to where it was and then we'll continue so I'll make this back to YouTube I will scatter oh I guess you're on zero again and yes W so we can see things here merge for now that's good anything else I wanted to change okay I think we can continue with learning about the parameters here so I deleted the copy two points is if you remember I previously previously said this is not the way I would do it and now I'm going to show you how to set up if he wants it this also be tubes so the third input of the - scatter if I hover over it is primitives - instance so I'll just drop down here the tube and I'll make it a polygon then went out and caps and then I'm also going to go here and do an attribute create and I'm going to set this attribute create to an attribute called weight and right now it's the only tube there so I'm going to set its value to one and it's going to be a class primitive not points and I'm gonna wire that in and there's all my tubes okay so let's see my I feel scared right now have a radius of one the fall-off of point two six three let's make this a range of 0.1 to range of 100 forgot I have a total point count that's why where we are having intersections so I'm going to change this from the scatter method from Total point count using mask layer to buy coverage using masking layer and that's looking much better already okay so that's really cool and if I could do something that's also really nice is let's just put a color here and I'll make this color green and I'll going to put down a box and the value here I'm going to make the value let's say 0.7 for the tube and I'm just going to bring this over and if you don't know just option drag for that it's nice and I'll make this weight of 0.3 for the box I'll put it into a merge or maybe I should also add a color why not oh how about a yellow and then I'll do a merge and it's not wired in so let's wire it in and well I notice that we have the cylinders look about 70% of the cylinders and 3% of the boxes if I go back here I could change the weights 0.5 and 0.5 and you get a pretty even distribution if you thinking it's not that even it could be just because the size here this tube has a radius of 1 and the box has a size of 1 so that means the box is only half the size so 2 to 2 and there you go it looks now 50/50 you could do this for as many as you want I'll go here just drop down a sphere polygon okay let's make this 70.1 just make sure I didn't type in somebody let's go point seven and here point two color and there it is so if we now look at our heichal scatter and go back into the geometry spreadsheet you'll notice that there is an attribute here called variance and the first few fields are by default set to negative 1 those are your variance for the layers that are not having a hierarchal scatter such as height water debris and so forth then starting with where you have your scattered points you'll have a variance of 0 here for your first input which was the tubes and we scrub down you'll see that we have one you know four I guess we did the boxes and two for the spheres so if you were to export this into your game engine not only do you have a tag and I should have shown you that earlier we have a tag attribute called tag and it is by that string call in our case agents trees you can just pull up your trees say okay I got a populate my game engine with trees at these points and what variants you wants here's the variance so you can have various different maples and Oaks and you know furs and so forth being placed before I go on to show the hierarchal parts of the scatterer operator I want to show you a couple more parameters so here we are and a hierarchical scatter or I should say the high field scatter and I gotta go to the draw mask the draw mass is a parameter called blur radius and I just blur it out and you can see as I increase the blur the distribution of points goes along with the blur yeah it's kind of nice that's we have right now the highest concentration is where the highest values for the mask are and as it slowly goes off to zero our points go off to zero also but if we go back to HF scatter you'll notice that there is a parameter here called mask cutoff and what I could do is I could decrease or increase it you just see points going on or off because it's saying if there's anything less than let's say 20 percent of a mass value there should be any points but it's not working and I look and I realized that my point removal method I forgot to turn back from only flag to remove once I do that you can see that my mass now has to be at 20% for it to distribute distribute two points if I change this back up to you know 0.6 you can see that only the areas that have a strong mass value will have points distributed for the next part I simplified the network considerably I just dropped it back down to a tube color and I wanted to show you this parameter instance on new points so that's what's giving you the actual choose being displayed and if you go to the in from information you can see that it's already packing your geometries for you yeah I'll do that again so you can see it's packing them to 9,000 pack Gio's okay so let's start doing something hierarchical so I'm going to go here and let's take my coverage way down just a few just like that and I'm just going to drop down another heikal scatter so this guy again is asking for a terrain and this one is asking for a mask so we use the same assets we had before and we get a bunch of geometry and you can see that we have our little trees still there so I could just kind of copy this just like that let's make it why not we'll keep it at two but we'll change the color to that nice fuchsia and I'll bring it in here you can see we got rich trees and we got our new scatter now what I want to show you is and why I made it so few is we have another choice now when we go in and we have it now hierarchal we could say scatter method I cover coverage using mask layer but we can also say per point count using source points and when we do that what should be happening it's going to first say what is that the source point tag in our case our tag name was from the original one right here javis on OS which was HS trees so I'm just going to copy that into our new place and now you can see already that when we have the per point using source it's going to start distributing these points around your original points so imagine again that the the bushes around the central tree and it's going to give us two per point count methods a Poisson distribution or an exact number so here I have an exact number you know ten twenty so forth around there and then it's going to say here positioning method offset or origin and you can see the origin guy gives me a nicer circle around there the source origin radius let's make it really tight see see it's working and you can see now I get all these points clustered around there and the outer radius as you see as I move it out they start to spread around those individual points so that is really super useful and again if I go up to here to the Heineken scatter the original one for trees and I increase my coverage now that you can see it you can see exactly what's happening here okay so unless you want other thing here now that I have a hierarchy of the green trees versus let's call this the The Rock's here HS rocks okay I get to here relax points if you zoom in right now relax points are turned on so they're individual rocks there's not much overlap I see some because I really haven't zoomed into min max ranges yet but if I turn off relaxed points you can see how they all kind of cluster around each other because they can overlap completely and again that me okay if you want rocks to kind of smush together to make bigger rocks and smaller rocks but just to let you know that it's there and the other one is also self overlap if I trim that off and let's see where I can show you that nicely I'll look over here I guess oh here's a good example right in here if I go a self overlap and I turned that off sorry X points that's that's a better example of the clustering now these points can actually override for this self overlap but you can see is still making that cluster circle around the origin which could be quite useful again in different circumstances okay guy turns self overlap back on I want to show you something else also if I change my scare back back to my coverage that's doing a nice uniform distribution here the key thing to notice is if I go and how do I wanna do this let's do another draw mask and I'm gonna say I said replace I'm going to say add two and here I go notice something that's wonderfully happening here I'm adding points and the points of my new scatter points are changing because of the coverage but my old scatter points are not moving that's really key here you know we want to lock down the previous scatter so in the parameters for Michael scatter if your scatter method is bike coverage using mask layer or by density it's going to lock down those points nicely when you draw or paint you know new parts of your mask nothing's going to happen to your old points so I guess the last thing I should show you before we sign off is that even as you cascade the variance still work so I'm going to change that back to is it's just cool per point counts exact number let's make that like this actually they can place a Poisson distribution and like that then I'll come here I'll put a merchant change my weight here 2.5 option and an option against me as he wants say point three point two ship it colors also and it's still working just fine again you can just keep on any of those hierarchal scatters any way you want and it will work so I hope you enjoyed this big overview of hierarchical scatter and look forward to hearing if you enjoy this and what I should be doing next as far as terrain videos thank you so much
Info
Channel: Houdini
Views: 16,844
Rating: 4.9516616 out of 5
Keywords: gamedev, procedural, game development, game art, procedural environments
Id: Busz8ttfhrs
Channel Id: undefined
Length: 39min 2sec (2342 seconds)
Published: Wed Oct 31 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.