7 Minute Photoreal Forest! Procedural Content Generation PCG in Unreal Engine

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello in this video I'm going to be teaching you how to create a photoreal forest in seven minutes using the Unreal Engine procedural content generation framework if you're new to PCG I've also made a beginners video which is an introduction to exactly how it works and the nodes which you can find linked below let's jump into it so I'm starting with lighting and Landscape already set up here to give me a head start the first thing I'm going to do is create a procedural content generation volume by right clicking in my content browser coming to PCG and choosing PCG graph if you don't see PCG as an option you need to enable it as a plugin under edit plugins type in procedure all content generation framework make sure that is enabled I'm going to make this called PCG underscore Forest then I'm going to drag the volume into my level make sure it is overlapping with my landscape and I will double click it to open it first thing I'm going to do is come to the input node expand it and drag off of the landscape output which is getting data from the landscape that the volume is overlapping I'm going to type in and sampler to get my first surface sampler I'm going to select that surface sampler and press D to debug if you don't see anything appear in your viewport it means that you haven't yet started the simulation in your procedural Content Volume so you can do that by clicking on it in your content browser and coming down here to generate and hitting generate you should see these cubes starting to populate your ground these cubes represent the first round of placement that we're going to do on the ground the first thing I need to place here is ground plates these are little pieces of geometry that I've downloaded from quixel bridge which you can find by hitting the plus button up here and coming to qixel bridge these ground plates here are super useful for filling out your ground making it look more varied and adding detail so the first thing I'm going to do is spawn these all along my ground to create my forest floor so coming back to surface sampler I'm going to select the node and I want to make these points quite a bit smaller so I'm going to go ahead and lower them down to five by five by five so now that the points are smaller I can increase the amount of them and go ahead and increase this to ten now that I have a ton of points I need to filter them a little bit so I'm going to drag off the end of surface sampler and add a density noise the density is displayed by the color of these squares here which represent all of the points that I could possibly spawn something on the density noise that's going to add a layer of noise on top of that which I can then filter afterwards using a density filter in the density filter I have a lower and upper Bound in which I can filter out certain levels of density of the points so I can kept something a little bit more manageable the next thing I need to do is add some randomization to these points so I'm going to come and drag off of the density filter here and add a transform points once I click on that I will start debugging this one and come over here to the rotation Max and add 360 in the bottom number this will randomly rotate them between 0 and 360. I will also add a slight bit of randomization to the scale here it will be 0.721.2 so once I have the rotation and scale locked in now it's time to actually spawn some pieces of geometry using these points drag off of the transform points type in mesh and grab static mesh Spawner in static mesh spawner on the right side here we need to add a number of mesh entries in this case I'm using four different ground plates so I'm going to click the mesh entry button four times and expand the index and descriptor and that's where I'm going to drag that piece of geometry into as I do this you'll see it start to spawn on the left side here second descriptor third descriptor and fourth so now you can see we're getting a really varied and interesting looking ground that by just respawning these mesh plates along it but there's still too many of these points I could just come back over here to the density filter and filter out some of them so I'm getting less that looks pretty good but I actually want these to be pushed down into the ground slightly so I'm going to come back to the transform point node and under the offset Min and Max I'm just going to lower them in the z-axis here which is that third number to the right and I'm going to do a negative 5 in the Min and Max which will collectively move all the points down by five alright so this is looking pretty good I'm going to make one small tweak to my ground material so that it matches the color of these pieces of geometry I'll choose my landscape come to the forest floor material and I'll just do a slight adjustment in brightness and that should be good so now we have some variation added to our ground we can always adjust the amount of pieces of geometry later so next I want to keep going and jump into spawning some trees I can actually grab these nodes here and duplicate them to reuse them and I'll plug it into the same surface sampler this will save some computation time in the density noise I'm going to go ahead and press D to debug it again double check the amount of points here and we know we need to reduce quite a lot of these points because we don't want that many trees we'll increase the density noise Max quite quite a bit maybe 210 this will give the density filter more to play with so now if I come back over to the density filter it's cut out almost all the points so we'll come back here to the settings and increase it a little bit and add a few more points in after this I want to set the bounds of the points because currently these little cubes will potentially overlap with each other because they don't know that the trees will be a bigger size so I'm going to add a bounce modifier in order to increase the bounds of these little cubes in the bounce modifier on the right side here I'll increase the bounds Min and Max and I'll change it to 10 by 10 and in terms of Z I'll make them quite a bit taller so I'll make them 30 and 30 and we're not seeing any changes here because I'm not debugging specifically the bounds modifier so I'll come back to density filter hit D to remove the focus and then do it back on the bounce modifier okay I'm gonna make these a bit taller so I'll come over here to the 30 and increase that to 80. now these look a little bit more like trees and we can start to get a feeling for what they should look like but we can see here that there's still too many of them so I'll come back to the density filter lower it again till I have a reasonable number of trees make a new static mesh spawner here and connect it to the end of the bound modifier in the static mesh spawner I'm going to start adding my tree meshes I'll come back over here to my trees folder that I've made already and these trees I got from one of quixel's free tree packs I'll link it below so in the static mesh spawner I'm going to count the number of trees I have one two three four five six and I'm going to enter that amount of pieces of geometry into the static Mass spawner so now that we have the tree geometry in place and we've adjusted the density to our liking it's time to add the last layer which is some rocks and bushes so I'm going to go ahead and come here and duplicate my nodes again plug them in I'm going to adjust my bounce modifier to reflect these smaller size of the bushes so I'm going to hit D to look at that and I'll probably lower lower these numbers down to five five five by five and since they're still in the exact same place as the other trees we're gonna go to our density filter and adjust the filter to grab a different level of density which will again be in a different location so now that we have that locked in we need to come and add another static mesh spawner and add our bushes these bushes I also got from qixels tree pack and that's linked below okay that's looking pretty good we have bushes we have trees now we're ready to add our final layer which is those smallest little pieces little rocks little Twigs that's really going to fill out your environment and make it feel finished I'm going to do exactly what I just did again down here in this case though we're going to need quite a bit more points because these are very small objects so I'm going to jump back over to my bounds modifier and go ahead and remove it these are pretty small objects so I don't need to worry about them bumping into each other and overlapping necessarily so I'm just gonna go with the density noise and density filter so let's go ahead and look at those points again I need to adjust the density filter to let in more of the points I'm actually going to leave it wide open to let in as many points as possible in this case and I'll go ahead and grab another static mesh spawner here and add in my rocks and twigs so I've gone ahead and added my meshes but you might notice a slight problem which is that I'm not seeing them at all that is because we're still using the transform points that we used before that moved the Rocks Under the surface of the ground so I need to come back here for the transform points and zero out that offset and now you'll see that the rocks and twigs are visible and you might actually want to go and do that to the other transform points that we did duplicate last time for the trees and bushes and now we have a forest [Music] if you're here wanting to use Unreal Engine as a filmmaking tool or to make animation or cinematics I would like to direct you to a free training that I have that takes you through the full process of making a film from start to finish in under 30 minutes if that's something you're interested in see the link below and I will see you in the next video
Info
Channel: Aziel Arts
Views: 102,070
Rating: undefined out of 5
Keywords:
Id: g84cg2KvJxY
Channel Id: undefined
Length: 9min 7sec (547 seconds)
Published: Mon Jul 17 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.