Rocks and Trees - Building Worlds In Unreal - Episode 7

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] in today's tutorial we're finally going to add some rocks and trees to our landscape for the past several weeks we've had a fairly flat and barren looking landscape but today we're finally going to add those additional touches of rocks and trees to liven things up and make our landscape look even more like the reference images that we found but first before we get into that i want to show you something that i've been working on since last week now you remember last week's tutorial was about adding tessellation and displacement mapping to our landscape and since then i actually did a couple of things to tweak our landscape displacement material function to make it a little bit more efficient so last week i had two parameters that we could control the distance and fall off and these were just hard-coded values that i had set to 500 and you can see now that i've converted them uh to exposed parameters so that these are tweakable in our material instance i also added two new values this uh power here and this is called a tessellation falloff curve and i also add a multiplier to control our tessellation density i've also exposed both of these as parameters so that we can tweak them in the material instance and finally i also exposed our displacement height parameter so that it can also be adjusted and what i want to do is show you what these do and tweak them in real time here in in the editor so here is our landscape material instance [Music] and you can see that these values are now exposed we have a tessellation falloff curve tessellation density tessellation or displacement height and we also have tessellation distance and tessellation falloff now in order for you to see exactly what these are doing i'm going to switch from lit view to brush wireframe so the first two values that i want to show you here are tessellation distance and tessellation fall off so with tessellation distance i can push my tessellation out further or i can shrink it closer to the camera and i found that a value of about 500 works well for this just like we had last week the next value is the tessellation falloff and this controls the distance that it takes to go from max tessellation to to no tessellation so you can see as i increase this my falloff range increases and my falloff range decreases and i can get it all the way to zero so that i just have this like instant fall off shelf if i want i've also found that a value of 500 which is five meters works really well the next value is tessellation falloff curve and if i adjust this you can see that my falloff distance is the same but it's controlling the sharpness of the falloff and so my falloff curve if it's set to one it's a linear falloff but if it's set to something below one that fall off curves become becomes a little bit more sharp and i can get fewer triangles in the distance and more triangles up close and i found that a value of 0.5 works well for this if i have a value of 1 you can see i have a lot more triangles here in my falloff but i can make it more efficient by setting this to 0.5 tessellation density is pretty self-explanatory it's just the overall density of tessellation last week we had this set to one but i've found it works really well with a value of 0.5 and then tessellation height is pretty self-explanatory as well i can make the vertices uh displaced more or less depending on our height value so if i set this to four i think that's about where we need it so what you can see is that with these new values i was able to tune and tweak the performance of the tessellation to require fewer triangles while still maintaining our basic tessellated look so here's what we what it looks like this is what we had last week we had both of these values set to 1. and then if i tweak these to 0.5 we get a lot fewer triangles while still maintaining pretty much the same look that we had before and exposing these parameters a material instance allows me to visually tweak them and easily get exactly the values that i want and find a good balance between performance and visual quality okay so now that we took a look at that uh and adding these new uh exposed parameters to our landscape displacement material function let's go ahead and jump into the segment on rocks and trees so to get our bearings on what we're trying to work on let's jump back into pure ref our reference photo software and take a look at some of the reference images that we've created i think that you can see from these images that uh the biggest most prominent feature uh that we're looking at here are rocks these streams and creeks are just completely filled with rocks and so let's start there we need to find some rock assets that we can use uh bring in and add to our level so let's switch over to bridge oh one thing that i want to notice is that these rocks are really mossy um we're looking for kind of round um boulder sized rocks that are maybe like the size of uh like up to my knee or the size of a soccer ball and they're covered with moss so let's switch over to qixel bridge and we need to search for some mossy rocks uh so let's just type mossy stones mossy stones pack that sounds promising so here are three sets of four rocks each called uh mossy stones pack and we need to download these rocks and bring them into our level so the first thing i want you to notice is the scale so if we select these and we're looking at asset info over here you can see that our rocks are the size of this this little square here so for each of these our rocks are maybe a little bit too small but we can probably scale them up a little bit so we have a set of 12 rocks here that we can use let's jump to our download settings and take a look uh you can see that for lot zero each of my rocks is about 20 000 triangles which in my opinion is crazy for objects that are so small so we're gonna skip that load and we're also going to skip log 2 just for efficiency so we're jumping right from 10 000 to about 4 000 triangles uh and then we'll go down to uh 730 at the base if there was a lower lot available here that we could go lower than 70 730 i would really like that but it doesn't look like it's going to give us that option so we're going to skip lot 0 skip log 2 and just grab 1 3 4 and uh we're going to download 2k textures which may be a little bit of an overkill for rocks this size but that's what we're going to do and then we're going to grab the albedo the cavity the normal and the roughness we probably don't need cavity but i like to get it anyway all right then let's switch over to export settings and we're going to take 2k textures jpeg format some people don't like this so you could use ping or tga instead but i like jpeg because it's nice and small and compact and then we're going to make sure we have our mesh format to set to fbx and our mesh lod which is the highest slot we're going to grab is lot 1. so uh i can download these assets and then i can hit export and that's gonna export them right into unreal for me and set them up uh with all their log chains and everything pretty cool okay so here we are back in unreal and the assets have imported and you can see that i've got mossy stones pack zero mossy stones pack one and mossy stones pack two and each of these packs has four assets there are these four rocks and it also has the textures and the material so that's great that's exactly what we're looking for we want we want our 12 rocks to be able to add to our level but if we look at our reference here there are just like hundreds and thousands of rocks in the creek bed and that's a little bit of a daunting task to have to place these rocks one at a time and sure i'm going to show you a tool that makes this process a lot faster so i'm going to come up here to modes and we're going to switch to foliage and this is the foliage paint tool now you might think i'm dealing with rocks why am i selecting the foliage paint tool well what this tool does is it allows you to paint assets onto the landscape and it doesn't necessarily have to be foliage it could be anything you want really and in order to do this what we need to do is take our rock assets and i'm just going to select all four of them and i'm going to drag them up here to the foliage type box and i'm going to do this for all 12 of my rocks just going to put them into the foliage type box all right so now i've got my 12 rocks here and you can see that i'm just going to collapse our content browser for a minute you can see that each of these individual rocks has some settings here and these settings affect the way that the painting works before we go over the settings i just want to show you really quickly what this looks like so i've got one of my rocks selected and you can see that with the paint tool selected here i've got this nice little white bubble or the size of my brush is basically what this is and as i click and drag you can see that it's placing down instances of this rock and so really quickly i can just get thousands of rocks onto my landscape which is amazing but it can also be dangerous so we need to be a little bit careful with how we use this i'm just going to undo this and we're going to go through the settings so i can show you what we're going to do so that we get good results with these rocks and first of all i'm going to shift collect a select all of my rocks i'm going to click my first one here and then hold down shift and pick my last one so that all of them are selected and what that's going to do is all of the settings modifications that i make over here are going to be applied to all 12 of them so that i don't have to do this individually for each one all right so our first set of settings here are for painting and right off the bat i want to change this density setting this is the dangerous one if you have this one too high you'll end up with tons of geometry and the potential to really kill your performance so i'm going to set this down to 10 and what that means is for each of these assets that i paint it's going to place about 10 of them for every 10 meters square and that's a pretty decent setting to use for now the other setting that i could use is called radius and this allows me to space the assets out so it says the minimum distance between foliage instances i'm not going to use that but it could allow you to spread these things out so they're not overlapping the next setting that i want to use is called scale x and what this does is it scales the assets up or down for each individual instance that it places and that's kind of nice because i can get some random size variation in there now i happen to know that my assets are a little bit too small as we saw when we were looking at them in bridge and so i'm going to make my maximum value 3 and what that means is that each individual rock instance will be somewhere between 1 and 3 times its normal size so there's going to be some nice variation in in size there all right the next thing that i'm going to do is uncheck align to normal because it doesn't matter to me that my rocks are conforming to the alignment of the terrain what a line to normal does is if i have a tree it will make the normal of the tree or the the rotation of the tree align to the the the way the landscape is facing uh so if it's on a slope here uh the tree will be uh pointed in the direction of the slope and i don't need that for rocks i can make my rocks point whatever random direction they want which brings me to this next setting here which is random pitch angle and i'm going to put 180 degrees in there which will make the the rocks rotate randomly as well which is which is exactly what i need i want rocks that are uh as as random as i can get them so that they'll look different i only actually have 12 different rocks but if i scale them and rotate them all differently it'll appear like i have a lot a bigger variety of rocks than i actually do the next setting that i want to set is this cold distance value and this one is really important it's going to determine where the rocks stop drawing if i leave this at default the rocks will just draw like infinitely into the distance and for what i'm doing right here uh that would be a performance killer i'm about to add like thousands of rocks to my level and i want to make sure that as the camera moves away the rocks will fade with distance and so what i'm going to do i'm not going to make you sit and wait for my uh weight for me to do this but i'm actually going to add a different cull distance uh per rock actually i think what i'll do first is add a cull distance of 6000 and i'll show you now that added 6 000 to all of them and i'll show you what happens so let's just paint down some rocks here and then i'm going to back up and what i want you to see is that there's like this line where all of them disappear at the same time and that's what i want to avoid so instead of assigning each of them the same value i'm going to go through each individual one and give it a random call distance somewhere between six and nine thousand okay so i've given each of them a different cull distance and you can see as i select them if we're looking right here at the max cull distance we've got 6 500 8600 7500 7200 so they're all different and if i shift select them again you can see that it says uh multiple values so now if i paint down my rocks and then we zoom out what we're going to get is they kind of dissolve over distance and that dissolve helps to break up any hard line that we've had as they fade out and it kind of um it kind of softens the fact that we're losing our rocks so that's what we're looking for we don't want a hard line where they call out we want each individual rock to cull out at a different distance okay the next setting is cast shadows and this one is purely a performance thing so if i turn cast shadows off uh none of these little rocks are gonna cast shadows and that's probably good especially considering that when i add the trees into my scene the trees are going to be casting shadows and so shadows by individual little rocks that are in my creek may not be seen so in my case i'm gonna turn off cast shadows and i know that this does look a little bit weird like if you if i paint these rocks down you can see that they're not casting shadows now but once i get my trees and my other assets into the scene the shadows from these little rocks are not going to be missed so i'm going to turn those off in order to save performance so i have a couple more settings one is receive decals and i'll talk about that a little bit later maybe in another tutorial but we're going to want these rocks to receive decals and we also want to enable density scaling and what this does is uh for different performance tiers in your game like if you have settings that are for low medium high ultra et cetera you can scale the amount of density on these assets based on this if you have this off you'll always get the maximum density no matter what your quality settings are set to okay so these are the settings that i want and now i can go ahead and start painting down my rocks so i'm gonna go ahead and do that and then i'll i'll get back to you okay i'm almost done adding rocks to my scene i'm just gonna kind of finish up here and add a few more rocks to the end of my creek bed and then we'll continue so i hope that you can see that these uh these rocks that i've added uh have have increased the uh the realism of my scene significantly i've i've gotten a little bit closer to matching the the reference images that we collected by adding all these rocks to my scene let's go ahead and switch over to i'm going to switch back to select mode and then hit the play button and we'll take our mannequin for a spin here and just kind of evaluate our work our stream bed is significantly more uh realistic looking like i said and you can see that if you look way off in the distance there you can see the rocks kind of uh spawning in as i run forward but hopefully they're small enough that that's new not too jarring and we get some pretty good mileage out of adding these rocks to our scene all right the next thing that we need is to add some trees so there aren't any good trees yet in the mega scans collection and so to find trees we're going to use the epic games uh marketplace instead and don't worry these these tree collections that we're going to use are free so the first thing that i'm going to do is so i'm going to search for open world demo collection and that brings me to this really nice demo that unreal epic made and it has some beautiful trees included with it so we're going to go ahead and use this add to project button to download that content and then we can grab the trees from it and then the other one that i want to grab is called i'm just going to search for vegetation spruce and this will give us some really nice spruce trees so i'm gonna go ahead and hit add to project there as well then we're gonna jump back to unreal and you can see that i've already added these trees to our level but let me show you where they imported so the open world demo stuff came into this kite demo folder and i can open this up and go to environments trees then you can see for each of these i have the tree asset and then you can just go ahead and drag and drop it into your level and what i like to do with these is kind of create for myself a palette where i pick all the assets that i'm going to be using and kind of line them up so that i can see what i'm going to get and so i've gone ahead and done that so i have the hill trees the scots pine and then there's some other assets here as well but i'm not going to use these yet i'm just going to focus on these trees and then for the spruce trees i can find them in this pn interactive spruce forest if i open this up there's a meshes folder and you can see that there are full assets and half assets i'm going to use full but i'm going to use the assets in the low folder because they're lower polygon count now you can see that i've gone ahead and grabbed these and dragged them into my scene and so this is the collection of trees that i'm going to use now for the rocks we used the foliage tool to paint them down onto the terrain but these trees are really expensive assets and they're not something that i just want to kind of willy-nilly paint anywhere and i'm just going to go ahead and hand place these trees because i want to make sure that i get good coverage and i get the trees exactly where i want them to go whereas if i were using the vegetation paint tool it would kind of spray them and i would lose a lot of control over where they were going to be placed now this is a bit of a time consuming process so i'm not going to make you watch me do this but i i'll start the video again and show you what i did okay i'm just about done placing trees and i wanted to show you a couple of hotkeys that i've been using that help speed things up just a little bit now first of all i can select a tree and hit control c for copy and control v for paste and the danger of doing this is that it makes a copy of the tree and puts it in exactly the same place and so if you don't move that tree right away you run the risk of leaving two assets right on top of each other which is not a good thing so make sure when you copy and paste you move the asset right away and then the next hotkey is the w key which switches to move mode and then i can just move the asset around so i'm going to stick this tree over here and the next hotkey that i'm going to use is f which centers the screen on the asset that i have so then i'm going to move it around just a little bit and i want to move it into place and i can keep pressing f to re-center things then i hold down alt and the first mouse button to kind of orbit around the tree then i can just kind of move it down into place and then for each of the trees i've also been giving them a little bit of random rotation and the way that i do that is press the e key and then i can move the widget to randomly rotate the tree okay so i've placed all of my trees now and you can see that i'm just kind of scattering them around the creek so they kind of outline the edges of the stream and now when we're down in here you can see that i'm getting even closer to meeting my visual target i've got rocks and i've got trees and this is looking pretty cool let's hit the play button and take our mannequin over here to uh take a look at our results so pretty neat we've got some rocks and trees placed in our environment and we're definitely not done but today we got significantly closer to matching our reference images now there are a couple of things that i can see that we still need let's jump back over to our reference and take a look so the first thing that i can see is in addition to all of the little rocks that we added there are lots of big boulders and undergrowth like this little plant here and this grass here these large boulders and i'm also seeing that there's some fallen logs like this one here this one here so we've got boulders fallen logs and undergrowth we need to add and then obviously uh there's the water so i'm gonna let you guys choose down in the comments let me know if next week you'd like me to talk about adding a water shader to the level or if you want me to focus on boulders undergrowth and fallen logs so those are two the two next elements that we need to do and you guys get to pick do we want to add water first or additional assets boulders fallen logs and undergrowth so we can look forward to seeing those tutorials next week but let me know in the comments which you'd like to see first okay so i hope you enjoyed today's tutorial like i said next week what we do is up to you so i look forward to hearing that in the comments also if you have any questions about how i place these assets or if you know of a better faster way of doing this by all means please let me know thanks for watching guys and i'll see you next [Music] week [Music] you
Info
Channel: Ben Cloward
Views: 7,753
Rating: undefined out of 5
Keywords: UE4, Unreal, Unreal Engine, shader, material, material editor, game development, real-time, tutorial, training, Unity, graphics, 3d, GPU, tech art, computer graphics, fundamentals, basics, beginning, learning, open world, landscape, terrain, ground, textures, pbr, landscape material, landscape textures, quixel megascans, rocks, stones, cobblestones, boulders, landscape paint, trees, vegetation, foliage, spruce, pine
Id: gFF2LSHZlZo
Channel Id: undefined
Length: 27min 9sec (1629 seconds)
Published: Thu Nov 19 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.