How to Make a Forest in Minutes with PCG in Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what's up guys welcome to New real Engine 5 tutorial today I am going to show you how to create a quick Forest using PCG in under a few minutes it's going to be a very easy video to follow so let's get started all right so the first thing that we need to do is enable the PCG plugin so let's go up into edit plugins and here let's search for procedural and we can see that we have the procal content generation framework PCG so let's just go ahead and take this and click on weart all right so the pro has restarted and in my case what I am going to do is go to file new level and create a simple open world template and now if I go to my player start we have this really cool kind of landscape created where we can place our PCG and begin with our quick Forest so now that we have the PCG plug enabled what we can do is just go to the content browser right click and we have a new category called ptg so let's create a new ptg graph now let's call this something PCG forest and let's open this up so as you can see it will contain different notes that we can you know put on together and it's a bit different from normal blueprints now I do have a beginner tutorial on PCG which I will be living in description just in case you want to learn a bit more uh in depth right this system but what I need to do is expand this input and we can see that we have information about our landscape and our landscape height well in this case we only need our landscape height so we know where we want to go ahead and place our uh points right along the the landscape so in this case I'm going to get the landscape height and we have a whole bunch of different options that we know we can choose in this case if we go to the sampler section we have this surface sampler and this is the one that we want this will just generate some points in the surface okay so if I now with that just note selected well not selected but just add it save go back here and I go a bit into an area where we have uh you know a bit more of mountains and just drag my PCG graph here you can see it will automatically expand to be a bit bigger at you know 25 and then I can simply just press on generate and we don't see anything why well what we can do is just right click on this and press thebug and now yes if I go we can see the points being check generated and if I move this it will automatically get the height of the landscape and accommodate the points so it will kind of work how it must so let me place the Sun a bit like this and there we go so now that we have this points let's make them a bit more interesting right so we can make them more random in this case what we can do is press D to stop debuging this right and then just go and do a transform points all all right so transform points and the first thing that I am going to do is add a bit of rotation so for rotation minimum we can leave it at zero uh actually we can leave it atus 360 and then at Max is 360 but positive and that way now if I press D on this and now debug in the latest node you can see that now all the points are kind of Twisted which makes a bit more Dynamic I can also add some offset to the transform itself so for example I could put like my 10 uh - 10 - 10 and then here 10 10 and then here - 10 uh so it will kind of put it a bit downwards right and we will not have trees coming out of the landscape like floating you know so that's why both are negative in this case and now they have a bit of of an offset right I can also make it for the scale so maybe you know it can make them a more bigger in all directions and you can see now we have a bit of Randomness which is pretty cool maybe one .9 1.1 so it's a bit bigger all right so there we go now we have all of our points correctly placed and randomized so it is time to replace with this points with actual meses right so there's another note that we can use let's press D to stop debuging this transform points node which is going to be as you may know static mesh spawner and this will simply just convert those points into static meshes and we can add all the ones that we want and it will uh you know create a list and just randomly select them so we can add this thing called a mesh entry and this is basically just adding a new static mesh so if I press control space I can open up my content browser and then just go into my Forest pack which I have imported go into meshes and then just go and select trees and then we have two options we have uh Beach and Oak so let me just randomly select some of them so in this case let's just begin with a c big one all right let me just there we go and then let's close it add another mesh and let's add this uh medium one here let's close it add another mesh and let's add for example this other medium one right let's add another one which will be something at this sapling add another one which will be something as this one and let's add another one but change this to be on Oak and put for example move this one and then open this up and change it to be maybe this one over here and then open this up and open like maybe this right so add a lot of variety over here and now boom as you again see we indeed have our forest here which is looking very very cool and you know we have all of our trees randomly applied so I can also like this PCG right to make it bit bigger by just locking this skill and May put in 150 over here and now we have whole bunch of more trees right that's that's so crazy uh maybe more like 70 sorry 70 that will be a bit better for me let me just zero boom 70 I messed up the scill okay I don't know why but it's changing everything on here so let me manually put the skill like this there we go 170 and that looks pretty cool and we have this Den Forest right so it is maybe too dense so what we can do is before uh you know moving all the points and everything like that we can add one thing called the density filter break this connect this in between and we can specialize how many points we want to uh go through so basically each point will have a certain amount of density right that's why uh they basically if I press the appear of one color or another one which one is more like one and another one is more zero okay from from one to zero so so I just basically you know filtered the ones with different densities and we have now less trees which is a bit nicer right for for our eyes uh and so on all right so then if we increase this we decrease more the the treats which is also looking uh pretty cool so now it is time to also add some more things in the ground so what we can do is another set of um you know let's say Samplers right so the only thing I need to do we don't need to do anything but with the output okay I can just copy paste this here connect this to here change the seed of this right so we will not have exactly the same points and then just uh maybe increase the amount of points that we want delete this AES static mesh spaer add a new one and now we can put another type of volage okay so maybe we can put it this time more like we go to meshes more like plants right so let me add a bit of plants over here there we go you know PL overall and so on right and then we also have cover which I can add so we can add for example these little branches and this one and so on right and now you can see they have more little things on the ground which uh look pretty cool and you know we have it a bit more uh expanded let's say now we also uh can add basically grass into this uh you know let's say this environment right so what we can do is first of all increase the density of this even more okay we go not so much but like this all right and then another thing that I want to do is to go and just get this right without the static mesh spaer place it here again another seed delete completely density filter directly to transform points add a static mesh sper and we can use add basically grass over here so if we go here search for grass we have all of this so I'm going to add bit of grass over here right and of course this is up to you and whatever type of um you know uh assets you use of course uh I think those are bigger grasses right I think we will do it faster as you can see now we start to have more grass like this and we can just make this a bit bigger or just basically increase the uh points per square meter so we put it to one as you can see now the the the points per square meter will basically change as you can see right if I put to to zero we have zero of this if I put 80 we have more of them and so on now uh it won't work if we put like very big numbers course it will filter them okay so we can put maybe something as you know this points and then uh and then that's pretty much it we can put also unbounded where it will fill the whole world but we don't want right now and we can uh basically just overall put more surface Samplers of this and we will even have more of them right just change a bit the seed right then we have more and now we can do the same and you know you can start to create your graphs with different type of uh you know vitation and whatever you want to have as you can see right uh which is pretty pretty cool there we go right then we have some grass and this over here and so on now what I am going to do is also just add the landscape material of the pack so it will basically look a bit better so let me search it uh it should be over here materials and then uh cover background ground this one and this uh landscape over here which is the master I should go there and now with that said after a few seconds I should see my landscape apply and it will just look way nicer I just need to also just go to the landscape options here go to paint and just assign the layers so we will see the forest in this case I think with Forest the first layer uh it will be more than enough as you can see now we need have more grass and even because of the landscape material and this just looks way nicer right I can just now go quickly and add a post processing um volume right make it infinite St so go through all the world change the exposure right to only one and one and then just go and increase the directional light to maybe something as 12 15 20 something like that and now we have a better Forest here we go and I can just go save this level as our forest right and then just wait a few seconds and I'll press play and we have okay well I need to go and press play on here the camera location and there we go now we have this absolutely beautiful Forest that we can go and move around and it looks very nice and we made it in a couple of minutes using PCG and of course we can make it even bigger and make it look even nicer and also just add our comment to be something as the main trees then things as the plants and then there's the grass right and that's how we can go ahead and create our own PCGS so that's it guys if found this video helpful I would really appreciate it you could like video And subscribe to my channel lot of uni videos had thorough so check them out remember how get the profil through b or YouTube members follow me on my socials and now yes plus it [Music] bye
Info
Channel: Gorka Games
Views: 37,900
Rating: undefined out of 5
Keywords: games, videojuegos, unreal engine, unreal engine 5, ue5, procedural, tutorial, quixel, megascans, unreal engine procedural generation, ue5 procedural forest, ue tutorial, ue5 pcg, ue5 new generation forest, unreal engine 5.2 procedural content generation, unreal engine forest pcg, unreal engine pcg forest, ue5 pcg tutorial
Id: cD7Q-tu1DgU
Channel Id: undefined
Length: 13min 52sec (832 seconds)
Published: Sat Mar 16 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.