Let's Build the RPG! - 56 – Landscape Cave Sculpting and Lighting – Unreal Engine 5 Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this episode we're sculpting a cave environment directly into our landscape and we're also doing a lot with lighting this episode including God rays and last but not least making it possible that our AI characters can follow us into the cave [Music] hey guys welcome to today's episode and in this series we've covered a lot of stuff in regard to outdoor spaces stuff like landscape sculpting foliage painting environmental sound stuff like that but we haven't yet covered the equivalent for indoor spaces so today we're integrating a cave into our landscape all part of a single level first thing we're going to do is we're going to set up our landscape materials such that you can cut a hole in your landscape anywhere you like and then I'll show you a really simple trick for creating cave ceilings that quite frankly should be everywhere but I haven't seen it and then we'll sculpt out the rest of the Cave the floors the walls the entries the exits and the entries and the exits are typically the most difficult because you want them merged perfectly with your landscape but then after that we'll start getting into the basics of indoor lighting and I know I keep saying this in regards to all sorts of things but I am the furthest thing from a lighting expert just like so many other things in the series I am figuring this out as I go along but I'm still going to show you all the different lighting settings and what I found to be most useful and I put the word crepuscular into this slide to make it sound like I know what I'm talking about but over the next few episodes my vision is that we're going to develop this cave quite a bit so today we're starting with the basics but we're going to get into for example Niagara fluids like we're going to have a standing pool of water and then have water drip into that and my goal with that water is to make it completely interactable like make it slosh and splash around and then after that we'll get into indoor Acoustics like indoor sound and then after that once we're in a good spot with our indoor environment back into AI so here are the key Concepts today the first two are all about how to integrate an indoor space with your landscape and the final three are all about the basics of lighting and luckily ue5 does a great job at making it really easy to get decent looking lighting not going to be an A plus but at least a B plus so you'll have that by the end of the episode let's get to it so just like as is typical for this series guys I've got a link in the description below to the spreadsheet of all the free assets that we're using as part of this series you could just copy and paste the codes from the spreadsheet directly into qixel Bridge you'll find it just download it at nanite quality and all I did is I sorted my assets under the Earth quadrant that we started I think it was back in episode nine and if you're following along with the series there are really only four new static mesh assets to this series and I put them all under the Earth quadrant this massive Tundra folder these right here but for all the assets that we use this episode there's just a couple of settings you need to set so let me go into the static mesh first so these we're going to use for our floors and so because of that they need Collision so if you search for Collision we just need to set Collision complexity to use complex Collision as simple and that way we actually use the geometry as it's shaped on the ground and then the other setting if I go back to that if you go into the material so if you scroll down in the details panel we need to assign each material a physical material of stone and we created this back in episode 19 with our footstep effects so if you've got all the assets set up that we're going to use for the cave then onto our landscape material so for that I'll select our landscape and we got to set up our landscape material to be able to have a hole or multiple holes cut into it so I'll go into that and I'll go into the parent material here that we created last episode so we need to use a brand new node called a landscape visibility mask node but the problem is we we can't hook it up in our present State because we're using material attributes so what I'm going to do is I'm going to uncheck use material attributes but the problem is that breaks the connection that breaks our whole material so what I have to do is from what we set up last episode I'll just zoom out so this is all the stuff that we set up from this here we need to drag out a pin and we need a break material attributes and we need to hook up everything to our actual material base color to base color specular to specular roughness to roughness normal to normal and ambient occlusion to ambient occlusion now that landscape visibility mask node we have to hook it up to our opacity mask here but the problem is it's grayed out and the reason is we have to change our material instead of a blend mode of opaque we need to change it to masked and once we do that our opacity mask node is available we can drag out a pin and we can search for landscape visibility mask and what this allows us to do is to then paint holes into our landscape so let's apply this we'll save our landscape material and we are good here we can close out of both these materials alright so now we get to decide where on our landscape we're going to have our cave and what I'm going to do is I'm going to have two main entrances and exits into and out of our cave so one's going to be right here kind of at the base of the beach closest to the mountain and the other one I'm going to have on the other side maybe about right gotta find a low place maybe about right here but I'm also going to have a couple of holes up top because I kind of want to have light shafts of light like kind of beaming into the cave I want the cave to be relatively naturally lit so the way we're going to paint a hole from our landscape is we got to go into landscape mode and then within sculpt we have an option for visibility and I don't want to brush size of 3000 let me bring that down maybe to 100 and then wherever you want the hole you just left click paint and actually I don't want it going into the beach like that so I'm just going to control Z undo and do it up top and there we go and you want it to be large enough that your character could actually fall into the hole or get into the hole when we have a cave alright so then I'm going to find my next lowest position on the other side for our way out of the cave how about right about here something like that that looks pretty good and when I was experimenting with this my initial Instinct was of course to decorate around the entrances into the cave that we just made but I found an alternative workflow that I think works much more efficiently for making caves so let's do that so we're actually going to do the ceiling first and this trick hit me like an epiphany because originally I did the floor I did the walls I did the entrances and exits and I was like ah the ceiling this is going to be a pain in the butt but then I had this idea this crazy idea and it worked out really well and I realized it would have been way faster to do the ceiling first so that's what we're going to do so first navigate back over to selection mode and we're going to use the same assets that we started in episode 9 of this series so if you're following along you should have all of these if not you're going to have to download them from the spreadsheet and you can find these under Mega scans and then into 3D assets into the Earth quadrant under our main palette here and what we're going to do is all of the three-dimensional rocks meaning all the rocks that have surfaces on all three dimensions we're going to use those as our ceiling and that's our earth rock one three four five six and seven now if you don't have foliage assets already created for these you're going to need to create foliage assets for them but even if you do have foliage assets like I do here from episode nine I'm still going to do duplicate all of these foliage assets so right click duplicate and the reason for this is only going to become apparent in our Following episode but it'll make sense then so I'm just going to rename each of these so it's going to be earthrock 5 cave ceiling and same thing with all the rests so earth rock one cave ceiling so if you've got all that rocks one three four five six and seven then what we're going to do is into foliage mode go back to our content drawer we'll take all of those drag them into our palette so now we set our brush size to how about four thousand paint density will keep 0.5 make sure you've got these three checked landscape static meshes bsp I think we only actually need landscape checked but check all three just to be safe and so now I'm going to go ahead and select all of these so select check and we're going to keep the same settings that we set up in episode nine we're just going to change a few things so density we're going to move this down to 10. the Align Max angle here I'm going to set this to 30 degrees in the ground slope angle we want these to be painted even if the mountain is very steep so I'm going to crank this up to 90. now here's the magic and here's the Epiphany that came to me so I thought to myself what if we just changed the Z offset so instead of being slightly embedded into the ground the rocks are actually under the ground so basically what we're doing is we're setting the cave ceiling to be directly underneath the surface of the landscape so I'm going to set the Z offset minimum to negative 200 Max to negative 200 and this way they're at an even level directly underneath our landscape and the other reason that this works so well is that all these rocks based on what we set up in episode nine they're all scaled to be roughly around the same size but then again if the sizing is a little bit off it just means that the rock is going to be sticking out of the landscape and maybe that's not a bad thing entirely up to you and so now I'm just going to zoom out a little and we are ready to paint our ceiling of our cave and I'm just going to do it over the entire Mountain area and if I come down so right about here you see so it's completely covering the underbelly of our landscape and so if I go under that that's going to be our ceiling and we see there we actually have some holes that well I didn't paint so thoroughly so I'm just going to come out the other side paint a little bit more thoroughly there and you can always crank up the density as well if you like so now on to our cave floors so for that I'm going to get out of foliage mode we'll go back to selection and this is where we're going to use the tundra formations that I mentioned earlier so back in our Earth quadrant I put those under massive 10 here these four and let's go into the first one here and I'll just pull this directly into the level because what I want to do for this actually let me rotate it a little bit so w and E are my two favorite keyboard shortcuts here so e switches over to rotation mode and then W switches over to being able to transform it so you'll notice with these rock formations that it has this part that's kind of directly next to a cliff here and so I was thinking this would be a nice walkway so the cliff would actually serve as kind of a wall going into the cave and then this would be a walkway going into the cave and then it opens up to kind of a giant cave in the middle so what I'm going to do is I'm going to position this accordingly so I'm just going to change the rotation a little bit move it into position and set it up on the beach side here and you want to set it to be low enough such that it gets under the roof but we're going to clean up the entries obviously and then what I'm going to do is Ctrl C Ctrl V to paste e to rotate and we're going to rotate it 180 degrees around and move that over into position you want it to basically blend in with the other one yeah so if you've got a walkway that looks very similar to this what I'll probably do is move it up slightly and if you're not getting your viewport here Auto adjusting the brightness when you go underneath the cave then just make sure you have a post-process volume here that's probably your issue all right so if you got all this if that's looking good then we just got to populate the rest of our cave so our other exit out let me just see if that lines up yeah so it's all the way over here so what I might do let's go back over to foliage mode make sure to select everything go to erase and let's change the brush size down to maybe like 200 now and if I zoom out a little bit then I should be able to actually I think I got to make it a little bit larger so that it encompasses the underground space maybe about 800 come up here a little bit yep there we go and let's do the same thing on the other side but instead of using our first one here let's use our last one so drag this in gotta move over to selection mode and you want it roughly pointed to the other entrance exit wherever that is so something like that should do move it over a little bit blend it in and then we'll do the same thing where we'll copy it and we'll flip it and move it over you want it so that at first glance you cannot tell where one starts and the other ends all right so now we just got to finish out the interior of our cave here which shouldn't be all that difficult because it's really just the middle so for that now I'm going to pull in my other two massive Tundra rock formations and for this just use your best judgment you know whatever you think is appropriate so I'm just going to move this over sculpt this out and one thing to watch out for is you might get some of these where they stick out and it's only got one side so you could either sculpt your landscape around that or we're just going to reposition this slightly shouldn't need to reposition it much just tilt it slightly in One Direction or another and that should solve it now if you get something like this here so that is so closely aligned with our landscape that what I'm just going to do is raise up our landscape slightly move this to a brush size 500 and raise it up raise it up [Music] and if you get any sudden drop-offs here like I do here like I want this part of the cave to actually be pretty deep because next episode we're going to do Niagara fluids and I want a pool of standing water at the bottom of our cave so what I'm going to do is I'm going to take our Cliff here and move it directly up against that kind of jarring Edge there and then we can duplicate it again rotate it move it over here foreign [Music] and I should also add you could change the scale of these so I'm going to make this one 1.2 1.2 1.2 what do you think pretty solid cave so I think we're ready to test this so to test this I'm just going to right click and say play from here all the way on the edge of the landscape and when you do that before you jump in just make sure you've got Collision set up for all these meshes and away we go and here's our cave and because I set up the physical material on each of these meshes or actually I set up the physical material on each of the materials of the meshes then it's like I'm stepping on Stone because of our footsteps we set up in episode 19. the one other thing to make sure or try to do is and you could test this by getting a plane into your level is we want something basically in the middle of the cave a very low area and that's where the water is going to be next episode so I'm going to make this let's do a scale of 30 30 and one totally fine lower it down down down and if you got an area like that like an area that's perfect for a little pool of water right like that that's totally fine so now it's time to do our entrances and exits and I'm going to start with the one that's at beach level here and the very first thing is you'll notice I've got some rocks that are kind of cluttering up where I want the entrance to be so what I'm going to do is in a foliage mode make sure to select all of them check and then go to erase and set your brush size to be a little bit larger than a hole I guess 800 is fine here and then back over to selection mode because for the entrances and exits I'm just going to use static meshes now back in episode 14 we had an asset that was titled Mossy Chapel Arch so the Beachside entrance to this cave I'm going to have be man-made with this particular asset and on the other side it's going to be more of a natural entrance so I'm going to drag in this static mesh and I'm just going to scale it up quite a bit so it's going to be 1.5 1.5 and 1.5 rotate it accordingly and actually move it in a little bit further than the edge of the landscape and you'll see why and actually I'm going to scale it up even further so it's going to be two by two and keep the height 1.5 or maybe like 1.6 just a little bit higher and because this is raised where I have it here I'm actually going to bring it in a little bit further yeah something like right about there and then also from that same episode episode 14 we're going to use our stairs we use these Castle stairs for our Roman Courtyard so I'll drag that in and again rotate it to be in position don't worry about the coloring at this stage we're going to fix that and again I'm going to make this slightly larger 1.2 1.2 1.2 let's see how it looks from this side yeah I'll just rotate it up a slightly maybe we just do a test play just to make sure that our character can fit through the entrance yeah so if you get this problem here then what we got to do is we got to go into the mesh and then same thing we did with the other assets so collision and then change the Collision complexity here from Project default to use complex Collision as simple and that should do it let's test again yep so far so good he can run right through perfect so now I'm just going to clean up our landscape a little bit and this is really the most time consuming part of this is getting the edges just right so for visibility reduce this down to maybe like 40 yeah just cut that cut this and I can hold shift and I can bring back the part up top yeah so a little bit up there I think is totally fine and now what we're going to do is we're going to line all the rest of the landscape with static meshes so back to selection mode and we're going to go back to Mega scans 3D assets under our Earth quadrant main palette and typically what I recommend here is start off with your largest asset so the Nordic Boulder move that in so that's gigantic I'm going to change the rotation to pretty much match as a wall that's looking pretty good but the problem is now I got this side all sticking out just like that so you could solve that one of two ways you can move your landscape up in this area or we could just cover that with other meshes so I think I'm just going to do that so now we just got a little green moss growing on that one all right so now for the top so typically I like doing a big Flat Rock for the top so I'm going to scale this one up to 2.5 2.5 2.5 maybe rotate it accordingly actually let's flip it around I'm going to cut out the landscape here just slightly now on to the other side so let's pick one of our other Tundra Boulders I know it's Tundra I'm just saying Tundra maybe scale this up a little bit let's do 1.5 1.5 1.5 so that's looking pretty good so now we could do the same kind of thing with other rock formations so let's see how about this Boulder gonna make this one a little bit bigger it's pretty big already but and you don't have to take care of the entire edge with a single Rock so I'm going to use this for the top here but then for the bottom like even this one again and we could just scale it to be a lot smaller and I bet it'll take care of the problem just fine and then I'll have another rock next to it so last thing we got to do this area here and I've got the perfect one for that Tundra rock formation it kind of just Fades right into the beach right and into the stairs the thing is I gotta raise the beach slightly but that's not a problem so we just come to landscape maybe make this slightly bigger hundred and raise it up back to selection mode and we're just going to go inside and we'll do the same thing with the interior here so if you're looking around from the inside and you don't see any holes if everything's looking good just like that then you're all set so now let's go on to the other side and this one we're going to do all natural so to start I'm going to make this hole a bit bigger and then I leave it up to you go to town the one thing I do recommend is choose a Flat Rock something like this for the weight down you don't have to do that you could have it be bumpy but here's what I'm going to do I'm going to make it like three by three by three and this is the Viv rcjkaw and you could even use a few of these so I'll duplicate it and spin this one around and I think I'm just going to duplicate it one more time and put that all the way down to the bottom same with this one now that we got that let's just finish out the edges once you got something looking like that and you check the outside as well play from here foreign yeah looking pretty good so now let's go back over to the other entrance of the cave because we need to fix the coloring of the archway and the stairs over here so right now they do not match so let's select the archway and let's go into the material and specifically let's go into the texture here so I'm going to change it so the saturation is 0.3 and the RGB curve is 1.5 yeah it just matches the Rocks much more closely and it will do the same kind of thing with the stairs so we'll go into that material over to the texture saturation 0.7 and RGB curve 1.5 save that yep that's looking a little bit grayer a little bit grimier so now on to the last thing before lighting now it's really up to you whether or not you want to do this but I really like the idea of having the god Rays shining into the cave so what we're going to do is I'm going to find the highest point of the cave like right about here I'm going to go back into our foliage painting mode and then I'm going to zoom out right at that point and I found that in order to reach any of the Rocks we need to set a brush size to probably about 800. I know that's pretty big but then let's it's a race so now we've got a hole so now that we've got a hole we can switch over to the landscape mode and we got to do the same thing here so brush size set it to about 100 and yeah there we go and then back in our content drawer under Mega scans I'm going to search for Arch and get our Mossy Chapel Arch once again and this is entirely up to you you could do something totally different but what I found to look pretty cool is we're going to put two of these arches kind of up against each other and I'm just going to scale this up 1.5 1.5 1.5 and you'll see what this looks like you want it as close to the landscape as you can and then we'll duplicate it and swing it around you'll see where I'm going with this Yeah so basically just large enough for the character to go through so let's test that so can I jump through it and now you know what to do around the edges so Earth quadrant main palette [Music] test Play One More Time bombs away oh it's gonna leave a mark so now we gotta do the Interior right so same kind of thing and for this honestly I think I'm just going to use one kind of rock it'll get the job done just fine [Music] and I thought about making additional holes for light shafts but in the interest of time I think that's all we're going to do this episode so if you want to do more feel free so now on to lighting we're saving the best for last and I want to give a special shout out to Clyde and the guys from the Discord that helped me finally start to understand this and my first tip with lighting is the best tool out there for managing it it's under window it's called the environmental light mixer right here and it's going to pop up this window on your screen just like this I suggest changing this from minimal to normal to follow along and the other thing I'm going to do is I'm just going to make it smaller so that it's a single Pane and we'll scroll through the entire thing and you can see how it's going to change our lighting as we go through it so I'll make this basically the size of our details panel and what the environmental light mixer does is it basically combines all the key actors that affect Lighting in your scene into a single place to manage it I think the only exception to this is the post-process volume but I'll show you how to adjust that afterwards so the directional light that's our sunlight we're not going to mess with that for now I'm going to scroll down the Skylight is exactly what it sounds like it's basically the atmospheric light that's radiating from the Sun from the directional light and we're also not going to mess with that for now Sky atmosphere determines how that Skylight actually radiates so what comprises our atmosphere such that the light looks the way it looks and a lot of this stuff is pretty Advanced just know that it's already got Earth-like settings built in so unless you want your world to look otherworldly I wouldn't really change anything here so below that we've got volumetric clouds and these are the clouds that are up in the sky not really going to mess with that this episode since we're focused on indoor lighting and for indoor lighting I figure the first thing to go over is God Rays because that's what's on everybody's mind so there's two ways to get God rays and one is based on looking at the actual source of the light so looking straight up at it and the second is through exponential height fog and specifically through making our exponential height fog volumetric fog so checking this checkbox here I'm going to uncheck it for now we're going to come back to it because let's first get the god Rays working when looking at the light source so for that I'm going to come back up to my directional light and what's going to control that is the light shaft Bloom so check this checkbox and immediately you should get the god Rays if if you're looking at the light source so let me zoom out for a moment because let me show you something so you can hit Ctrl L to get the ability to change where your sun is so I'm just holding Ctrl after I hit Ctrl L and then I move with my mouse and I can control the direction of my sun and releasing control then releases the Sun so I'll do control L again I'm just going to put this on directly overhead for the purposes of this demonstration so now because I've checked off light shaft Bloom then I got our God Rays however if I'm not looking at the light so if I turn away then I don't have the god Rays so in order to get permanent God rays that are always there that's where we're going to have to use under exponential height fog the volumetric fog but let's just go back to the light shaft Bloom because I want to talk about the settings there so the bloom scale okay let's look back at our light so if we want this to be really intense we can up our Bloom scale so I can up up up up up up up up and the bloom tint so let's say your sun is like a much darker redder Sun so we could make that tint quite a lot darker quite a lot redder and you could play with some of the other settings like the occlusion settings so they're going to determine how the rest of your scene looks relative to the light shaft but those two settings the light shaft Bloom and then the bloom scale those are really the two key settings to get it working when you're looking at the light but now let's get it working in general let's get a light just generally filtering into our cave so we'll come down come down to our exponential height fog and by the way if you're missing any of these actors in the world at the top of your environmental light mixer it'll give you options to add those to your scene and you can also just drag them in by searching for them up here and the first setting we need is volumetric fog so select that and let me just move this up a little bit and over so you can see it alright so we got our volumetric fog turned on but we don't got a light shaft yet and why is that well the first thing we can do is we can up our fog density quite a bit so let's up at 10 percent fog density up here to 0.2 and now we start having a light shaft there but there are things that we can do to increase it even more because as we up our fog density let me just show you outside so when I go outside now we see fog so back inside our level okay we got the start of our God array if we want to increase the intensity of this let's raise our Extinction scale here raise it to 10 so between those two settings that's what I found to work the best so our Extinction scale goes up and our fog density as well goes up so if I set this to 0.02 then we have a very thin fog but we still have a pretty strong beam because this is set to such a high value so the Albedo this is going to control the tint of the actual Light Beam so if I set this to like blue purple and we have a purple beam and then the emissive here so this is actually going to be the color of the fog itself so here's what I mean so as it's black we don't even see the fog in our cave but if I select this and then I up this to White yeah even a little bit all of a sudden you start seeing the fog and you can also change the tint to this too so you can change it to like let's make a subtle green that looks like a perfect horror movie scene right there just got to be a little bit darker so those are the key settings that I found to make God rays but let's go over one more thing which is the brightness of your overall cave here and for that we just got to go into our post process volume and we could search for brightness and you'll find this under lens exposure here we got our minimum and maximum brightness now if you want to reduce the overall light level in the cave then raise this minimum brightness so I don't really understand these lens settings all that much but raising this to something like 0.4 yeah we got a much darker much more natural looking cave and I like having the combination of a little bit of a god Ray but when you look at it you get the full effect yeah so it's just a nice blend of the two effects the other thing I should mention here is we set up a post process volume back in episode 43 on our third person character so this was under functions post-process set post-process Dynamic material instance it was right here so I wanted to mention that I landed on a setting for minimum brightness of 0.5 and then also maximum brightness I crank that up all the way to 8.0 and the reason I did that is because the minimum and the maximum brightness makes a big difference whether you're outside or inside so if the maximum brightness was closer to one or two then it was really bright outside especially on the beach but we have the opposite problem in the cave because if the minimum brightness is set to too high then I'm not going to be able to see anything in the cave so you've got to play with those settings make sure you get them right so the very last thing we're going to do as part of this episode is make sure our AI can run into and out of the cave so we're going to start that by adding a nav mesh to our scene so that's one word nav mesh bounce volume and we could just add it in I'm going to zoom out because I'm going to change the scale of this to roughly match what our level is so this is going to be let's do 50 50 and 10 and we see our nav mesh there but let's increase that so 150 150 and 50. and there we go now it's comprising the entire Island in order to see that nav mesh just press p on your keyboard and then it shows up green all over your level just like that and what you want to look for the key to look for is right here so depending on the size of the entrance into the cave the nav mesh might not connect automatically so it's fine in the cave but it's really those entrances and exits so let me show you how to solve that problem so if we search for recast nap mesh right here and if we scroll down we've got to go to a setting that's our agent radius if I decrease this down from 35 down to five that's basically resizing the size of our AI so then based on the smaller size of our agent our AI character then our AI should be able to navigate in so I'm just going to drag in a reference to my AI dragging a character and once I got the AI in the level I can just right click Play From Here AI should be following me let's see if it can follow me into the cave yeah now one thing I found is that exiting out of the editor and coming back in all those recast navmesh settings don't save and so searching for that problem I found this post here recast navmesh does not save when editing properties and here's the answer this problem could be fixed by adding a new supported agent to the navigation system in Project settings so we'll navigate over to settings we'll go under project settings if I come down a little bit to navigation system and we can add a supported agent so plus sign here expand this and I'm going to change the nav agent radius to 5 and I don't know what this controls but our character Ken Crouch can jump and can walk so I'm going to select all three so then we'll save this and restart the engine so that wraps up our episode for today and in our next episode I figure it's about time to make our water completely interactable so I hope to see you there in the next episode
Info
Channel: NumenBrothers
Views: 26,840
Rating: undefined out of 5
Keywords:
Id: EYwfDQK645Y
Channel Id: undefined
Length: 30min 56sec (1856 seconds)
Published: Sat Feb 18 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.