 Good morning class, welcome back to Gamedev Academy. I'm Shane and in today's lesson we're going to be covering creating this beautiful photorealistic landscape using Unreal Engine and not a lot else. We'll be looking at creating the landscape using a height map. We're going to be making extensive use of foliage from mega scans and then we'll be looking at lighting and rendering using path tracing on Unreal Engine, which will really give us that photorealistic vibe that we're after. Make sure that you stick around to the end to make sure that you get the full workflow breakdown on how I created this scene in less than a couple of hours. Before I jumped straight into it then, I began by putting together this mood board to get a feel of what I was going for. I know I wanted the kind of English farmland countryside sort of feel, so I got a few images and you can see that I really wanted this kind of hilly landscape where this patchwork effect of the different colored fields split up by hedges and walls, lots of long grass. I also like the kind of sunset feel that the long shadow, so I wanted to translate that into the scene in Unreal Engine. So then I jumped into Unreal Engine and I created a new project. It's just a basic first-person project, but what was important is that I made sure that ray tracing was turned on. Then I created a new level and in this new level I decided to keep all the lighting, but I did get rid of the ground since I'd be creating my own. To create my own, I added a new landscape and I imported a height map and I got this height map from a pack which is freely available online and has been made available by Rain Story Games. I'll put a link to the pack below if you want to check it out for yourself. Then I spent a little bit of time flying around the environment to find a nice spot that would give me a good composition where I kind of liked the foreground and how the hills were into the background and then I pressed Ctrl and 1 on my keyboard to set a camera bookmark so that after this, whenever I pressed 1 again on my keyboard, it'd put me back in this spot so I could check out how my composition was changing over time. Now that I was happy with my position, I wanted to get a material on the landscape, so I went to Mega Scans using the Bridge Plugin in Unreal Engine and I liked the look of this wild grass material. I thought that was a good starting point, so I downloaded that and added it to my project. Then back in Unreal Engine, I just took that material and added it to my landscape and that's already looking a lot better. That'll only get us so far though. It kind of looks very PlayStation 1-era, so I went back to Mega Scans and I wanted some foliage grass this time. So as I'd already got wild grass for the material on the landscape, I thought I would carry that theme through and use this wild grass here. Once I downloaded it and put it into Unreal Engine, it was already populated into my foliage tool, and so I just went in and adjusted some settings, so I put the paint density up to 1 and then there's another one here, which I set to 600. I also wanted to put some randomization in this scale, so I set the Minimax values to 0.8 and 1.2 and then once I was happy with that density, I painted the grass. So what I did is I painted most of it from where my point of view was, where I decided that I wanted to take the composition from so that I knew I was putting the grass in the right place and know whether it wasn't needed, since this could really hurt performance going forward. I then just filled in some of the gaps that I didn't want to be gaps, and then it was time to start making this look good. So I just went into my project settings to make sure that path tracing was enabled, which it was, and then back in Unreal Engine, in this viewport, I turned on path tracing. So you can see already this looks a lot better, but the scene is taking too long to render and also there's an issue with the draw distance of the grass. It's not drawing all the way back into the distance. To fix that then, I first of all created a post-processing volume and I just checked the box for infant extent to make sure that any changes I made here would apply to the whole scene. Then I scrolled down in the post-processing settings to find the path tracing settings and I reduced the quality here by setting the max bounces to 20 and the samples per pixel to 200, which will help speed things up as we're rendering. I'll also make sure that the denoiser is turned on, which will help to compensate for that reduction in quality. To deal with the grass draw distance issue, I went to my console and just typed in the following command r.raytracing.geometry.instaticmesh.culling and then a value of 0 here means that we turn off culling for the grass. Then I just moved my camera again, which would force a scene to re-render and you can see the grass is now rendered and the rendering is also going much quicker. Now I can see the grass and the grass material on the landscape. I can see that the colors don't really match up very well. So I opened the instance, the material instance for this, to just make some changes. So I just changed the color and the brightness and I did this with the path tracer on to make sure the colors matched up as closely as possible and you can see that's a pretty close match when I'm done. The next thing I need to look at is the clouds. So volumetric clouds are generally really good in Unreal Engine, but in the path tracer they just kind of look all pixely and rubbish, so I decided I would just get rid of them. So I deleted them and then what I did instead was I got a HDRI image from Polyhaven because they've got a really good library of free HDRI images and then I added a HDRI in Unreal Engine. It starts off with this default one, which is really crappy and pixelated. So then what I did is swapped it with the one that I downloaded and we can see that that looks better. Then I just rotated the HDRI image a little to get the sun positioned right where I wanted it in frame, just over here for a bit of a sunset. Then I just spent a little bit of time roughly changing the angle of the direction I like to get it to match up roughly with the position of the sun on that HDRI. Now I've kind of got the basics of the scene. It's time to add some more detailing. So I went back to Megascans and as I saw in my concept art, there were lots of these cobblestone walls. So I found this mesh here and imported it into my project. To put this wall in, then the first thing I did was turn off the path tracer and I also hid the foliage, which would help with performance and I could just concentrate now on the position of the wall. I positioned the first piece and then I used lots of duplication to duplicate it and to create this interesting looking corner that I just wanted to be sort of kind of quite close up in frame, but then go off into the distance. And I was very careful to follow the curvature of the hills. I did this because I thought that made it look a lot more interesting. I then realized that I had left a bit of a gap under the wall. So I quickly got the landscape sculpting tools in play to fix that. Next up, I wanted to add some trees and I had a couple of good content packs that I got from the epic marketplace in the past. So I've got some trees in the kite demo content pack that I like. And also in the city park content pack here, there's also some nice trees. So I imported the trees from both those project into my landscape project. And then I just manually placed a couple in the foreground because I really wanted to just follow the path of the wall. And then there's also this really nice broken tree stump. And I wanted to put this in the foreground just to give the viewer something to focus on. Then I loaded some trees into the foliage tour so I could fill in the background. So I needed to make some adjustments to the density to avoid it looking like this, which wouldn't have been a good luck. And then I put some trees over on the far hill like this. But I did delete the ones that were falling in front of the sun. And then I'll lower the density and paint those in again to make sure that those trees weren't too thick because I wanted the effect of the sun bursting through the tops of the trees over there. Then I placed just a handful of trees in the midground to stop it from looking too empty. Next, I decided I wanted to bring in the farm vibes. So I found and downloaded this barn from Sketchfab, which was made available for free download by a user called Splenivision. Great name, by the way. I've linked the model below if you want to take a look for yourself. I placed this barn into the background here. And then as the edges of the barn don't really meet up with the landscape very well, I decided that I'd put a hedge around it. So I went into Megascans and I got some dead shrubs. These, I thought, would act really well as a hedge around the barn. So I used the foliage tool to just paint that in. And then I decided that I might as well use the same hedge to create a border to some fields to help me get that patchwork landscape effect that I was looking for. And I wanted that to happen in the distance of the scene. Once I got all those hedges in place, I added a few trees along the hedge lines. Again, because I'd seen this in my reference images, it's something we tend to see quite a lot. So I wanted to mirror that. And once I was happy with the placement of these trees, I wanted to sort of get that patchwork effect of the fields. And I did that by creating a landscape layer blend material and using the painting tools to paint in the different parts of the field like this. If you want to know how I did this, I'll put a link on screen in the description for a tutorial on how I put this material together. It was at this stage that I also lowered the tiling on the material because I wanted the normal detail to really come through in the distance and you can't see the grass material in the foreground anyway, because of all the foliage. Then I rendered the whole scene again to see how it looked and I made some more changes to the colours in the material as I felt they were a little too bright and saturated. Now I start to think about the finishing touches and I added some more trees to the other side of this hill. Can I just see the tops peeking over? And now that I'm happy with pretty much all the assets in there, I wanted to get my final lighting dialed in. So I used the post-processing volume to lock the exposure at a value of one. Then I rotated the directional light again to get the shadows to line up with the direction of the sun and the HDRI a little better than it had been doing so far. I also increased the intensity of the directional light to add in a bit more contrast. And then I went back to the post-processing volume to make some colour correction adjustments by changing the colour temperature and also increasing the contrast slightly. Then I just added a little bit more grass in the distance towards the farm because I wasn't quite happy with that transition. And then I adjusted the camera to make sure that I was happy with the final composition and then I put the path tracing settings back to their defaults for a better quality final image. Now it was time to get that final image, so I went full screen. I turned the path tracer on and let the magic happen. After about 10 minutes, I was left with the final image that you can see here. And it took me about 90 minutes to put all of this together. And I'm really happy with the result. That's it. So hopefully you've learned something. Leave a like if you did and consider subscribing to Game Dev Academy for more great content like this. In my next video, I'm planning to cover the different ways you can break up tiling in your textures right within Unreal Engine 5. My mission with Game Dev Academy is to make game development and game art accessible to everyone. If you'd like to support me in this mission, then please consider supporting Game Dev Academy on Patreon or even just join the community over on Discord. Both links are in the video description. Thanks so much to my current patrons. I put their names on screen at the end of every video because without these amazing people, Game Dev Academy wouldn't be able to function in the way it does. So a massive thanks to you guys and thanks to everyone else for watching. I'll see you in the next one. Class dismissed.