Save hours! Procedural Foliage in Unreal Engine 5 - Photoreal Landscape Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome this video is an introduction to procedural foliage using a procedural foliage volume we can place grass trees rocks procedurally meaning we don't have to hand Place individual ones it will use for lack of a better term some nature logic in order to place our grass and other foliage within a volume that we set what is this actually useful for this is useful for large environments or open worlds in which it would be incredibly arduous to hand place every single thing that's not really reasonable when we're talking about larger environments and also you're going to be placing them without the logic in mind that we have in nature for example flowers not being able to grow within the shade of a tree because they don't get enough sunlight so it's very exciting I'm just gonna give you an intro to how to use it and get it started with it we won't go too deep but I'll cover the basic settings you need to get started first thing that we want to do is enable it in the editor preferences come up to edit editor preferences we are going to find find this setting under the experimental area and what you want to do is check on this checkbox here procedural foliage going to prompt you to restart the engine which you should go ahead and do all right now we can make our volume with which to spawn the foliage inside of right click in the content browser and come here to foliage and you should see a procedural foliage spawner I'm going to call this PFS grassland and when I double click on that asset it will open up here and we can see a few settings for the randomness of the folius generation and most importantly a foliage type area where we can add some types of foliage to be populated in our environment but we have to make those foliage types first so if I come back here to content browser right click under foliage again we have static mesh foliage click on that I'm going to call it s m f and I'll just call this one grass now if you're using Mega scans assets like I am they come with a foliage asset already set up but I want to show you this just in case you have your own foliage that you're making and you want it to be used by this system as well and it's also just helpful to know how it works so I'm going to double click this asset that I have opened and all I need to really do is put a mesh into this mesh input here I'm going to navigate to my mega scans folder where I've downloaded the grass into and if you don't know how to do that just come up here to the plus button the top left corner come to qixel bridge type in Grass go to 3D plants here just choose one of these grasses and download them and add them to your project so I'm going to go to my 3D plants and my Tundra grass and I'm going to use this Tundra grass variation 12. I'm going to drag this static mesh into the mesh input here so now I have some grass that it will use to populate okay so now let's come back to our procedural foliage spawner come up here to the plus button click add and now drag our foliage grass into it okay so now we have our first piece of foliage added to the spawner so let's place the responder into our environment close this come down to the ground here I'm going to drag my procedural foliage spawner into my level and what's going to happen is it's going to spawn our foliage within this volume so I won't actually see anything if I simulate it right now because it's literally a cube floating in the air so I need to expand the cube a bit bigger make sure it is overlapping with my landscape here I won't make it too big to start just maybe something like this in the details panel over here on the right I'm going to scroll down to where it says procedural foliage and you'll notice there is a re-stimulate and load unloaded areas if you can click on the re-simulate button go ahead and click on it and if not you will just load the unloaded areas first and then click on the re-stimulate button once I click on it you'll notice it has simulated a bunch of grass now this is a good starting point but obviously it is spawning them way too far apart so I need to modify the settings a settings for this individual graph and how it grows within our volume is located in that static mesh foliage asset that we built so if I open that up again the area that I really want to fiddle with is located a little bit down here and it is under the procedural section and the three tabs that are most important to me are collision blustering and growth and this is where you're going to provide the logic for how the foliage is growing in your volume I'm not going to go too deep into this but I want to just call out a few things so the first thing I'm going to adjust is the Collision it thinks these grasses are very big so I'm going to lower this down to one and whenever you make a change it won't automatically show here you need to come back to procedural foliage sponder again and hit re-simulate and you'll notice here it spawned them a lot more naturally now because it knows that the graphs is actually little small patches of grass instead of 100 by 100 unit big thing now if we come down here we have number of steps here and number of steps interacts here with seeds per step step is one grass growing or in this case your first round of grass the first placement of grass that's step one those grasses are going to send seeds out in different directions these seeds per step is defined right here so for the first step it's going to send out three seeds and in step two it's gonna grow grass where those seeds fall so it's three steps and in each step it's gonna send out three seeds you can see here the grass started from this and then it shot out seeds in different directions and then those grasses shut out seeds in different directions as well and this is how you get a more natural kind of Plumping look that we have here because it's mimicking actual nature in which you have seeds from plants that are populating each other and that's how it actually is placed in real life on landscape so we're using that logic here or a very simplified version of that logic to place these grasses if I'm not getting enough grass there are different things I can do the first thing I can do is I can up the initial seed density so how many grasses am I starting with in the first step if I up that to 10 for example make sure I have my volume selected roll down again hit re-simulate you're going to get way more grass because you're starting with more in the beginning and then that itself is populating additional grass and then that grass is probably additional grass so you're just getting a multiplying effect so this is actually pretty good if I drop it back down to initial seat density of one so I can see things a little better let's just talk about a few more of these settings um the average spread distance so when it sends off seeds how far does it send them I have definite clumps here if I wanted to spread them kind of far I'll have fewer grasses but they'll be further spread from the source so if I increase the spread distance to 200 you'll probably see a more Global spread of the grass because they're shooting the seeds out further and the spread variance is the variation that it spreads and the seeds per step like I said before is how many seeds it sends out every step in this case three now down here under growth we have a few settings that will tell it where it can and can't grow and how it ages so can grow in shade is an interesting one so when we start spawning trees here I can turn this on if I don't want it to spawn in the shade of a tree in this case I want it to definitely grow in the shade but when I introduce flowers later on I will probably tell them not to but that is totally up to you and if you check this box here Bronze in shade it will only grow in the shade so if you only want particular weeds or plants that grow right under a tree that's how you would do that this will affect the max initial age that it starts at and max age that it ends at and age just means size in this case so a grass sends out a seed it'll start small and slowly grow so the younger grasses which are the more recently seeded are going to be the smaller ones and this is how you affect their age and their for size and you can even use a curve to affect that as well so there's a lot of creative options here for are kind of art directing your placement as well now that I have some grasses I'm going to increase the initial seed density to three before I hit re-stimulate I'm going to come over and I'm going to add an additional nature asset I'll actually just duplicate this one and I'll call this flowers I'll open it up and I'll replace the grass mesh here with a flower one I'm using the sea Thrift flowers so I'll drag that in and I'll jump back over to my procedural foliage spawner hit the plus button and add those flowers in here as well now for the flowers I want to keep them kind of clumped and localized so I'm going to come back over to the average spread distance here and lower it down to 50 so that the grass spreads more evenly but the flowers stay in Little clumps and I'll lower the initial seed density as well maybe to 1.5 okay I will minimize that come over to my grass lines volume and hit re-simulate alright that's looking pretty cool I want to increase the density of the grass still open up the grass increase the initial to six and lower the average spread to 100 and see how that looks this is just a lot of trial and error it's going to be very different depending on the size of the assets that you're using and the look that you're going for so you'd really just have to fiddle with these settings until you get something that you feel happy about keep in mind as you increase the amount of foliage it's going to get a little slower to simulate so you just want to very slowly increase the amounts so that you don't crash your system which I did a lot at first when I was learning this because I would just crank up the initial density like a lot and not really know how to more intelligently place things and I'm still kind of learning but this is pretty fast for me still so I'm good with that something here that I would like to stop and do is that I'm seeing a lot of gray patches here so I could increase the grass amount but it will actually go a long way if I just add a grass material to the landscape to kind of fill in those gaps a little bit so I don't quite have to have it completely filled with grass so I'm going to go ahead and select landscape here and come over to my mega scans materials under surfaces I have a grass that I like I'm going to drag it in okay and that kind of fills in the gaps a bit so now I have some flowers I have some grass let's go ahead and add in some trees as well the trees that I'm using you can find in the Unreal Engine Marketplace just type in Black Alder and the one you want to grab here is this one Mega scans trees European black Alder which recently got updated to support Unreal Engine 5.1 so it's actually a nanite tree as well which is really nice so go ahead and add it to your project which I have already done but I'm going to now make a new foliage asset for a tree as well so come back over here in this case I'm just gonna make a new one because I want to have stock settings again foliage static Mist foliage SMF underscore tree I'm gonna open that up okay and I'm going to choose one of the trees here from The Collection drag it in here come back over to my grasslands procedural foliage fall volume add another foliage type and drag my tree into it okay let's minimize that and see how that looks right out of the box procedural foliage volume here scroll down and hit re-simulate okay so this is definitely spawn some trees but I'm gonna need to modify this to look a little bit better it's definitely spawning too many I don't want that many trees so I'm gonna again open up the static mesh foliage asset here scroll down to the clustering options and I'm going to lower the initial seed density to 0.5 we'll try that and the number of steps down to two we'll hit re-simulate and see how that looks so it's really helpful actually to have some reference so that you have some idea of the logic with which these objects should be placed these trees rocks whatever they are you can add rocks you can add structures to this you can add different types of plants it's pretty endless what you can use this for once you get over the initial hump of the confusion of what spawning means and what the seeds mean and the iteration and things like that so one final thing I want to mention if you have different objects trying to be spawned in the same location right now they're kind of on all similar priority but if you want to prioritize an object to always be spawned instead of others you can adjust that by changing the overlap priority here under growth if you want always the trees to take priority over plants or grass or other things this is where you would change that and at the end of this you can still always go in and hand Place hero assets in your environment as well after you've done this first procedural pass if you found this video helpful hit the thumbs up button and drop any questions that you may have in the comments below if you have an interest in learning more about Unreal Engine as a filmmaking tool I have a free training that you can jump on link in the description below have a wonderful day see you in the next
Info
Channel: Aziel Arts
Views: 66,358
Rating: undefined out of 5
Keywords: epic games, procedural foliage, unreal engine, unreal engine 4 animation, unreal engine 5, unreal engine 5 beginner, unreal engine 5 beginner environment, unreal engine 5 beginner tips, unreal engine 5 beginner tutorial getting started, unreal engine 5 beginners, unreal engine 5 beginners course, unreal engine 5 demo, unreal engine 5 tutorial, unreal engine 5.1, unreal engine tutorial
Id: JpbWi95Bz20
Channel Id: undefined
Length: 12min 47sec (767 seconds)
Published: Wed Jan 18 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.