[Music] in this tutorial we will use the new PCG biome core plugin to populate our landscape that we created in Gaia I will also briefly go over how plug-in Works under the hood so you can expand its use in your project hi my name is Mars fman and let's jump into it so before we are starting we need to import some trees I'm just going to use these Norway maple trees so after we have downloaded our assets next thing we're going to do is we're going to go to edit and plugins we're going to go PCG and we're going to enable I usually just enable all of these and we going to need to enable these two plugins we're going to enable biome core yes and biome sample yes and restart our engine so now once we are back the first thing before we are moving forward and actually working in the setup I actually want to explain how plugin works and how we can utilize their body setup in our advantage to create our multi biome setup so what we're going to do is we're going to create settings and make sure to enable show um engine content and plugins we going to open up engine plugins and we going to search for PCG PCG so there are two folders We can to open up the bi biome sample content maps and let's open up the map so this is the PCG map example that they have gave and there's a lot of useful tools like let's say we can see that they have a like a forest two different forests I think even three different forests yeah one two and this looks also different so three different forests uh they have desert setting and then they have modifiers so one modifier here is let's say you want in desert for some reason to spawn a forest so there's a volume if you're moving around it's going to regenerate and it's spawning here the trees in that volume they have the same thing for a spline in case if you in custom shape then here's more splines and they also have example of a road so let's say if you want to cut out the road we can do that there is there's a graph for that so they basically give you all the tools that for most of the time you know you don't need to create anything extra so the biggest question is actually how do handling the biome generation because if you can watch my other other PCG tutorial where if you have seen my alternate if youve seen my other PCG tutorial where we going through the how to use landscape materials to gen generate then if you take a look at this one if you go paint they have layers we would be like oh okay so they are using landscape layers but if we let's say we take land and we go over and we go mountain and we go Shore we can see the same biome stays here absolutely nothing changes we can paint any material we want and absolutely nothing changes it refreshes the PCG right now but we can see the biome stays as it is here uh so I just got to reopen the map so what we are doing here and I think it's probably some kind of like fortnite thing and we can utilize actually in landscape generation process is if we open up this biome core we go down and select biome core and open up and we go down and click this parameter overrides first override we can see is a texture file and when you open this up we can see that they are actually using a texture to spawn different biomes so red green blue yellow so if we open up any of the biomes if you go up here's multiple biomes like a forest yeah if we select the desert and we open up this desert definition we can see that they are using a red for the desert and if you open look at the map and open the texture which is I believe there's something like this oh like this yeah so we can see the red is Desert and so for the other things they have green yellow and we can see this um Mountain area is yellow and then probably if we open up again this Mountain Forest open this one and we can see yes they're using yellow color and and there's a actually a one way how we can debug that so if you go again to this biome core uh we go go back back go we go down to the biome core and we check this so if we select this display biome colors we can actually see that that's what it does it actually matches exactly this texture file and it's generating based on the colors and then these modifiers like a volume and that spline actually changes the colors here so for example each biome is assigned to the color so the blue one so if you use the volume with that color it overr so what we're going to do now is we actually going to go back to the ga and we going to create actually a color mask filters uh it's going to be a bit confusing but just try to follow along and it's going to kind of make sense so we're going to create a new one and we're going to call this mask and what we're going to do is for that we're going to use something called quick quick color and this is probably not the way how you should do but this works for me with the new plugin that this this approach works for me we're going to make always these two colors the same okay so we're going to make both colors the same one and two we're going to make them the same so what we going to do is we're going to get a portal from our erosion so in case if you don't have it again take this output and there's going to be make a portal so next one we're going to add another real quick quick color and we going to set it up let's say to the green let's start with our threes um I probably the easiest is here I just going to adjust these numbers copy and paste and for this what we're going to need to do is we going to need to um a baral output so here's going to be a bit kind of like where you need to put attenion and go slowly is for some places we're going to use output and for some places we're going to use uh basically this masks coloriz is going to be kind of like a mask so we're going to use that one so for this we let's say we going to make a portal and now we go to the mask and we're going to get the same portal oops my bad we're going to get to the portals and we're can to use this Abal portal so now we can see the landscape is green and what we going to do we just going to combine we're going to combine these both and we're going to use ratio of 100 and now we can see our whole landscape is green because we are missing a filter for um a bolal so for that we don't have a mask from our green so that's why everything is green cuz they are combined with 100% green so we we our ratio is based on this one and since our mask is fully white then everything is Gren so what we going to do is we're going to go here we're going to find tree mask so Tre mask is here we're going to put this out and we're going to make another portal for the tree mask and right here for the mask we put it out use go portals and we're going to use tree mask and Bam right now we are exactly the same thing that we had actually in other one uh other tutorial we have here the green color for the trees so after that let's add next one let's add snow let's say for example quick quick color uh probably can just use white so for this we're going to go to snowfall we're going to get outputs let's get output uh make portal let's put a portal here for our snowfall then we can just actually just com we just can copy this combined because we're going to use the same combine over and over again again now everything is white because it's again 100% we are taking this one based on the mask which is again mask is empty so everything is white so for that for the mask we're going to go back and we can to search for snow so snow is going to be second we going to make a portal and we're going to get a snow information as a portal for the snow and Bam so now the white is only in areas where uh the the white is only in the areas where the snow is supposed to be so after that and again here it's important important uh to set up the order and again you know so if we look how we did in actually previous one then actually I would put probably the grass last one so we get the most grass information let's put grass actually away you see how easy it is to adjust things let's put this one last so we make sure that the grass layers the last one and we get as much grass information as possible so let's put this one uh let's get now quick color uh we could set up like I don't know let's set up red for that one we can set up red and I just going to duplicate the colors and this is going to be a Shore so we're going to go back to the shore and we're going to use this multic combine and we're going to make a portal we're going to use this portal multic combine we going to multi combine this plug it in here we go and now everything is red again because the mask is empty and to mask it out you could use this one also actually for the mask but the problem is this is also going to be red so we need to find something that masks out completely black these areas so this one so this effect node that we created we're going to use as a make plal we go back and we're going to find this portals FX node and Bam so now we have red area right here where we want to Shore and and the last basically that we need to do is we're can going to copy this again quick color uh obviously we can set up to Blue let's up set up to Blue uh let's cop copy and paste these two values and we're going to go back now to a lake so we're going to have a leg portal make portal here the output let's portals leges uh we're going to again copy and paste for the combine we're going to put here so everything is obviously BL because the mask is empty we're going to go back and now we're going to find leges and I think yeah this Lake mask we want a lake information make portal so we can get Lake information portals and lakes Lakes you need this and Bam and so and now so the last one as I said I actually want our grass information our three information be the last one just to make sure that in these R areas it doesn't this appear because if we switch around again the again the layers are stack stacking so that's why it's important how you adjust them and here we go so now we have a color mask that we can actually do click here and we can do Mark for export so now if you got to combine again we just switch it to the PMG so before I'm actually start build I will change these colors cuz I don't know if the white and black actually can cause us issue cuz I know when there's no biome it takes a sets the black color so I'm just going to quickly change this to let's say um light blue let's set this one actually the base to the light blue and the white one let's set up to Yellow I guess this is yes yes so this is going to be at the end full color cuz I just want to make sure that the white and black are not causing issues so let's better set up some color and now we can just go to the build and click Start build so we are back in our landscape and we can start our setup so first we're going to start with our forest data asset so makeing right click go to mclanes and that assets here we're going to write biome and we're going to select definition template and we're going to write BD biome definition Forest open it up and so here we're going to write biome name forest and we're going to set up a color so in our case it was green set up green now we can close it and we can to add another data asset again mclan is uh dat asset uh and we're going to choose bio asset template open up BT Ops BT Forest open it up and here we can just quickly add a few things uh for the testing purposes later we're just going to copy probably most of the things from uh the sample project uh but what we can to do is in generator we going to set it to share trees uh as a mesh currently I just going to set up one of the low poly ones and then after that we can switch to the let's say uh Mega scan trees so we can see we have basically all the parameters that we would normally have um in the PCG graph if we are spawning this the static mesh uh we have like uh you know collisions I love collisions visible cast shadows and all that for performance thing uh only thing that I'm currently searching for is self-pouring yes that's what we need we're going to take that to make sure that um it doesn't overlap the Ray and with that all we going to leave it as a default so make sure that mean and Max Heights are really high by volumes volumes uh so they spawn okay so we have those three things next thing that we need is we going to add uh we're going to search for core and we're going to search we're going to use PCG biome core and we can also name BP biome core and we can just draw we can just put it in our level like this this looks great So currently we're just going to leave it here so we can double check and test it that it's actually working and spawning uh before we are doing anything else so just for the testing purposes we're going to add uh let's search for the biome we're going to use this PCG biome volume and again BP uh biome volume we can put it here scale it a bit to something like this something like this and we can just put it up probably this is going to be enough we can always like move it a bit and now if you go to the biome core ah we actually need to set up this first so for the definition we're going to use our forest definition and for our forest we're going to put forest here in assets so make sure you can also just also add click this and add this in the asset for runtime assets we don't need actually we can go to biome core we can move down and let's double let's debug if it's actually doing something so let's go here and we're going to search for debug display make it true and let's click generate and we can see it works so it recognizes that this area should be green as our biome color that we set up here in definition and here there's no Bome information so that's why it's in a black color which is excellent so we can clean up and now uh if we disable this and we click generate we can see actually nothing is happening because there is uh Global filters um since my landscape is very very low so if we add a plane just going to explain what's happening so we add a plane the plane is at minus 177,000 and even though we set up here that it's spawning uh what is this 100,000 minus 100,000 it's still not spawning but for example if we uh click this to bypass Global filters we can actually see it's spawning which is interesting right so you can actually see it's actually spawning in the volume so what we need to do is we need to re re uh edit this filter and how we can do this is we're going to create a new PCG graph instance we going to call this PCG um biome filter really doesn't matter so we're going to open it up our filter and what we're going to do we're just going to copy this and we're going to paste it as a parent so if you open it up we can see we have the same things here we have instances um actually comes from this maybe it's better to P paste this one yeah okay we're going to keep the same parent let's copy this one so let's let's put the bar parent as biome core filters so now we're going to open this up we're going to click filters and currently I think we can delete this I don't want it to to overwrite these parameters cuz currently I want only the Min and Max height parameters to be overwritten so we can save this and now we can put this filter over here and we can see now our height is correct and it's spawning so we can overwritten the global filter which is I think it's doesn't let you um to spawn under z z z so that's why now we overwrite the height and um the max height to Min height by based on trees where we want them to spawn and here we go so this this actually looks good and it's working so next step since this is working we can just delete now this for now now the next step is it's kind of a bit tricky but um we need to match this volume to the same size as our landscape and actually the scaling is a bit weird but what I would do is I would set these volumes for volume to one one and one so we can get very very small and then I would start to scale this to one let's see it one does it show up so let's go to the top view and we can briefly see the cube here so what we going to do is in top view I would start to slowly scale it uh let's put something like 2500 let's see oh this is actually pretty close 2,500 is actually very close yep so I'm going to put 2,500 for both looks like it overlaps pretty well so we can go back to perspective and we can set the height to something like five maybe no like 500 so since our landscape is working we adjusted the volume to match our landscape so the next thing we can do is let's just create a folder call textures open up and let's import our texture for coloring we can import this open up our texture and we need to make few Corrections make sure this is set to no mid maps and we need to change these compression settings to default and uncheck srgb and the change to wrapping methods to clamp so make sure now Maps default compression settings uncheck srgb and clamp this so what we're going to do now is we're going to create another PCG graph instance and we're going to call it PCG biome biome texture oops I'm going to put Big T biome texture now we're going to open it up so we're going to search for biome core uh so we can search for biome core project texture and we are getting these parameters now let's save this so what we're going to do is uh we're going to use landscape as world region for the texture so for the texture we're going to use our texture just going to put it here uh we going to need to resize the texture size cuz this this is the part it's kind of tricky it's really currently I have fun just eyeballing this and we going to re adjust this on channel to Project X instead of just X XYZ so this how it should look for the testing purposes so we're going to go back to the biome core we're going to go back to the biome core biome core and we going to add this into biome texture we're going to add our PCG graph let's copy it here and then what we can do is we can click this uh debug display again and we're going to generate uh as I said with tiling thing and actually I don't know the correct formula how they calculate it but what I do is you open this one and now we can just quickly count so this is going to be we can see repetition so it's one two 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20 so it's like roughly 20 uh we to clean up everything make sure that it's despawned and then we can just take this number and multiply by 19 and then I'm going to save it again let's save everything before we are regenerating and now we can go and click generate yes and I think this one looks actually pretty good obviously we can see tiny bit off but again you can play with these parameters to adjust it so it totally perfectly matches but for this tutorial I think it's going to be good enough so what we can do now is we can clean up this um we're going to save again and we're going to create a new blueprint and we're going to go for biome and we're going to go for PCG biome setup we can select this one we're going to go BB uh biome biome setup and we're just going to add Pro probably two of them in our in our scene so we're going to add two of them we get first one called for Forest uh other one we're going to call River so we're going to select the forest one and if you go up again oh let's save all so we're going to add our definition here and for the assets we're going to add our forest here then we can just dicate this uh with let's say River let's open up our River we can rename this the river and I believe River was a blue color let's double check textures yes that's that was blue color so we can to set up zero and one um I actually going to change this to three so I'm going to switch up this with this three from the mega scans so we can start to get at least nice so I'm going to have these kind of Threes here so we're just get to for now one three again you can add multiple ones and look in the sample for the set and I'm just going to duplicate this and we going to call this River let's change this to the shared rocks and take let's take a look if there's any difference basically what it does it's um there's a sampler we can take a like the sampler here we can actually create our own uh but yeah let's load rocks and I just got to change this to the Rock I believe flat yeah this is the rock I download from the mega scans and we're going to do the same thing for the river let's add this one and let's do river definition and River here let's save all and now we can go to biome core let's select biome core uh deselect this one so we it does doesn't spawn debucks and now we can just generate the actual assets and hopefully it's going to look how it should be so we can see the PCG graph is working and here we go we can see it has spawned so I don't see rocks currently but I can definitely see threes so we have threes all over we're missing the Rocks so probably I will switch uh let's save all I'm probably going to switch to the share trees and see if that's going to help and here we go we can see that our trees and our rocks are spawn so we can obviously adjust the scale and everything else but it works and basically that's how you can use the new plugin so the last thing actually for our scene to be completely finished we can just quickly add uh plane right here let's let's put it Z 0 Let's H let's make it like 5,000 by 5,000 I'm going to move it something like this and let's search quickly for a water water material water cost uh water where water I think this is the one yeah so coasti water preview I we can really kind of like adjusted a bit to fit our scene and look at that if you go here we are actually having very wonderful scene that looks very really really realistic I think and adding few other things uh we can make it really nice I hope you enjoy this tutorial series I will definitely get to make some extra update we can add some more stuff to this series but I hope it worked in your project and see you in the next one bye [Music] [Music] [Music]