Advanced World Building in Unreal Engine - Chris Murphy / Epic Games for WA Games Week 2023

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
video games um hi everyone uh as per the introduction my name is Chris Murphy I'm from epic games um I'm a senior technical artist I've been handling evangelism in this part of the world for uh a bit over seven years for epic now [Music] so it's all good it's all good uh just giving everyone a second to get comfy um so that's the cat test right there each of those things um I've lost my TR of thought totally where were we oh yeah so I've been with EIC for a bit over seven years uh my role has been helping uh predominantly Australia New Zealand and Southeast Asian developers so um if you've been at a games conference in this part of the world in the last seven years there's a chance you've had to deal with me at some point um a lot of familiar faces uh today we're going to be doing Advanced World building um this going be a fun session I'm going to try and cover a bunch of different topics that are I have a certain level of kind of assumed knowledge at this point just purely because it's called Advanced World building I'm kind of just uh generally hoping that people have a a good idea of uh like how materials and things like that kind of work so you know I can skip pass that stuff and kind of get onto the good stuff um I'm going to tackle a few things I'm going to tackle uh landscape setups variation within them good practices landscape grass uh I'm then going to eventually move on to doing procedural content generation so PCG um actually while this is up I might just flick over to a second project just to give you an idea of what I'm yapping about um so at GDC this year we demoed the uh the electric dreams demo uh electric dreams demo was our kind of unveiling of a new system that we have within unreal called PCG and it's what we're using for uh or you know what we're putting forward as as a a pretty big element for ongoing content development for folks now it is in beta 5.2 was the first version that ever had it um 5.3 which is the current version of unreal uh has had quite a few fixes and things like that going into it um but that's going to be a big chunk of what we cover today because it is I think will be in pretty much every shipping project uh once it is out of beta personally um I think in the same way that we comfortably jump into into materials and kind of add you know whatever we need to for those things I think PCG is going to work its way into a whole lot of different systems um for different kinds of games in different kinds of ways and that's a big claim I guess but um to give you the kind of idea of things it is if I grab this object and move it around this landscape kind of reworks itself accordingly you can see this log here is finding the nearest place for it to kind of put itself down the ground changes itself accordingly um if I was to grab any of the these kind of areas and kind of pull them in the the trees and everything else is kind of adjusting and it it works I think that looks pretty good for otherwise procedurally content generated stuff now I I want to stress because like I want to stress this that um a lot of folks are obviously going to jump to the hey I'm going to talk to Chris about AI right after this session thing and it's not that kind of approach PCG is very graph-based you kind of set up rule sets and you give it idea like you tell it how these rules work with one another um in this situation with how this is built it is very artist driven and the artist-driven side of this um the artists kind of like break down areas they've done and flag things in certain way that when it gets loaded into a graph that graph can be like hey grab these elements and combine them together in these kind of rule sets and and like I said I'm going to cover that in more detail as the session goes on but I want to kind of give you an idea of some of the tools the toys I guess that we're going to be messing with um because I do think that this kind of uh system is going to find its way into every UI project in some capacity there's going to be some time at some point that people are going to just be like I can see little bits and pieces where this can sneak in well so I'm going to Nuke that and um go back to open World ww um and let's go ahead and create something now I'm going to create a project that is going to be once again as much as I love the open world setup I'm going to kind of ignore the world partition setups for this session well petition's really good but it is made for like proper development for a larger world and um I with a live audience in front of me I think it's just one less thing for me to kind of have to manage so I'm going to go a standard empty and just as before I'm going to fire up the uh the environmental light mixer um and I'm just going to add all of the stuff that I need uh if you're not used to that the environmental light mixer just gives you your default lighting setups I want to stress that it's not the light mixer which is really awkwardly named um to be fair the environment light mixer came first and then someone else was like I'm going to make a regular light mixer it's like damn um but I'm going to add that and we're just going to kind of get the B rolling I I'm going to begin by I'll give you a little bit of an idea of what I'd like to create I want to make a city park and I want that city park to have uh Pathways that are kind of going all around it that are driven by splines so we can move the pathways and wherever we move move those Pathways too I would love for them to um kind of paint dirt into them if you know what I mean and like kind of clear their way out um and I would love for like trees and bushes and stuff to make sure they stay out of the way um I think there's some other things that we should have time for but see how we go I'd love to have so that when we put a lake in for instance that the lake grows some reads around the edges and stuff like that and adds little bits and pieces as we see fit um there's a lot we could be doing here I'm sure that I'm going to get some people in the audience making requests um but yeah so to begin with I guess I need to start going ahead and uh getting a world together by the way the assets that I'm using today are from the city park pack which is a free asset pack in the permanently free collection of unreal it's nothing too fancy uh I'm going to go and create a new material and call it mcore simple landscape um by the time we're done I guess it's going to be mcore Advanced landscape but we'll see how we go uh and I'm going to uh going to go ahead I'm going to go to my landscape mode and I'm going to create a new landscape with mcore simple landscape applied um because I don't want to think about it I'm going to just roll with uh default sizing it's fine for what we're doing um by the way if I use any hot keys or shortcuts that you see throughout this um let me know and like if like dude what did you just do I have a bad habit of doing that so if if you see something and you want to know feel free to do a bit of a call out um cool so we've got this in play uh the first thing that I'm going to want to do is I'm going to get simple landscape and I want this to have some sort of um ground texture and we have a bunch of them in this project ground 2D is going to be our grass and there was a ground sorry ground 02n is going to be my normal map in the same way that we did in the introductory session before I'm going to bundle every landscape layer that I make into um material attributes pins and the reason for that is I just don't want to have like a 100 different LPS you know one for every single Channel that's going in it's a nice way to handle this kind of thing so um what that means is that while all of these things are inputs you can turn them into a single pin that has an input pin that is an entire material within it in this case I'm going to need the base color I'm going to need the roughness and the normal just feed them in I think the Alpha channel is either height or roughness we're going to find out if it looks weird um and I'm just going to skip ahead as well actually because we know we're going to need um we know we're going to need grass and I'm going to add dirt so we could do it like this where this is the grass layer um and we could do it with like another layer that was feeding in and if there was pretend there was for a second there was another one here that was done that was kind of feeding in right and traditionally that's how you would build materials it makes a lot of sense um when you're building stuff with that you're going to intend to have procedural elements involved in I would recommend doing it a little bit differently um um because when you've got procedural elements you've got far more of like a hierarchy where you're like you probably want to have thank you very much you probably want to have like a base layer of dirt everything is dirt unless otherwise and then after that dirt you're going to want to bring in grass and then you want to stack things on top of each other when I'm personally working with procedural stuff I find working with a stack a really good way to approach the problem this node here is kind of built around the idea of every layer is UN blending the other layers and and blending in the new ones when they're going in together but I I personally find that it's a little bit easier for me to say um let's go let's see assume dirt by default um so I'm just going to quickly set up grounds uh which of these looks let's go with ground one cool so that's going to be dirt and I'm going to do is I'm going to have a blend material node which says hey you initially are dead and afterwards I want you to be grass now based on what is going to be a landscape sample that I'm going to call grass so as grass comes in it's going to blend from one thing to the other I want to flag that what I'm starting to do here is going to start to get messy landscape materials are notorious for being the absolute messiest kinds of mat materials you can get how do you fix this easiest way to fix that honestly is add a named reroute node and I'm going to call this dirt layer and now if I do that anywhere else I can call dirt layer and it's the equivalent of having a reroute node that we can't see so this kind of lets me kind of get that dirt layer and put it in a nice simple box that's still in the graph that I can see but there's no functional difference between doing this and plugging it in directly do you know what I mean um and you know you can actually even right click on them and hit convert to reroute and it will convert back to what it really is doing under the hood but I do find this a nice way to kind of manage this it's also not a bad idea to call this like dirt layer and I can sync the colors up for this which is a blue right now and just set it there just for visibility sake honestly these things can get out of hand so it's not a bad idea to uh comment by the way was uh if I hit C it'll it'll create a comment block and I'll do the same thing here right where just in case name's re it'll teach me name reroute add new one gross probably should have made it green because expectation but whatever all right cool so now I'm only really going to be dealing with this as my Core Concepts because this this lets me kind of just treat it as like the idea of grass is blending in I don't have to care about lines being everywhere causing problems in my day all right so we about that all right that's good and if I also plug this in and hit apply actually I'm going to set this grass to have a preview value of like 025 uh first thing that we're going to see is we can see that this dirt is coming in and the grass has been added as a lay here I'm actually going to add uh I'm going to going to do this as a nonwe blended layer because I want each layer not unpaint the other ones and I'm going to do this as rather explicit steps I think setting this up to be a layer that is non-white Blended because of a hierarchy I'm going to control that myself when we start to get some procedural Tools in play so I'm going to create a new object and I'm just going to call this one grass layer cool and if I was to ever you know paint in grass which we've got there but if was to paint out grass we'll end up with with dirt now immediately I can see something that makes me cringe um not talking about anyone in the audience you're all safe uh like the one of you said thank you um and that's just the tiling that we see there like that's just some really gross tiling going on um not a fan so how do we fix that now there's a bunch of different ways that we could fix it um there's no necessarily right way but I'll show you a couple ways that I think are really good um one that I think is pretty good as an approach is texture variation node the texture variation node works by Shifting the UVS um and because it works by Shifting the UVS and then kind of dithering them um it's reasonably it's not too expensive with what we're doing and on top of that it gets a pretty good result pretty quick without tweaking now how this works is if I was to click this it's actually going to be a little bit broken initially um it actually requires these textures to no longer calculate their own DDX ddy their own mmap derivatives for anyone that's like what did you just say how it works is this every texture you've got has its big old highres version right and then as you go further away we get to from a 1024 4 to a 512 TOS 260 256 128 64 32 16 right so like as we go away we actually kind of like switch between them and we switch between the right texture resolution for the version that you can see at whatever distance it is but when you're kind of using the UVS in some sort of crazy way to blend between them and move them all around we kind of mess with the default way to calculate which version of that you know which bits of that texture we're really seeing right now anyway that whole thing that I just said really just means you need to actually click derivative which opens up a DDX and a ddy derivative which says this is basically the size of the texture you are and we allow the function to handle that functionally that means you literally just plug these nodes in right so it is pretty like it's not hard to set up you just need to be aware of the fact that you're explicitly setting a myip derivative which is not apparent to anyone who's done a lot of just basic materials I totally understand if you've never touched it 9 out of 100 unreal devs would not have touched it but the results um are pretty good I'll talk to the grass really quick again same thing where the MIP is going to be set to derivative um and I'm just going to go DDX ddy DDX ddy shifted UVS shifted UVS um the variation scale is currently like a value that we can we can Tinker with but let's just see what it looks like initially um cool that holds up pretty well I think like I uh it is a larger tile because I know I should probably shrink it down but um even within the larger pattern it's pretty hard to see explicit tiling that's going on there like this black dot is probably the best thing to track and we can see that that dot is kind of appearing in a bunch of random spots rather than being all in a row you know what I mean um so an imperfection in the texture is actually really good for me to track that the the general setup is doing what it should and like if I stare at the grass um this is what my life has come to uh I'm having real trouble finding the exact points where it is doing its Blends if you do find those points and you're like oh actually this could look better um a cool thing that you can do is the um you can actually height map uh there it is a a height map channel do you accept a it's a texture object you can read in a h hyp map texture uh and what that actually does is it takes a um the height of the grass blades for instance and only Blends them in when one piece of grass is above the other one and things like that which is a nice way of like kind of hiding those Blends even more so good approach um so yeah texture variation node with DDX y I personally think is a pretty good way to handle a lot of these issues but this is still not grass right like that's still really really ugly um because I don't know maybe I just use the Duke Nukem editor too much as a kid but all I'm seeing there is just like flat surface you know like I want I want bumps and I want um uh build sorry build is the name of the DU nedor irrelevant all right so what we're going to be doing here is how do we get grass into our scene so what I'm going to do is I'm going to right click and I'm going to go down to foliage and we're going to create landscape grass and I'm going to call this landscape grass underscore U generic grass I guess um and what landscape grass does is it allows your materials to control the painting of grass actually I'm going to step back and show you the wrong way to do it I could open the folage mode and I could grab random grass from within this project let's grab you and I could just um like with that selected spray grass into the scene right but I don't want to micromanage every patch of grass in the game because that's historically considered a bad idea right like if I paint dirt there I obviously don't want grass there we shouldn't do it and not only that the explicit exact spots of grass doesn't really matter that much and it's also thing that you need to care about on a per platform basis you know what I mean like mobile devices we probably don't want to show that grass but we do want to show that grass on like medium to high-end systems so what this H what happens here is in the landscape uh in lgor generic grass I can actually create I'm just going to turn off engine content I can actually create um that grass through the material um I always feel like I've seen Shrek too many times anytime I'm browsing foliage or anything like this because you know that same my donkeys like that is a nice boulder um like looking for like some really good looking grass uh let's uh let's go with this one see see if it works well so I've grabbed this one it's currently got a default value of grass density of 400 or whatever um how this works is inside of my material I can create a landscape grass output and any pixel that plugs into here will now be that grass okay so whenever it gets a white dot there's a there's a chance of grass whenever there's a black dot there's no chance of grass and whenever was a gray dot it's like maybe there's some grass who knows okay so if I was to get that landscape grass sample this will be a completely pure setup right because it's just going to be like Hey whenever there is grass there painted in give it just a sec to finish building oh I missed a really important step I got to click this and actually apply the grass I sarar how to do my job all right yeah good all right great so that's going to come straight out and actually just painting the grass now the advantage of this as a system is that when I go to get rid of the grass it gets rid of the grass okay and I know that sounds obvious but um but it also means I can start doing some other stuff as well like a really cool effect you could do here is I could have the grass with a noise text like if I was to apply um let me just grab a generic noise guess I'm turning engine content back on um let's grab a generic noise that's like a really all right I'm going to grab this noise here um and if I wanted to actually I'm just going to plug it in by itself so you can see it when I plug in that noise texture we should should end up with grass see that that kind of weird pattern that we're getting there it's because it's wherever the the white areas are on this texture is is going to be projecting that in there right but a cool part of that is I could use that noise texture um actually that looks surprisingly good for it being a so spass um but uh I could use that noise texture as a way of um I'll show you landscape coordinates I wasn't going to do this but I just started to say it and now it feels like a good idea so we're all on for the ride here we go all right apply um rebuilding all right so that was a much um larer like I made the the the texture sample projection much bigger um and if I wanted to multiply that against um itself but smaller maybe um at 10 we're probably going to end up with very little grass kind of popping up in up here maybe two little grass no there we go so the reason I've done that is this could now be what I'm using for other little tiny like flowers and things like that but I could cluster them really easily this way if you know what I mean like because I can create patches of flowers and then across those patches of flowers especially if one of these is like um like if this is rounded so that it's either a one or a zero and we're not having any um of the the the yeah good so that's now kind of creating little clusters of them together see how they're like a little bit more uniform in what I've done um and that kind of lets me create heathering as well right because I could have one regular type of grass and then every now and then we get beautiful patches of like purple grass and then it kind of goes back into green grass I guess Pebble grass is just pry in my mind but sorry of grass shame but um but kind of like having that set up in my opinion is a really good approach to this to like kind of create natural variation that as an artist you don't have to care about doing you know what I mean like it's just going to kind of handle those things under the hood for you and that's that's useful uh sorry you had a question oh to see what it looks like Yay just sorry to make you repeat that there's actually quite a few people online yeah that's I I was just asking if there's a way to sort of preview the uh generally steps yeah yeah so generally you would right click and hit preview um because the landscape is so big I happen to have gotten a big black patch in this in this one spot because it's previewing one meter cube of it um but you could also plug this into the diffuse on the output or something like that if you really needed to um but yeah I mean I've kind of set this up as a really quick thing I didn't actually want grass that looked like that I just wanted to make sure you were aware of the system doing that um but now that I've actually gone that far I I am going to go set this up to have slightly patchy a grass because I thought that looked pretty um or did it was it pretty I remember it being prettier a second ago when I showed it to you um Okay cool so we've got that in play um no I'm going back to the gross amount of grass yay all in Okay so we've got that in play um there's some things that are worth noting when you're setting this up um one is that you have this instance World offset disabled distance so nanite in Unreal Engine handles polygons really well just really really well but you've still got to handle the sheenam reverts that you're dealing with so it's not a bad idea to at a certain distance in this case I'll say 5,000 units um what this will now do is this will turn off so see the waving of the grass but if I look at grass in the distance you can see there's a point where all that grass stops waving now I know I'm staring at this and there's probably going to be some guy on the steam forums complaining about this but most of your players won't notice this when they every when all the rest of the chaos and stuff is kind of in there right so finding like a good value to potentially balance that on um is a good way to keep it performant because you are adding a lot here and again there's other ways you can manage this too like under grass density if I hit plus I can specifically set up uh especially when I've set up more platforms I could tell it explicitly hey look my regular grass density is 200 but on Playstation I want it to be 300 because I know that system is always going to handle it and it's going to look good however on mobile I can set my grass density to be like five you can just get a couple of blades and we'll deal with that you know so however you want to set this up is up to you but like be aware there are per platform overrides for a lot of these things um and like honestly even dropping it back like that I think it's gonna look pretty good oh uh H microphone CN one sec oh yeah sorry um if you're looking to do the uh the the CSI Zoom enhance situation um so when you're holding right click W as and D move around the editor q and E move up and down um Zed makes you feel like you're playing Team Fortress classic again and C uh does the opposite so Z and C while holding right click change your F levels I do it a lot when I'm fixating on something um again like even here like those numbers that I put in were probably even then I you know we could have that grass all the way to a 10 met distance I think once there's bushes and trees and stuff like that in in the midst of it like the core stuff there is still moving to me um and that'll hold up pretty well especially once we have some bit more occlusion going on all right I'm going to rename this this map to demo map um and we're going to start doing some other stuff oh I'm also going to set the um random scale between one and two just so it gets a little bit um patchier because I want it to not feel like it's been mowed every day maybe 1.5 yeah good and on that grass as well um if you really want it to be performant and you're having issues uh grass Shadows are a quick way to do it but in my opinion there's a pretty serious loss of quality there when I when I got rid of that so it's up to you as to whether you are willing to to to sacrifice that um cool I think that's all pretty good that's all sorted um doesn't need to receive decals oh and I'm going to set the distance as well so start Cal distance and end C distance are pretty useful um because how this works is this is the distance with which it starts to get rid of the grass and then the distance at which it totally gets rid of the grass so I can actually tell it to have a really close distance where it it has full grass but honestly it starts to get rid of it beyond that like I actually got a pretty good performance boost then by just setting that up because now at the 10 m Mark it's going to start to get rid of the grass and between 10 m and whatever that was 200 M or something it's now going to lower that density to the point that in theory if I was to zoom in all the way out there the grass density is a bit lower but you're not really going to you're not really going to spot it right and like I don't know it's still handling okay um good all right so we've got that in play going to hit save going to hit save and we're going to move on um the next thing that I want to start doing is like well okay so how do we handle this landscape and what I want to do to it I want to have a big old Lake in the middle um and ahead of time I think I turned on the water plugin I think yeah I did I'm a professional um and the water plugin is a great system within UI um that is pretty pretty uh well stress tested within fortnite as well um and I've also turned on the land mass system so how the water plugin works is this let's say you wanted to have a lake in the middle of your map you click add you type in the word Lake and you drop a lake into your map and then you give it a minute as it compiles shaders for the first time I really wish I had the menu music from Unreal Tournament that I could play Whenever everyone had to wait for something and I've been wishing that for seven years and I've just never done it I don't know why again it's all spline driven um and we can see that that's kind of giving me a reasonable result cool thing thing is it actually handles the postprocessing even our seagrass um and there's more than just Lakes as well so like if I did want something like this in the middle of the map I actually think it's probably going to be a little big maybe it's fine um if we if we wanted other things here as well we could um so if I wanted to have a um ocean I would drag in the ocean in case no one saw that coming um give it just minute I guess and it'll it'll handle itself um a cool part as well with the ocean aspect here actually that I really like is I'm not I'm not building anything now um now the one I wanted was did anyone else here play unal tournament 99 no uh all right sorry so one thing I want to point out is as well as that these systems connect now I like can never run into the ocean in our setup because that's what we call more ocean um but if you I'm sure there's someone out there that really cares about uh geography that's going to be deeply offended by my definition but um Rivers can connect anything so a cool part here is that if a river there we go if a river is connected to a lake it actually does merge from one to the other uh if you see that so see it's starting to I got to flatten that out a bit but it it will actually merge those materials together and then when we go to the ocean at the end um we can get a pretty good result as well nothing that's worth noting on this front that's really useful folks don't really know about is I can right click and visualize depth and then I'm able to be like the river is this deep um don't ask me where that water is coming from because it's not it's not exactly scientifically accurate but um I can also visualize um River width and on each of those points I could thin it out and have like a very shallow River for instance um we would set that up as appropriate okay and it's just building itself again h i flick the thing off um cool so I just wanted to make sure like everyone had kind of seen that before um it's a great little system to have uh it also has buoyancy built in so if you add a buoyancy component to an actor they will float um including velocity on the river so if you drop a cube at the top of the river and it's got a buoyancy component on it um buyy component or yeah and then you set pontoons on the buoyancy component so you can set like the floaty bits of the actor um and though they will then drift Downstream which I think is pretty cool uh this was overkill for what I needed so I'm going to get rid of the river and the ocean sorry Earth um and we're going to roll with this you had a question yeah yeah I was just wondering if the water system um works with just straight up planes or does it only work with Landscapes um you can drop it in there without it doing anything to a landscape but you'll need to micromanage the shores of the water um and like that's you know there's plenty of situations of that like even in fortnite you can see it in UE FN if you ever launch that up you'll see that um like swimming pools and things like that are still using the standard water system yeah as a way of kind of outlining it yeah cool cool so we've got that in uh and that looks kind of cool um but what I'd like to do next is I'd like to start handling the edges of this um so I'm going to go back to sculpt mode and I'm I'm going to hit this button here that turns off visibility of a layer so I'm going to turn off the water for the minute just because we can I want to focus on what I think matters uh and I'm going to go and instead of using sculpt brush like we normally would I'm going to go to blueprint brush now blueprint brush is very cool uh how it works is you can add brushes that have been set up in Blueprint as the name implies uh in this case there's a whole system there called land mass which is um well I'll just show you if I click land mass brush and H control click it gave me a pyramid here right and that's not because it's the pyramid brush um like I joke I make jokes about this year number of situations we've we've caded for but there is no autogeneration of pyramids yet U6 here we come um I can grab this and how it works is I alt drag and I can kind of paint out the area that I want and what that'll do is that will meet in the middle so if I don't want it to work that way which I definitely don't um I'm going to go down to here and I'm going to cap the shape and when the shape is capped I'm kind of able to work it like it's a bit of a like a plateau system because this this gives me like I can add now like a little bit of an area around the lake so I'm going to have the lake there but then like a general depression uh around the the the space that um uh that we can work with uh and I can start to either set the angles so if I set that to 20 um I said to two I'm like that wasn't very much yeah so I can set that to like 5 10 20 and kind of get that you could also do it as width based so I can tell it that the hill has a 4096 um fall off which is like a nice round number um so it's up to you how you want to handle that but like setting that up and kind of working with it this way I think is pretty good it's a quick way to get get a nice is result right because I can go to here and I can also do other things such as I can go down here and I can hit displacement and I could displace it by 500 and that will now run that displacement of just a noise to kind of bump it also these can be duplicated so if I alt drag I can create another one of these this has too many points for what I was about to do so let's just like pull this in as a weird Mountain shape sure so we can get this and I can kind move that around as I see fit and this one I might want to lower it a little bit and then alt drag and again the one of the great features here is that um this is still all on my layer over here so if I have an art director who's like Chris I hate your mountains um I can be like okay and turn them off and revert to the other system that I had or I could put them on an entire other lay layer that is like here that is something we can work with um but this is generally doing okay this is fine I just kind of wanted a general structure that looked acceptable um which is good um cool uh great the other thing that I'm going to do here that I think would be nice is we can use land mass to um to paint as well and I know that we've got this huge body of water that I have yet to hide sitting in the middle of the thing I'll just hide you for the minute um but we can use landm paint as well so a cool part of that is if I wanted to um back in this brush mode might be a little bit tricky to see because of all of these extra secondary ones that I just added maybe it's fine um I can go here and I can actually go down to um paint layers and I can paint in I can go to grass and I can actually set the uh I'll pull this across so you can see it final opacity to ne1 and what that's now going to do is that brush is now painting in anti-g Grass okay so like I can set this up to be painting in there but I can also do um banded painting So banded painting is now only painting where the spline is on that mask and not painting the filler area does that make sense instead of painting the inside of the spline it's painting the rim of the spline that we can see there was that sorry yeah yeah it's a it's a stroke not a fill thank you um and you know and I can control this as much as I as I as I need to so like I could get that and fill that out and if I wanted to I could have um like it's being affected by a texture so it's hard to see there oh texture influence is pretty low let's let's really crank up that texture influence and you can see here that um see how that texture is being applied to it that kind of adds a more natural feel to it is that is that standing out enough there if I go like a really high tile amount it's kind of like um really noisy on the edges there but if I go a really low tiling amount um it's just kind of like big bumps that are kind of generally pulling into those areas and I can add multiple layers to it as well right so I could have grass um and I think I need more layers let's let's quickly just um all right really cheeky thing that you can do that I like is if you get dirt but you multiply the dirt by like 0.2 to be dark um dark dirt with a low roughness is basically mud uh so I'm going to just do that and I'm going to call this some I'm going to call this mud layer cool pretty confident that'll work going to grab you and I'm going to say hey mud is always going to paint over the top of everything else um so this is mud by the way do you see how much easier that is to like manage your landscape material when it is just kind of like the clean output nodes at the end um and this is going to be a new sample that we're going to create called Mud yeah good I save great and then back here um in my landscape I need to still add my mud layer so non weight Blended that's fine and the result of that is I should now be able to go into here now one thing that is useful is if I reenable my water layer um if I reenable my water layer my water yeah but I hit contr H so I should have unhidden it maybe when I nudge it no whatever all right cool so if I get this and um I'm uh click on the brush manager instead of the lake sorry folks um I quit I'm out done all right if I get this um Nothing Stops me from kind of getting this this River here that we've got and saying to it sorry Lake that we've got um and actually doing the same thing here as well so if I go to this and I go layer weight map settings I can now add mud um it won't work immediately actually this is a thing that's worth noting is it won't work immediately the reason it won't work immediately is Water by default doesn't paint unless you go to the um the landscape water brush manager and say this does affect the weight map at which point it's now painting in mud except I made another mistake which is my grass is controlled by just the grass node so the final result is now grass minus mud and that should now remove it good so now whenever the shoreline kind of creeps in we get that result there pretty well okay and like again like this wasn't a whole lot of work and I can I can go back to the um the lake that we've got there and I can control a bunch of the land mass settings that are there to make it a little bit nicer like this this fall off is an angular falloff right now but we could we could make that 20 as well or something to um or you could go just really what are you doing here um I actually think that on bodies of water the width Works a little bit better because I can say hey you're 20 48 um and Edge offset um if you crank that up so the edge offset is The Edge from the rim so zero kind of comes all the way into it anyway cool so I'm going to bring that up to a place that feels kind of nice I think that that'll look okay when we're kind of done with it um the next thing that I want to do is is uh I'd love to start getting some um some paths around the um the map you know like I'd love to get like lay down Pathways that were going everywhere that we could see um there's a few ways that we could handle that um land mass is probably the next easiest so I'm going to create another overall layer and I'm just going to call this like paths just so that they're all in one place um and I could make this a custom land mass brush uh which isn't a bad idea for you um because you can make your own preset settings on the land mass brushes that you're happy with and save that as a blueprint and then just drop that one in there if you wanted to um but if you if I if I drop this in what are you doing to me Sor fix you got to drop them in in sculpt mode all right if I if I drop this one in which is now at the top of the stack so it has priority um all right that's obviously not what we want our path to look like but uh first off I'm going to go back to my anti-g grass situation so paint in no grass next up what I'm going to do is under um shape brush type is land mass outline and I can actually set that to spline mesh and that'll now project a spline mesh onto it and if I cap it the result of that is um sorry uh my strong suggestion I have for UEI by the way is I personally am always in favor of multiple monitors um but now I'm able to alt drag out a path and kind of set this up as I see fit that is going to paint back in and we we can kind of set this up nicely a cool thing of having this tied to splines instead of meshes is just like your iteration speed is just way higher um because I can I can get this and be like um so the reason this is kind of extending all the way to the ends notice that thing how like it's only when I get to a certain distance that it's appearing at the moment um that's just a a little bit of a quick in um in the L Mass brush the blind mesh has a length and if you decrease that length it'll now add more U like it's only when at every 4,096 units it adds another one um but you know we've kind of got that in there now and I can you know we can we can tweak that as we as we need um and like this this isn't just XY projection it is also High pasted right so you know I can it's much easier for much easier for me to kind of add nice Park Pathways that have like just a little bit of a Twist to them and stuff um that we can set up as we as we need but like it's much quicker to kind of get some like natural feeling environments going together he says while looking at the least natural part of it um hopefully this is useful to folks I know it's a bit of an odd topic and yeah we can control the fall off as well finally so if I go back to my um this is also only the first uh like this is the version that's here you can because it's a blueprint inherit from this yourself and kind of do whatever you need to um angle there we go so if I said this to something gentler we have a much nicer um pathway that is not as aggressively blending in you know like that that feels reasonably nice and I think once I kind of of um bring everything in um we can probably get into a pretty pretty good spot um paint L is full off width is two is 512 right now so um I could bring that in um as necessary uh I think that's probably good so the next thing that I want to start going into is we can see advantages to like having this kind of environmental setup when we're working with things um but what I'd love to do next is start getting foliage and trees and such into the world um I keep looking at the wrong device to see what the time is and then I forget what the time difference is between the one that is working and then I just end up in a huff all right uh we are one hour into the session so far yes so we have an hour and a half left cool all right so the next thing that um I'm going to do is before I move into PCG actually I wouldn't mind showing you one thing that I do have a couple of magic numbers that I saved ahead of time beforehand that's right I rehearsed some things that one time I thought I did well all right um one thing on a flag is the material for the water system uh I think it's a it's a little bit of a drawback in in the way that it has been set up by default is that um by default It Is by default it looks very fory you know like it looks very kind of like a stylized water um it's not what you would necessarily want in a city looking Park especially with these waves going on um so how do we fix that I guess is the the question um good news is is it's reasonably straightforward if I click on the water body Lake every water body somewhere inside of it um waves there it is wave Source wave asset so by default there is a lake wave asset and this asset is in the engine content folder of unreal the problem with engine content is if we change it it changes for all of them okay because if you change something in the engine folder all projects reference that and then they all get altered accordingly right so you've got to make sure you copy it out for everyone that doesn't get that I feel like we've seen enough Multiverse movies that have been made in the last last 10 years that everyone's on board with changing one thing and it gets reflected so I'm going to grab this Lake and I'm going to copy it to here and this will now be my I'm going to give it a name that's distinctly different such as calm lake um and we're just going to open up the the wave editor um this is a pretty useful uh little tool it's an editor that no one knows exists because it's awfully specific it's just a preview for for waves but we can drop down the number of waves um and you can drop down the amplitude of these waves so if we wanted to have just like a really low amplitude um and a Max amplitude we can get a pretty calm surface reasonably quick and if I go apply this one we started to get some of that so that feels a little bit more chill feel like I would take a paddle boat through this thing this thing's cold with the three wheels look like a it's like a lake bike someone help me out here uh um cool next thing is the material so again the default material that they're running uh on here doesn't suit every project which is fair um so just just don't be afraid to I wouldn't duplicate this one but um oh actually no it's an instance so that's fine um so yeah just make sure it is ending up in your own project before doing it otherwise every Lake will now look different so I'm going to call this mcore gross lake just GNA make it like Browner no this feels like a like a like a Vanuatu situation right now and I'm I'm making a city park um cool G Lake here we go and if you want to mess with gross lake get rid of Cal Lake uh we can mess with gross lake accordingly there's a lot of values here for like your your distant normals and stuff uh to control like how big the ripples are and how small the the the ripples close to the the ground are there's also some other stuff here like cor sticks so if you enable cotic um on it give it a second it's recompiling um that'll now actually handle some Coti projections back onto um back onto the surface of the lake but what I actually wanted was absorption and absorption is just the quickest way for us to get something that is um absorb you absorb you this Alpha is the the gotcha because it is um effectively a multiply of whatever numbers you do punch in cool and like that's just a little bit grosser than what we had but that's also I think all right it's a bit it's a bit too gross now but whatever we can we can you can fix that as necessary right like um the instance info is pretty much immediately propagated so if you're doing this this is where a second screen really comes in handy for for kind of balancing some of these but I can kind of go to my absorption and now start trying to find the right spot to absorb just the right thing no you're not you're not reacting live like you should that's weird yep you're only doing it afterwards uh you know what I kind of want to go gross Brown all right I'm gonna get stuck on this if I don't distract myself so a little bit grosser all right gross lake here we go um Okay so we've got that in um started to feel like we've kind of got some assets that are kind of balanced out um I need more city park for my city park uh right now it's kind of like City grassland um so let's move through some some procedural content here G get rid of my landscape for the minute um all right so a few different ways to handle this uh I'm going to go right click and go PCG and PCG graph and going to call this PCG uncore Forest um actually we are at the one hour mark and I did cheat you all out of a break last time I feel bad about that um because it's two and a half hours of sitting so what I might actually do is we might take a 15 minute break now before I kind of go into the PCG stuff so we're going to have a 10-minute breather sorry folks uh I know I'm like here's the good stuff coming up next on Dragon Ball Z um but uh yeah for I I might actually take that 10minute breather now um just because otherwise we're going to get on a roll and I'm not going to have a good convenience spot to stop it so um 10 minutes from now is uh 3:40 so yeah we'll it s back down again at 3:40 apologies to the live stream people who are chilling at home and don't need a break Li f all [Music] to [Music] of I Street e w what to what f make is oh bre out hello attendees would you please take your seat again we are about to start the second half of session two Advance World building in on real yeah totally is I a know how to speak I don't shut up all right um cool thank you all right so I feel like we're getting somewhere um the like generally I think once we start to get like the the rest of these pieces together and we start handling things I think it'll start taking shape um there's a lot of stuff here that in hindsight I probably should have done that um like the paths for instance I went and had negative grass but for something like those paths to really feel good um probably wouldn't be a bad idea to to have uh where are we painting on the edges of the path that way you kind of get that like track look if you know what I mean where uh why am I not seeing paint layers sorry you know when you look right at something and somehow just don't perceive it um here we go so I might just quickly set that one up do banded masks so again you can see that banding when it's along the edges starts to give it us a little bit more of a track um I want to have much less of that actually I might make it really visible initially and then set the texture influence really high um and then the tiling so again if the tiling is high it'll be consistent if the tiling is low you probably didn't see much of a difference there yeah all right um yeah okay cool I just kind of wanted the edges of the paths to feel a little bit more of a muddy situation but now I'm like falling between these values that would have felt good bit closer yeah good okay band thickness sorry everybody I'm now just getting way off base all right good um that looks way too much like a road I was looking at it from a distance good from a far but far from good all right here we go um let's go here maybe that's acceptable whatever I quit I'm out I'll go home okay so what I want to do next is PCG um I want to start looking at getting content that we can drop in and iterate on without um without just struggling to maintain it um now I am going to I'm fully aware that what I'm about to show you is definitely going to be the um it's going to be the Chris shows you the fundamentals of it and then I'm going to go back to the electric dreams demo that we saw earlier and I'll explain some of those Concepts I'm a level with you does anyone know that how to draw an ow meme if you don't that's fine you can look it up uh it's going to be a little bit of that situation where I'm showing the fundamentals we'll get like some nice trees and bushes and stuff like that going on um and then I'm going to show you do a little bit of a walkr on some of the graphs that are associated with the here's what happened when a bunch of senior Tech artists at epic games go wild with the system that I just showed you you know what I mean it's like the here's the intro to materials class and then you look at an advanced material and you're like oh no I've gone cross-eyed so hopefully I can kind of demystify them a bit and that'll help folks out um but let's let's go ahead and get some PCG up running so before I made PCG Forest it's just a simple graph uh to create this you need to make sure that the PCG plugin is enabled in your project it is turned off um for anyone that's new to Unreal CU I know some folks stuck from the intro session um be aware that we have a lot of features built in that are turned off by default that are like uh I'm a level with you some people get a little outraged when they they find out that they're they're not there by default sometimes they're like what do you mean I built this I'm like sorry should have turned it on um it is a good idea to kind of scroll through this just from in terms of uh you know if I click accessibility over here there's text to speech and Screen readers and stuff um well it wasn't that good man um but as well as that like Niagara Sim caching uh Niagara fluids for instance like this fluid Sims and stuff you can run ET Etc so just be aware there is a lot of these features that are off um and often they're off because they're beta or because they're only meant to be used in in certain situations um but PCG is a beta feature came in in um 5.2 so it's been kicking around since March um now I dragged that that volume into the world and we didn't see anything the reason we didn't is I need to open the graph now PCG is definitely one of those I wish I had two monitors while demoing this features that we've got um but that's okay uh I'll do my best to explain how this works so over here we have input and output output only matters because PCG graphs can be stuck inside of PCG graphs let's look at the input if I was to get this okay if I was to get this and I was to say hey when you begin um I want you to sample the surface okay what does that do well up top I'm going to click debug object and select the one that's in the world and then back in the world we're not going to see anything yet but if I look at this and hit d d is for debug we still don't see anything that was Tren sorry folks but we should have seen something well let's all go home suace sample seeds should be getting something out of you but we're not should be getting something out of you but we're not um sorry folks it's awkward because that is the most straightforward yeah gotcha sorry about that folks all right so what that was is I was awkwardly sampling the input rather than sampling the landscape that we were a part of um in my defense it's like six o'clock in my head and I've checked out for the day all right so how this works is this D is debug when it's off we don't see it when it's on we do see it um and every node when it's created gets given um a density level so this is all of the points that will be arbitrarily tested as hey this could be something for whatever it is that I'm about to build and like if I wanted to we can get these points and we can say to them hey I want to um I want to start just running operations on you for instance I could transform those points if I transform the points uh let's say I want to randomize the scale between one and two you can now see that we have a whole lot of those points kind of shuffled around some are small some are bigger I can do other things as well like I can get this transform points and I could randomly rotate them between 0 and 360 and now you can see they're all going to be kind of giving me something um I can go back to the sample as well and I can say well how many points per square per square meter do we want well I want fewer than that so let's try 0.01 and maybe that's actually a good starting point for our trees right um and if I was to grab this I can actually run this into a static mesh spawner and I can tell it that I want anything that runs into these points I can say hey I want to spawn a mes um if I remember right we have a bunch of really nice am trees back to the Shrek donkey situation that is a nice boulder good um seven looked good eight seems good at which point all of those is are now going to be there yeah that's not ideal for a few reasons um but you can see that just even getting those two trees and starting to kind of randomly shuffle them around um isn't the worst result I mean it's the worst result for anyone that's trying to use the path But like everyone else um and if we were to get this um well let's start let's start looking at other things we could do um I can filter at any point right so um I can grab information as it kind of comes in and I can change accordingly so um if I wanted to so before using D to preview these things I'm just going to disconnect that for a second before using D to preview these things um the other one that's really useful here is a which is attributes so attributes will actually show me all of the values of everything that is on that point does anyone notice any particularly strange values here that you may not have expected to be a a value it might be a little hard to see from this you any values that kind of Stand Out is a little bit strange the last two um it automatically grabs the landscape layer weights of everything beneath it you see that the advantage of that is if we know how much mud is there um we're actually able to kind of like filter that as a propriate um and I could I could work with that as I will as I wanted to as well like I could multiply the density which is the black to white value that we can see right now against the amount of grass there and then I could say hey if there's no grass um you know that way we have less chance of there being stuff in those edges so I can kind of grab some of those attributes and if I run a like a multiply for instance and I said hey I want to multiply density against Grass and output that back to density um i d on that notice that all of the pieces here that are that were on dirt are now black do you see that um and all of the parts that are on grass are still basically where they were in theory if something was kind of half grass it would lower the chance of there being something in those spots but in doing that um I'm now able to run a um a density filter for instance where I say hey I only really want anything that is you to you and that'll kind of clip them out from there so when we kind of clip them out from there and then I connect this back in um we've started to fix all of our Pathways and if I was to go look over here all right so we still have issues it's fine um but there's some other ways to do that so while I could look at that and subtract um while I could look at that and subtract um mud as a really obvious solution to that um what I might do is just show you another way to solve the same problem just so you can get a kind of a bit of an idea of another approach that you may need to take given certain situations so once auto save is complete all right so we have those static measures right but here's a fun one we have a spline sampler a spline sampler as the name implies samples a spline and it needs a spline to sample now a cool thing that we can do is you can call get spline data now get spline data by default looks at itself and uses that information okay but I can actually query every actor in the world and I can look for every actor with a certain tag on it so if you in the actor have literally just flagged remove PCG it will look for every actor in the world with a tag that says remove PCG or maybe you want to have a t a tag in your project that is called no trees and anytime you've got a spline that's outlined as long as that actor says no trees every PCG system that's been set up correctly will now recognize that no trees does that make sense to everyone so in this CL in this case I'm going to go something a bit simpler and I'm going to go um by class and I'm literally just going to look for every single Lake um a useful thing here is there's a select multiple checkbox so by default it's going to look for one like and then after that it's just going to Pace out it's done but if select multiple is checked um it will uh yeah it it it will grab so hit this on this I might uh disconnect these trees for just a second now still isn't quite working and that's my own fault right now see this box that's over here that was the PCG volume notice that when that volume is over the top of the spline we can see it doing something um and that's just because by default you should probably size your PCG volume up to be the size of whatever it's doing stuff on um but if you click unbounded that will then uh there no longer no longer Shackled by the the volume sizes but you can now see there's kind of growing those points over there these are actually all long points by default it's grabbing the average segment it's grabbing a segment length and just kind of stretching them along it um but I can do find all things on this bline or I can do on the interior if I do on the inter ior might be a little hard to see but see how there's that like white thing that's just like a that's just because it's purely filled it with um interior sample spacing of every one meter is a cube so it's just filled our spline with cubes okay now the cool part is is like I can get this and um I can project them onto the landscape for instance and if I go back here and I actually hit the debug key you can now see that those are being projected back onto the landscape you get me and again like with those being projected onto the landscape um I can start to do other things as well so I could run a difference node for instance um a difference node gets two things and allows me to Bull in them by the way Pro tip if you plug something in here by default it grabs everything plugged into it in Blueprint when you plug something else in it's like all right I'll swap my input over for that other thing same with the material editor but in PCG pressing that button um grabs everything that's coming into it because quite often you're actually like hey give me all of the points from here all of the points from here and all of the points from here so it kind of makes sense from a workflow perspective but You' just got to get used to that being thing anyway um if I get this as the source this as the differences and this as the um removal I'm then going to run a binary function on it what that should do is the distance function sorry the the the difference function this one here will go through and remove all of the dots that overlap so anytime there's overlap between these points and these points it will remove them okay um and again you've got over here you can see modeer diff metadata and you can choose so you can choose how you wanted to handle these things um but this is kind of a good way of of kind of elegantly handling that so we could have done the same thing before by generating spline points along the road for instance um and we could still do that right like we could still before where we got got rid of all of those points that had um you know we clipped from the filter um we could do the opposite and we could spawn stuff just on the road so that we have like random decals that look like road tracks or um we could start having things by the side of the road we randomly offset them left and right and try and place objects like debris along the side of the road signposts lanterns I don't know what kind of stuff we may be after um but I I I did want to kind of Step through that because like see that's that's like like I've been explaining to you what I'm doing as we've been working and we're still getting a reasonably good result pretty quickly with like everything kind of stacking on top right um even my ugly my ugly leg is looking more appealing than I thought it would so that's good and like we can go back and do other things as well like I can get the same body of lake that we had before and run a spline sampler on it and um on the spline but this time instead of subdivision I could do distance and make it a distance of every 100 units is good let's have a quick look at that uh oops remember that whole thing I told you about unbounded here we go uh you can now see that's like it's actually just creating a point Rim around the edges um so with like that in mind I could then do other stuff too right like I could do um by way I'm just kind of riffing on this right now so if there's stuff you going to see let me know but I could do another surface sampler that is um for reads because that sounded like a good idea before um and I could do this surface sampler as let's have a quick look at what that looks like I really should just make the thing the correct size but whatever um cool so these could all be reads if we wanted to them to be right so um I could actually get the distance between these points and these points and the distance here um I could save to uh set density here we go so check this so by getting the distance between them every point that I had created before is now looking to see how close it is to the nearest point in the other set of data um and by getting all of the points within the other set of data that tells me how close these trees are to the um the water line right so if I wanted to in this case I've gotten the distance between them um 10 m is probably huge so maybe I'll do 500 which gets me this kind of spacing here which is pretty good um what I might do is after we get that distance and we can see that that's pretty good um I probably want to do a remap where the 0 to one range is actually the flip so instead of being 0 to one I want to go one to zero um because what that does is that now says only these middle bits are going to be the ones that we care about does that make sense and once I've got them in I can run that filter again and we can filter by actual attributes I just the density ones are all kind of built in so they're pretty convenient to just use to be honest um and then I'll Transform all those points and like really what we're getting pretty quickly see now I've just got this nice Rim here where I'm like right cool so that's good um let's go between 0 360 Let's randomize the scale between 0.5 and 1.5 and now we're going to get all of these bits right and with those in play um let's spawn different static meshes I mentioned those reads before and now I really want to do it so there's some there are some reads in here those look kind of read all right terrible you're not read enough or I could just crank up the number of them maybe even you grass 14 I think that'll work when I have have too much of it so let's get you um and let's drop the size of you 6 t0 good cool get R the cube so now as you approach the water line you're going to start to get these little grasses kind of starting to grow around the edges there I actually think it' be better as well if these were um you can kind of move them inside of the sample I can't remember how to do it um but we could we could shift them slightly in if we chose to um I can't remember what the thing is but like again like that adds really quickly just a lot of character you know what I mean like as we approach the water line see we just start to get that nice Feeling Good Vibes um and that's that's kind of one of the big aspects here um yeah oh hang on wait Kaylin kayin [Music] kayn um I'll keep talking while waiting um but like one of the big aspects here that I really want to like I like stress is that this is also super reactive because if I if I like this and then I was like actually my Lake needs to be here it's going to make all of the trees now push out to that location you see what I mean like and if I pull it back again it's going to recalculate all of my trees and all of my everything else um and I did this in a very ugly quick way as well like there was no reason that um when I did this distance value before I did it as a very explicit five M kind of B binding but I could if I wanted to uh grab 10 m but then apply like a noise distribution to it so that we end up with like patches of reads that thin out and then get like fatter again you know what I mean like and that that even pushing that out to 10 meters means we start to get these reads kind of poking out of the waterline and stuff as well actually that looks really good I should have just kept my original number um but it adds a lot of character really quickly and I'm I'm I'm uh yeah uh that's why I kind of want to touch on that a little bit there yeah you had a question here we are start again um can you interact with materials with that sample data so like how you had the gradient from the water going out like white to black can you have it like the roughness so they look wetter oh yeah as they get away so if you wanted to do something like that I'd push it off to a runtime virtual texture and the rvt would then pass its data back to those things but you can actually feed data in as well um you can feed data into them as well I can't recall how to do it I think it's okay here it is yeah so when you get the static mesh spawner there's the instance data packet uh packet type and I think you can feed custom variables in there if you create a custom class that is like here's the type of info I need to pass through to this thing and then the hism passes it through I think you need to pass it through as primitive data but you can pass certain levels of information but for certain other things you probably want to access an rvt yeah no no stress um cool yeah so like I wanted to kind of like start stepping through this because um there's a few things that I want to really make a point of and the first is that I'm part of the problem here um just definitely part of the problem and that is this most people that saw PCG when we showed it off were uh I had quite a lot of people hit me up and be like um so that's epic games' New Forest generation tool and it checks out you know we made a forest uh you know and it looks good um but and then when I demoed it I was like Hey kids here's the forest and I did the same thing um but if you think about all of the secondary stuff that you can do with PCG because it I've added it as a volume here and generally when you add it as a volume it it acts upon everything within the volume if that makes sense unless you go through and check unbounded on everything um but you can also add it as a component so any actor in the world can have a PCG component that knows to like like spawn points across its surface or to spawn points beneath it okay so if you think about a log static mesh being able to just be like hey why don't you grow some mushrooms if those mushrooms are able to be grown on you randomly scattered batched between all of them if you think about every parked car randomly being like maybe I'm going to add little bits of oil that have dropped beneath random cars throughout the world um or maybe every single tree that you place into the world runs a PCG script that actually just drops branches on the ground beneath them and spreads leaves and puts down emitters as appropriate for the kind of trees that are there so the thing I'm trying to get out here is like the reason that I think PCG is very likely to end up in a whole lot of projects is there's the doing the art part and then there is the the secondary layer just just just adding that finer detail that is honestly usually just the busy work right you know it's the painting in all of this manual stuff it's like if you have roads you you go through and you do it and you you have a good artist who's laid out these roads and the scene looks kind of good then you have a great artist who's gone through and manually placed all the little bits of grass that are growing out of the pavement here and there and like you know what I mean like that work is frustrating when a when a a person comes up to you and says hey actually we need to move the road and then you think about all of your manually placed grasps in the road and you're like okay it's going to take a month you know like so being able to have like systems that you can set up and build and automate that handle all the second details is really interesting to me the next part is that when you look at a lot of these graphs um PCG can be put inside of PCG so any value that you plug into the output I could create custom outputs that would say the word trees and I can then get another PCG graph and put that inside of it and access all of the trees that were output from one graph so I can execute the graph find all the trees and if I wanted to I could do bushes and I could change the size of the bushes based on their distance to the trees because I'm like hey you were living in Shadow so you shouldn't have grown as much you know what I mean like and customizing all of that kind of stuff um how are we going for time let me just check I've done the same thing every time 4:15 uh 4:15 right now yeah yeah yeah and we finish off at 5 is that right I think I have some time for that yeah okay I could I could probably do that um no it's better if I do the other stuff uh so yeah like I said so we can kind of go through and I could add I could custom spawn bushes spawning bushes to to change on size is literally add a sampler get the distance of the tree sampler to the other one run an encroachment check so remember the difference node that we used which removes anything that's overlapping because we just want to obliterate any bushes that are currently inside of trees I assume um and then after we've done that uh we can just get the distance node find out how close you are to the nearest tree and then we we we scale you up or scale scale you down accordingly right so like having that kind of logic and getting those things up is great but what's very cool is when we look at these nodes do I have one in here I think you are you are not um give me one moment I think density to yeah you are so here's a cool part these nodes can be written in C++ or they can be written in Blueprint okay so the reason that's really useful is it's very EAS I think I fully expect teams to start writing libraries of nodes that work for them and their projects and their systems and then just carrying them forward between those projects and I think that's really exciting prospect right because you're going to start getting little techniques he's my Forest generator uh he's the next version of that here's the he's the next version that scatters these kind of things etc etc and you kind of end up with that snowballing effect between projects but like as I said I just don't want people to think about PCG as Forest generators I really I really want to hit that quite hard because if you think about it as Forest generation I think you're going to miss a lot of the better positions you could use it I mean even even right down to if I was making a if I was making a game set in an office or a school or something I can easily run PCG now as a component that scatters clutter across all of the desks and I can scatter clutter across all of the desks based on maybe I'm put some actors in the world that says something like the quality of the classroom the desks can all look for the quality of that specific classroom and then have or they could look at the classroom type you know and say hey oh it's it's if this table ever gets put into an art room all of the stuff that gets scattered on top is the art supplies but if this table is ever put into one of the English teaching rooms or something then it's going to be a bunch of dictionaries I don't know but my point is is like we can kind of like customize like we can flick between these things and you can build tools that are appropriate to your projects and I think that's really exciting too cuz it's more than that as well like I can comfortably scatter I can grab uh every table for instance and randomly place um randomly Place chairs around them to kind of build a Vibe etc etc uh wait wait wait thank you keeping you on your toes um I was wondering like can you plug in other types of things apart from Graphics like sound and interaction so at the moment there's a few there's a few outside of static mesh spawner I think you can get standard blueprint spawner and a few others um but again you can kind of build those as well so like the the the stuff that you wanted to create you can kind of go through and build them as necessary but I think this will just get more and more substantial in the future like you will get your decal supports and niagar system supports and things like that I can't remember which ones are there right now out of the box unfortunately um but I know you can spawn generic blueprints so you should be able to accordingly then spawn any of the other things from there um yeah the yeah the other thing that I wanted to tap on here is um at the moment it it pushes out your results it caches it but you can also run it at runtime so the runtime part's really exciting because you can do things like I can run this forest and when someone walks into a log cabin in the woods um you can actually just rerun it while they're in the cabin and you saw you see how quickly it's running normally right like it's pretty quick um so you can rerun it and then they come out and the forest is different they're like What's Up um but you could change the entire biome as well right so I could rerun it in a grand scale or I could rerun it on a minor scale to just be a little bit unsettling um yeah so as I said that's the kind of stuff that I'm pretty I'm pretty excited for and for anyone that caught the the draw spline tool stuff that we had earlier today in the intro session um all it takes to get PCG to have an autofill biome kind of a setup is um you create a blueprint you give it a PCG component that has something that fills its own spline which is two nodes um and then with the draw spline tool you're then able to just kind of draw whatever you want and it'll just create easy patch of flower or easy crop of trees or whatever else you know um and then you can kind of shift it around as required so yeah uh hello um so as we all know Bethesda just released Starfield and I was just thinking in terms of unreal and its PCG systems for things like Starfield no man's Sky procedural kind of Worlds and like generation of that kind of content how per performant is this and how expensive is this solution in that kind of scale yeah sure so from a procedural perspective it's pretty good um because ultimately all that's doing is creating an actor at the moment that is um instances so there's the overhead of that existing is essentially the same as me having painted them in with aage tool okay so it's it's pretty good on that front um um in the case of what you're discussing though which is hey as I approach a planet I want to start generating trees and such around it I I know you can explicitly call PCG to say hey rerun um I can't recall if you can run it um from the perspective of like as I'm approaching the next quadrant start to generate ahead of me or not um so I'd need to check that but extending it to do that off the top of my head doesn't sound like the worst thing in the world either so um yeah but that said their systems with what they've done for those kind of projects involves a lot more than just the scattering of the forests and things like that so I'm not trying to make it sound like it's an easy task to have the full Planet generation I am not I'm not so naive um but I did want to uh yeah getting the getting the the the raw parts of that up and running I think wouldn't be a super difficult hurtle um cool the next thing I want to show you is I want to open up uh electric dreams again and kind of give you an idea of what some of the systems are that are that are working within that gross leg H video games all right shut this down and I'll switch over to here Library Cat test it's actually ended up being a really nice thumbnail C that out and pretty chuffed at how that looks all right so this is uh the electric dreams sample this is able to be launched by clicking the samples button um and grabbing it from here okay so this isn't like some fancy thing that we've hidden away from everyone um also for the record the hillside sample is pretty good and a lot of people skipped over it cuz it's a arviz sample but there's some really cool stuff in that including like a dynamic weather system um and the metahuman um no not the metahuman the the traffic simulation from The Matrix awakens demo and the city sample is also in there and it's one quarter the size of the city sample so maybe that appeals to you if you wanted to just check out the cars and didn't want to download a 200 gig sample um cool so we open this up within um within electric dreams um you've got a whole bunch of different layers okay a whole bunch of different levels and each level uh has been set up as such I'll show you the big thing again and then we'll step back once it finishes loading sorry folks opened the wrong level before I guess to properly demo this all right here we go uh that'll teach me I opened up the other level before but this should be pretty quick it's fine side note unreal didn't used to have uh the loading bars on this as it was async as of a couple of years ago so every time this does happen even though I'm annoyed that it's building something I'm happy that it's building while I can still poke at things in the editor instead of being locked out great so this is um this is the the demo that we originally had um one thing I want to flag is with how this is set up we actually have an arst driven area and then we have a procedural generated area um I think it was inside of a data layer well petition all right [Music] so no it wasn't inside of a DAT layer that's okay um how this works is you've got these areas I'm going to hide the forest so we can kind of see what's going on so the custom area that was kind of made by the artists you can see over here so this was the kind of more meticulously done hand place elements and then if I turn the forest generation on then we eventually start to get through to these other areas that have been all been handled by PCG now a lot of the time um if you're like well how do you how did how are these kind of things handled how do you build stuff like that there if you go to open level within electric dreams and you go PCG break down levels you can open up any of these ones um I'm going to grab the spline example is pretty good so I'll start with you so how it works is before what I was scattering was meshes right however what we're scattering this time arounds isn't actually meshes see this here this is actually an entire level so in unreal we have level instances if I hit contr e will go into level instance mode and this opens the level inside of my level and allows me to do whatever I need to in the context but when I hit save that gets saved as a level you're all with me still and what happens is inside of these actors this can now all be hand placed so the artists can kind of like really sculpt this and make this look however they want to um but if I look at the tags on each of these actors um where's a good example oh should have been seeing tags maybe these ones weren't tagged appropriately surely you were there we go they have a whole bunch of like a lot of them have things like keep vertical so remember before I mentioned we can get all actors with certain tags and things like that same thing here is basically what happens is inside of PCG we can analyze a level the level gets saved off as a data structure PCG can then look at that and we've put in a bunch of instructions to say if something says keep vertical even if the level has it pointing here and you've made the level face this way make the tree Still Point back upwards again um a lot of the foliage things have tags on them to say hey I'm allowed to be rotated at any 360 so basically even though this looks like it's a consistent thing these trees can also all be randomized as to whether the trees exist or don't exist certain rocks can be flagged as I'm happy to get rid of this rock or I'm not happy to get rid of this rock do you know what I mean so like you can set up a bunch of rule sets that are appropriate to your project um and then over here it means that when we get something as simple as the same kind of spline tool that we made in the first session today um PCG just runs its algo over the top and it it just it makes this one level instance over and over and over again while randomizing certain elements of it and I don't know about you but to me that does not feel like it's tiling you know like that that that there's enough variance from doing it that way that you can end up with a pretty good result and if we look at some of the other PCG breakouts so if I was to look at um the ditch is a good one in this situation it's the same kind of thing except they built a bunch of different ditches so we're able to kind of like randomize between these ones and see what we want and in doing so when we get this blind and like I pull that to here it's actually just kind of going to give me some really vastly different results but it can still be kind of shuffled around and made to look still very odest driven you know what I mean like that's a lot of people think of this kind of set and they think to themselves I guess we would need the ability to grow Vines and we would need the you know I mean like they actually overestimate the scope of the problem because ultimately the problem is actually let's get some things that are pretty close to the types of stuff that we want and then flag variation within that and courtesy of nature in some random rotations we get some pretty good results as to what actually like holds up um in these situations so it's it's worth kind of going into these and if if we look at the um if we look at the PCG component that's on it PCG demo ditch um there's more going on than the graphs that I made before but honestly it's actually not that much more than the graphs that I made before you know like for the for the scope of the problem that it's solving um and keeping in mind that this is now something that you could theoretically have uh no not even theoretically it's do I have do I have do I have internet here yeah I have internet here all right so like an example is um dungeon Architects recently did a um uh PCG implementation which was they got their standard PC uh they got their standard level Builder that they already had and they ran PCG on the edges of the splines so this was just using our data set that we had set up with quickel assets it's going to happen um K the music uh and instead of it generating the rooms like it normally would it's just it's just generating the shape of those areas with splines um and you can see that whenever they change the spline here it's kind of carving out the forest again it's cutting through it and uh like to me that holds up really well as a procedural environment like as something that has like procedural um As a Dungeon despite not actually being a dungeon it be very easy to add blocking volumes around the edges of that procedurally and make sure the player couldn't escape the space but they tied our system into their system because all they had to do was get spline data from their system and output the rule sets that they wanted that would be appropriate um which I think pretty exciting uh and if I go back to the the ditch here the the last thing that I will flag is where is it this runs through copy points with hierarchy so a lot of what's doing the heavy lifting inside of these systems here is each of those levels gets added to a um a graph node here that is itself um we've set up our own custom script that whenever we right click on them you can go scripted action convert level to PCG settings and ideally in the future this is going to be a thing that we have nicer approach for but this generates a PCG settings asset that we've created that says here are all the meshes inside of that level with the key tags on all of them that is like a quick lookup mode that we've set so we have built a tiny layer on top of it but it's also a tiny layer that we've exposed to the public and you can see how we've done it and built it in this way and hopefully um appropriate to your own projects yeah like I said I kind of wanted to go from what I had done give you a good feel for how the system works and then show you what the advanced advanced versions of and honestly it's not that much more um and it has been very well um it has been very well commented throughout so you can get a pretty good idea of what's going on um how do we rotate certain actors that have certain tags um etc etc how are those things kind of sorted so in this case you can say hey we're looking at this we're looking at the uh the parent rotation value we're checking this if this is equal to one then rotate them if not don't rotate them you know like we're just running simple filters splitting the points out doing operations and then combining them back in again to each other each time um yeah groovy uh questions yeah there's Caitlyn with the mic oh Dean with the mic everyone okay test test thank you um so yeah I was just wondering so if I was to say I wanted to merge a portion of um this PCG into another project is there a quick way to export something like this out or like a portion of it out and put it into my own project is that kind of just migrating or is that it it be migrating you just need to the consequences of what Mig grading is in this in this case which is this is a pretty big project um with and it Cooks down well I guess but uh there's a lot of like 40 there's a lot of 4K textures and million poly meshes getting thrown into your project so as long as you're willing to live with the consequences of migrating this into it then uh it wouldn't be the whole thing it would just be like a portion like a like a small yeah so I think the blueprints referenc the PCG and the PCG references the levels so I think you would get all of the assets but it may not include the raw level instances gotcha that's the part that I'm not 100% sure on cool yeah um is there any way PCG could negatively impact your game something that we should maybe be aware of or that's a great question um so I think the main thing that I will flag is at the moment in PC G there's no Elegance system to grab this one tree that it's generated and shift it so in those kind of situations uh at the moment you could create a dummy actor that is a tag that is a remove PCG actor with a radius value on it or something that allows you to not spawn any PCG within those areas and you need to just be aware that you're going to Art direct those kinds of things um I think in the future we're looking for a way to break out specific things and not spawn stuff at locations but I don't know how far in the future that solution is so I guess the biggest negative impact is really just is is largely in my head going to be from art Direction being this is a good way to do sweeping art Direction but if your Forest needs to have a bunch of very carefully placed trees for very specific reasons you're going to need to drop stuff in there to remove it to then handle it yourself in custom ways at those locations do you know what I mean so this is this is really good if you have like a 64 kilometer map or something and you're like I need my forest and everything else to feel like a real lived in experience with a whole lot of stuff there um but if you you know whenever you get areas that need custom customization you're going to need a way to dial it back and your artists need to be prepar for the consequences of uh so in a weird way it can do really high density generation quite well right but if you're saying hey don't generate PCG in these areas your artists now need need to basically have just as high density custom areas done so that it doesn't feel mismatched from the rest of your world do you get what I mean like uh which is an awkward problem to have because you're like all right you need to match the machine um but yeah and you can break it out at the moment um if you get one of these if you get the PCG component on a standard scene you can break it I think it's all the way down the bottom um clear PCG link that will remove it and just keep the instant static meshes and I think you can then export them so there might be nice-ish ways to do it but it still is yeah it is still potentially fiddly in certain situations and it's it's you know it's that kind of stuff I think that is why it's also still in beta um but outside of that um if you're running it statically like this it has the same overhead of the same um of these meshes just being placed in the world as instances anyway so like functionally it's it's the same as me painting in foliage really um I guess another issue that's a weird one sorry it's actually a good question that no one's actually asked before uh not sorry no one's asked me before um I guess oh um I guess functionally the other thing is that it's very easy to add additional layers this way so you also need to kind of check yourself before you technically wreck yourself I think is but no you need to actually like it's very easy to accidentally add way too much going on there because it's very easy to like I'll add more layers I'll add more layers I'll add more layers and Nite handles that really well but if you're targeting certain non-n platforms and things like that you're going to need to again deal with that um I think PCG currently doesn't have branching per platform but I I believe that's on the road map as well for like hey on mobile don't run this chain of of meshes to spawn that kind of stuff um but I'm not sure if that's a 5.4 thing or not um you'd think I'd know I've been talking to that team a lot lately but I don't sorry um yeah right um number save so that it's deterministic is the system deterministic and if it is how do you make it less deterministic good question um so you can pull the seed from the um you can pull the seed from here um so there's one Global seed and then within that Global seed you can also whenever you have a sample you can also override those seeds one of these things is the seed um you can also override those seeds as well so I can either override them on the sampler or you can override them actually spline is the one that won't do it let me find a nons spline sample he says zooming in on another spline sample uh actually this is all going to be very spline based I don't think we do a landscape sample in here the ditch wood uh no not the ditch the the large assembly this one oh no not that one either you can micro I just I just can't find the thing to do it sorry maybe it's the one that has the larger ground that gets swapped out would would probably do it yeah this one yeah sweet um because this ground which is the ground round demo when it gets swapped out it won't have spine samples he said seeing the most spine samples we've seen so far I thought we were doing a ground sample as well all right well probably not all right that's fine uh yeah seed so for anything that does have kind of chaos there you could read that from a separate variable on a per asset basis um yeah ah the forest of course the bloody Forest Wood sorry I forgot that there was an entire Forest actor in here that would do it yeah the other sort of not really related question just more on the whole system I'm getting the impression that that so it's leveraging like nanite for culling stuff because it's not doing any kind of coloring or visibility checks in in real time and whatnot okay cool yeah so if you're not using that you have to be really really careful um yeah I mean otherwise you're culling like you would have in the olden days I think you you hold coling systems um but yeah Nan's very good at working out what not to draw so because of that we can kind of go nuts and be like hey kids here's a forest um and it's pretty good at removing uh the the aspects in between um yeah yeah but that said like uh PC Playstation Xbox are all pretty friendly for nanite at this point your phone on the other hand you're going to need to be a little bit more careful on um unfortunately yeah sorry yeah if anyone wants to get uh you know what every time I call out phones at the same same time I'm like yeah they're just not there yet and then someone's like there phones are often like one generation of console behind which is terrifying so at the same time the other thing that I you know I'll point out is like for the larer projects um you know you start a game today it's probably shipping in 2025 if you're lucky uh which means yeah even on the PC front where I talk about hardare um like a 30 series graphics card or even a 20 series graphics card 20 series graphics card is now what 20 is it 18 I think they were right so 20 series graphics card is now five years old six years old start a game now and that thing which is the pretty good specs for a dx12 is now going to be shipping when it's 8 years old which is over a console generation I guess uh I'm having an existential crisis in front of you all uh anyway video games um any any any other questions okay oh thank you um say if you were to have a massive longdistance environment and you want to do be able to see for example a field that starts from your feet and goes all the way to the mountains Y and yet it still looks realistic how would you be able to do that and keep your performance yeah sure so um at the moment what you're seeing in front of us is um there we go give me the good stuff all right so this world um is let me check what what you are we're going to get there one day yeah good all right so uh 4 kilm at the moment it's 4X 4 km um now the if you wanted it to be performant you would leverage um if you wanted to be performant you would leverage well partition so well partition is a system that's built into UI um sorry I'm just thinking of what projects I've got that have World partition that are on my laptop with like a good setup to demonstrate it I think if the the city sample's on here I can open that but I think the city sample is not on here cat test doesn't have it before you say it um could feel it I knew it was coming um no so none of the none of the project on my laptop have it unfortunately uh all right so we have a system called wall partition World partition you generate whatever you need to and you build whatever you need to World partition then goes and creates proxy LS so whenever you're not within X kilometers it falls back on a simplified mesh that you've pregenerated um pregenerated meshes don't need to necessarily be an actual mesh that you've generated they can also be instances of meshes so it says hey grab this mesh and Sample it a bunch of times at its lowest l at a distance then as we approach it fade between the the the proxy version and the real version that you've got um if you wanted to handle a really large world with really dense stuff you'd probably be leaning on this system combined with hlods for for your really far off stuff and as you approached it it would fall back into the the PCG stuff that you've generated oh yeah yeah yeah just assume yes for can you use for that for sorry should you use nanite for that on all cases uh like at this point anytime you at this point anytime you can use nanite you should basically is the the the rule of thumb it's very easy rule um like the the only things that are unsupported with nanite right now are transparencies and skeletal meshes 5.3 added spline mesh support in a very early experimental phase but I think that'll get into a good spot shouldn't have said that on camera um um but I think that'll get into a good spot and I you know really hope it does um yeah so like it there there's really only a couple of outliers at this point and um yeah it's just really really grossly quick at rendering so wherever possible it's good uh uh yeah is the H LS automatically generated in the world partition system uh automatically in the sense that you need to click build build H LS um this button here this map doesn't have uh have them set up um if you ever use the default new level open world one that does have an HL streaming setup setup um a weird way that's actually reasonably good at learning how hls work is actually ufn because the a lot of those worlds have World partitions set up to automatically build huge fortnite maps and you can open them up and then just click yeah you'll see how that stuff works um but World partition automatically generates H LS for the partition sections and then assigns them and micromanages them behind the scenes without you having to like remember they exist um except for the times that you click build the other really good part of world partition handling H LS is it does them as um Deltas so if you build if you have a huge world and you mess with just this tiny quadrant over here and it's being broken into a whole bunch of hls it'll only when you click build hls it won't rebuild the whole world it'll just rebuild this busted section over here um which is really really handy that said my general advice for hls is um uh unreal's got a lot of commandlet support I'm not sure if any teams here have set up any of that kind of stuff for like like a Jenkins setup or something but um hls are a really easy thing to hook in so that every evening your your build server will grab the latest version of the map build H LS and prep that for artists the next day just so that it's all in a a nice happy space for for people um like ideally you don't want that to be anyone's computer dealing with it because it takes a couple of minutes to build um and time better spent working like a big part of like ui5 was us being like hey most of our systems are dynamic now like you know the global illumination and stuff so we're trying to remove baking and things like that and PCG is super quick for instance but the the big outlier to that is still hls require a a coffee break so yeah yeah um yeah all right I think we're good oh sorry questions I didn't see any hands anymore Caitlyn do we have something from online nothing online nothing online okay that's fine all right well look in that case um thank you all very much for your time it's been really great having everyone here uh I just want to reiterate one last point that Caitlyn uh kindly brought up before which is um if you were at the mixer uh it' be great uh to make sure that your name was was noted either with Caitlyn or um that you did RSVP to that originally just because we'd really love to get a Meetup Group established within the region where there's a few benefits to that obviously it builds a local community it gives me a little bit more weight to say hey look there's a lot of UI devs out in Perth um and I can then sneakily work that into various schedules like if I'm coming back from Malaysia or Singapore or something you're on the way um you know and it gives it gives us a good Avenue to have more content kind of come out this this way and supporting devs uh more because you know at the moment it's it's like it's it's I mean Co ruined my Cadence but before that I was probably coming out once maybe twice a year um and I would I would like to maintain something like that but it's a lot easier to do that when there are devs on the ground who are who are already also kind of doing that stuff that we can kind of like liaz with and work with and it's easy for me to know that a lot of people are going to rock up to a session that we're running on something cool so uh yeah if you if you want to reach out on that front it' be great um and hopefully we can get something created within the next couple of weeks for people to start getting on board with otherwise um thank you all very much for time thanks for having me I hope this has been good and uh looking forward to to seeing some of your games on Saturday at the uh the exhibition right thank you for making it all the way out to Perth and for epic sending Chris it was great that was amazing um like Chris just said uh if everyone's cool with it maybe reach out if you're not otherwise I'll assume you are I'll grab your email addresses from the talks tickets and add you to that and then then I've got everyone if you randomly rocked up that's fine cuz numbers are great and we love them and just let me know and I'll add your email wonderful um cool that's a that's a wrap on our third day of the talk series there's one more day left um it's a jam-packed day tomorrow I think the majority of the speakers tomorrow are actually flying in like now uh and tomorrow morning so we've got lots of special guests it's lovely um and tonight is the Perth Game Dev meet up at ruin bar in Northbridge so might see you there as well oh cool yeah you coming I guess so thanks everyone have a good evening [Applause] goodbye in 2291 in an attempt to control violence among deep space miners the new Earth government legalized no fighting the Andre mining Corporation working with the ne established a series of leagues and bloody public exhibition
Info
Channel: WA Games Week
Views: 42,955
Rating: undefined out of 5
Keywords:
Id: gJKGMFcg29c
Channel Id: undefined
Length: 142min 13sec (8533 seconds)
Published: Sun Nov 12 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.