PCG Layered Biomes. Basic Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi there in today's tutorial we'll guide you through how to use the PCG layered biomes plugin let's get started the first step is to prepare everything for generation first we need to create a PCG volume and place it somewhere on the landscape the next step is to add a biome spawn manager component to the created actor and assign PCG biomes or main graph to the PCG component then you need to create two data assets to store the settings the first biome settings will contain biome parameters and the second PCG spawn preset will contain sets of objects for Generation make sure to assign them next open both assets and create the first biome which will be a coniferous forest to do this make a list of trees in the spawn preset and proceed to create the biome name it Forest and create a generic layer specify the spawn set we created earlier and choose the corresponding generic graph for this layer type ideally trees should already appear but the first time you need to manually trigger generate and now we have trees although this doesn't quite resemble a forest now let's make sure the coniferous forest starts only at a certain elevation so add a height filter and set approximate values nothing changed with which means the PCG is not responding to changes in the files I'm not sure why this happens but to fix it open the main graph and press Force refresh this is only needed the first time you launch the editor now let's adjust the filter values next let's create another biome to cover the remaining area each layer has a special debugging mode that allows you to visualize the boundaries of biomes you can change the fill color if desired now let's move on on to setting up the tree layer let's decrease the density since we don't need such a high density of trees also trees shouldn't grow at such an angle so let's enable absolute rotation to fix this now they all grow vertically but this shouldn't happen on such gentle slopes so let's enable slope filtering and slightly increase the acceptable slope let's go through all the parameters of the layer density a allows you to decrease the density of objects seed allows you to randomize all random parameters except for noise noise allows you to remove part of the objects according to a specific distribution scale affects the frequency of noise the higher the scale the higher the frequency we can enable noise visualization for a better understanding through the custom debugging mode for generic graph now you can see the noise values and we can choose the values in which we want to generate objects noise seed allows you to randomize the noise distribution we have already used no slopes and absolute rotation offset Z sets the vertical offset transform range sets the range of random horizontal offset we won't see the real effect on the trees I'll show it later scale min and scale Max set the scale of objects on all axes at once we'll see the last graph in action later now let's create another layer for the saplings and make them grow where the trees are and a little beyond their boundaries for this set meshes for saplings in a new set and then it would be better to copy the previous layer and assign the created set to it nothing appeared because they are trying to appear exactly in the same places where they are already trees we can see them if we turn off the previous tree layer so let's adjust the settings a bit increase the density and increase the acceptable noise values make the noise slightly less frequent in both layers and adjust the parameters to improve the appearance now the saplings are competing with the trees for space you can easily see this by enabling the display of points where they are trying to generate as you can see they match exactly with the locations where the trees are currently standing so let's change the seed to randomize the positions of trees however you may notice that some points do not intersect with trees but still do not contain saplings and here's why avoid regions are areas where the layer is forbidden to create objects right now there are trees from the previous layer with boundaries that are too large so we need to adjust the out exclusion settings for the trees it's already set to 50% of mesh bounds but for trees 0.1 will work much better now let's return to the saplings as you can see they have haven't appeared everywhere they should and this is because their in exclusion settings are not suitable so let's replace points with mesh bounds and decrease the scale as you can see the saplings are now generating correctly among the trees however let's immediately adjust the out exclusion for the saplings so that we don't have to revisit this this will be important for the upcoming layers now just as before let's create another layer for large rocks there's nothing new here so we'll skip the details as you can see the large rocks have no chance of appearing in the forest oh H that's unusual why is that clearly there's something wrong within exclusion yeah here it is set to points but mesh bounds will work much better so there are no rocks in the forest because there's no space left for them to fix this let's change the order of the layers because this is where it really matters and now we have rocks among the trees next we'll fill the field biome with decision trees specifically we'll create the same two layers as before one with trees and one with saplings there's nothing new here so we'll skip the details and let's adjust the same issue with layer intersection by modifying in and out exclusion of layers so I don't really like these dry saplings and I want them to appear much less frequently to do this in the spawn object settings you need to decrease their weight but since it's already set to one you should increase the weight of the others H nothing changed sometimes the system doesn't recognize changes in the spawn presets and I haven't figured out why yet the simplest solution in such cases is to change the seed dry saplings still appear quite often let's lower the priority some more well that's better all right now let's create a road we'll adjust the PCG volume a bit for better visibility next we need to create an edit layer for the splines and the required paint layer now let's lay down the road across the plane we'll also assign the previously created layer to the spline as you can see trees are growing right on the road to fix this we'll create a new biome for the road and add a filter for the landscape layer lastly we'll change the priority of the road biome a point can belong to only one biome so the point will be assigned the biome with the lowest priority among all the suitable ones we'll set a negative priority for the road to ensure there's no spawn on top of the splines let's say we want to scatter Stones along the roadside to do this we'll create a special Edge layer make a new set with stones and specify it in the layer we'll choose a special special Edge graph for the graph now let's increase the generation area so the stones appear and adjust the generation parameters we'll increase the noise scale to avoid large empty gaps and also raise the noise filter high so fewer stones are filtered out with these Stones it'll be easy to see the purpose of the transform range parameter as you can see without it the stones lie in a straight line with it there's some scattering which gives a more natural appearance as you can see these stones are rendered from any distance this is fine for filming videos but for games it's to Resource intensive to change this we need to create our own spawner graph here's what the default one looks like all it does is set a template for creating meshes to make changes to them you need to create your own graph with the desired parameters the easiest way is to copy the default one and set the necessary parameters let's set the cool distance from 10,000 to 20,000 and assign this graph to the layer with the stones now as you can notice they aren't rendered from a great distance that's all thanks for watching and good luck with your creations
Info
Channel: LazyCatsDev
Views: 1,641
Rating: undefined out of 5
Keywords: PCG, Unreal Engine, UE5, Biomes
Id: w_Hq9T3iizU
Channel Id: undefined
Length: 10min 21sec (621 seconds)
Published: Sat Apr 27 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.