How to add water to the landscape - Unreal Engine 5 Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone how are you doing in this video I'm going to show you how you can add water to the landscape so in this video I'm going to show you how you can add an ocean like this one a river like this and a lake that we have here like this one so if you do like this video please hit the like button and subscribe so you don't lose any new content let's start to better show you the water system I created this landscape in Gaia it's just a simple island with a bottom for the ocean and a lot of random shapes so you can see how we can shape the water around the island first you need to make sure that the landscape is ready to receive the water so if you select the landscape and scroll down a little bit on the det Tails panel you'll find under landscape the enable edit layers option you need to make sure that this is enabled otherwise the water won't work on the landscape so just check this and now you can go to settings plugins and here let's search for land and you'll find the land MK plug-in and the water plugin you need to enable these two so one in is in beta and the water is in experimental so this all the things that I'm going to show you here may change change in the future so be aware of this so let's enable this two just hit yes on this message here let's enable this too and you need to restart the engine so let's restart now okay so once unre restarted you'll see this message Collision profile settings do not include an entry for the water body collision profile if you see this just scroll to the right here and make sure to click on add entry to default engine.in you just just click here and okay now we can clear close this message and close the plugins here and now we are ready to go before we start adding the water in the level let's make sure that the center of the landscape here is in the middle actually the middle of the landscape is in the middle of the world the 0 0 0 and as you can see I have this uh uh this postprocess volume on the middle of the word in the 0000 and is actually here so in the corner of the landscape and I want the middle of the landscape to be here so for this let's select the landscape and because I created this landscape in Gaia I know that this scale is 5,000 so for the location here I'm going to put 5,000 then to convert this to s meters I need to add two zeros or multiply 5,000 by 100 then divide this by two so if you do this you're going to shift the landscape by half so let's actually put a minus here so it's negative there we go and now we need to do the same for the Y so let's just copy this and put on the Y AIS let's hit enter and there we go if I select anything here that is in the center of the word here as you can see this is in the center of the landscape this is better for the water to work because I will put the the ocean on the center as well so it's better for us to do like this let's add water to the scene so for this go to place actors and if you're not seeing this place actors panel just go to window and Place actors and here let's search for water and as you can see we have a lot of water bodies here let's start with the ocean one so just drag this into the scene there you go and as you can see the water is actually changing the shape of the landscape to match the water and it's doing this with this splines here so as you can see we have this spline this is how we can sh shape the island as you can see we can select these spline points and manipulate these positions to shape the island and we can select this control points as well to change the curve here so by changing this we're going to shape all this island so for now I'll I'll be selecting one of these so let's me select the ocean here let's select one point and I'll be placing this on the coral of the landscape so let me do this for all this points here and as you can see as I move around where we can see now the island here let me put this maybe here there we go now we need to shape these spline points around the island here by adding new points so we can do this by select a point here holding our out on the keyboard and drag from a point as you can see we add another point in this PL line like this so we need to do this for all the all around the island here to better edit the shape of this spline let's select one spline Point here right click and as you can see we have some options for this point let's go to select spline points and select all spline points this will select all the points around in this disine now let's right click go to spline Point type and change this from curve to linear this will make a straight line between all the points so now it's better for us to shape this okay let's put a spline Point here close to the island here and as you can see the this the water is a little bit higher than the border of the island so if you try to move a single point in this PL in the z-axis you cannot do that because in the ocean we can only change the height of every point at the same time so let's select the water Body Ocean here and let's change the height of everything just a little bit down here little bit more there you go and now let's select a point and put this a little bit closer Maybe here and okay as you can see now it starts blending between these two now we just need to hold out and move to create another point and we need to do this around the island the entire Island so this is a little bit time consuming so I'll be speeding up this part and as you can see we have some weird things change uh Happening Here in the blending between these two we're going to fix everything here but first let's add all the points that we need so let's go for there you go as you can see I added spline points all around the island here to make the shape but in some parts the blending with the landscape is not that good the water is not blending very well with the island as you can see in these parts here and the deformation on the landscape it's not that good so let's change some settings to fix this so let's select the water body here let let me go to a place where I can show you this better maybe here and here in the details let's go to terrain the water height map settings let's open this and let's go to fall off settings let's enable this so for now the fall off mode is angle so if you decrease the fall of angle here as you can see the deformation will go further into the landscape as you can see and this actually fixes this problems here so as you can see this is going a little bit down so if you want you can increase the fall off angle here to make a better blending with the landscape as you can see and we can change the mode here to width it's basically the same thing but with the Fallout with it with it so if we increase this we kind of fix these issues as you can see and the deformation we go further into the landscape as well so let me just increase a little bit more here I think this is good and the edge of set is basically where the deformation will start so as you can see we have the lines here from this planine and basically 100 units from this the deformation is starting so if I increase this as you can see we are shifting the deformation further into the landscape so I'll leave this as a th for now and the Z of set basically shifts the the height of the landscape close to the water as you can see we are increasing the height here let me decrease so you can see there you go and we can increase this a little bit let me do maybe this there we go and as you can see this fix a little bit of the issues with the blending in the water in the landscape as you can see now the water is blending better with the landscape um but as you can see in some parts it's not very good like here the blending between the water and Landscape it's not very good so first let's increase the depth of the ocean if you go underwater here as you can see the depth it's not that much we Lo lost all the dep that we had before in the landscape so to do this I'm actually going to disable the water here the only the rendering so let's hit this ey here to hide the water there we go but the all the deformations is uh enabled and now let's select the water the water body here and on terrain curve settings we have the um Channel depth this is the depth of the ocean here so if we increase this as you can see we increase the depth so I'm going to increase this until the bottom of the landscape like here there we go and now the the ocean is a lot more deeper so let's enable again the water here and and there you go as you can see if I go underwater it's deeper but as you can see we have a lot lot of angle here in the landscape so I want to increase this a little bit further into the ocean here to do this we can addit the curve ramp withth if I increase this as you can see the ramp here is a little bit more smooth into the ocean as you can see so it's more like an ocean let's increase a little bit okay we fix a lot of the issues here with the blending but as you can see we still have some issues with this part here so what I'm going to do I'm going to decrease a little bit of the Z offet let me decrease this a little bit um let me see just a little bit more and there it go now it's blending better you need to play around with all the settings here until until you get what you want so let's go around a little bit more to see and now it seems that everything is blending well so this is basically the ocean as you can see okay so let's show the settings here so in the terrain we have the curve settings this controls basically how the water will work in the edges here so as I showed before if you increase the curve ramp here we basically smooth this transition from the top of the uh Island here to the bottom of the ocean if it decrease of course we make this a a lot sharper uh the channel dep basically controls How deep the water is but this don't go beyond the height map that you created so if you reach the lowest part on the height map you cannot go beyond that so keep that in mind when you are creating the height map and in the water height map settings and fall off settings we have the controls for the deformation of the landscape so if you increase the fall off width here as you can see we increase the deformation on the landscape and of course if you decrease this we decrease the deformation intensity basically so you need to play around with this values until you get something that you like and I forgot to say this before but we already added the shape of the water so now we can change the the interpolation between the points here from linear to curve so let's select a point right click and select spline points then select all spline points this will select all the points that we have in this spline then right click spline Point type and curve and there we go now we have um uh all the points interpolated as a curve as you can see so now the water is even better maybe you are having this problem where if I hit play here and go to the ocean you have collisions in the uh in the water and we don't want that of course so to fix this let's go back here let's select the ocean let's scroll down in the details panel until we find the collisions so in the Collision peret you need to change this to water body collision so this is the entry that we added when we click in that uh that log message when we added the plug-in into the project so is for that that we click on that to add this entry here so let's change to water body cision and now if we hit play here let me increase this tab as you can see we don't have collisions in the water anymore so if you are having collisions in any um water body in this plugin just change to water body collision in the Collision preset okay we added ocean into the landscape so before going to the lake and the river let me just paint some sand around the island here now the ocean is much better okay so now we can add the lake into the landscape so for that go to place actors and search for water and just drag the Water by Lake into the scene there you go and this is actually pretty similar to the ocean we have this plines here with this Pline points that you can manipulate to shape the lake and of course if you select a point hold out and drag you create a new spline point and same as the ocean we cannot change the height of a single point but we can change the height of the whole lake as you can see so let me place this a little bit down here and there you go for the settings it's basically the same as the ocean in the terrain here we have the curve settings that you can change for example the channel depth that is the actual depth of the lake as you can see it's not that much depth but if we increase this we can increase the depth let's increase a little bit here and let me disable the rendering here so you can see we have the edge here from the landscape and the bottom of the lake we can change this by changing the curve ramp width same as the ocean as you can see if we increase this we can incre uh smooth this transition here let me put the water back the lake and there we go we basically added a lake into the landscape same as the same as the ocean here let me paint some sand around the the edges here there we go now it's much better let me see it's preparing the shaders there we go we have a pretty cool Lake here let's try to add a river now to to add the river it's pretty simple just go to place actors search for water and you'll find the water body River just drag into the scene and another spline will be placed but this time we have um a line and the river will flow in the direction of this line as you can see and of course same as the lake and the ocean we can select individual points and change the position to shape the river and for the river we can change the height of individual points as you can see if we change the landscape will try to match this new configuration so for this I'm going to place the River from the lake to the ocean to show you the blending um so this is the first point on the on the river as you can see the flow starts here and goes all the way to there so I'm going to select the river let me rotate a little bit here and place inside the lake here and as you can see we already have a blending Happening Here looks blending is Prett cool so the water of the lake is blending into the river and start flowing here and now we can start shaping the river to the ocean so let's do this the me grab this point here maybe place somewhere here I think it's okay for now let's drag a little bit down this and same as the other ones we can hold out and drag from a point to create a new Point as you can see let me drag this a little bit down okay so I finished adding the points here so we have the river going from the lake here and Landing really well to the ocean as you can see Landing really well too you just need to place the last point on the ocean and the landing will automatically happen so now let's see how we can change values from for the river so if you select a point you'll see here under the selected points in the details panel and water you have this settings for the each points here so in the depth of course you can change the depth of this part of the river so now it's 150 but if we change this for maybe 300 as you can see the dep increase only in these parts the other Remains the Same you can increase the width of the river so if we put here maybe 3,000 as you can see in this part the river is more wide as you can see of course you can change the velocity of the water so if I put here 600 so you can see in this part the water is a little bit faster than the others as you can see as the river goes down and reach the other points the water is low is low to a bit so you can control this by this velocity and the audio is for playing the aios or in the river there you go and same as the lake and the ocean you have options to change how this spline will affect the landscape so if you go down to terrain you have the curv settings and the water height map settings this is the same as the ocean and lake so for this I'm actually going to change the depth a little bit to every Point here to 300 let me do this to better show you the other settings I will not do this for the less points but you can do it if you if you want to so okay the dep is a little bit bit increase now let's select a point here and as I mentioned before in the other bodies if you change the curve Hamp rth here in the curve settings in terrain you change how smooth the edges will be so let me increase so you can see there you go as you can see the edges of the river is a little bit smooth and I said this to select this point but this actually affects the whole river not only a point it's the same as the other one so I'll not show you all the settings here because it's the same so this is basically how you can add a river in the landscape with this system let me give you a quick tip here so if you have problems with the edges of the river not Landing very well with the landscape I don't have this here to show you but if you do have this problem one thing that you can do to solve this is select the river then you need to go down until you find the material for the river this one water material then you can uh click this folder here to select this material in the content browser here and this is the plug-in material so we do not need to change this we don't want to change this we need to make a copy so I already created a folder here in the content called water so I'm going to drag this into water folder and copy one here there go let's change the name to Mi River and then let's replace this water material with this one there we go and now we can open this to change a value here so as I as I said before I don't have this problem here but if you do you can scroll down on the material until you find the um opacity mask for now this is only -24 this is a little bit um lower so you can raise this a little bit like um minus um 80 or something like that and this may solve a little bit of this problems with the blending between the O uh the river and the landscape let me show you how you can tweak the colors of the water so for this we need to change the material for the the water bodies here so let's start with the lake so I'm going to select this body then scroll down until we find the material for this the water material let's click in this folder here to select in the content browser and this is the plug-in content so we don't want to edit this so let's make a copy here I already created a folder in content called water so I'm going to drag this into this folder and copy here don't move copy and now we can rename this let me put in my um Lake and we can replace this water material with this copy now let's open this let me put this to the side here so you can see and we have a lot of settings here so for now I'm just going to talk about the colors here so the absorption and the scattering if you enable absorption and change this color this is basically the color of the water so if I put makeup pink here there you go we have the changes in the color here as you can see and of course we have this cing too you can change this but I changed the qu here so it's not much that change as you can see can make it more bluish there you go and like this you can change the colors so this part here is the blending between the river and lake so you need to change the color of the intersection material let me show you this so let's save here if you select the river you'll find that we have a lot of materials here we have the water material this material of the river this is what we need to change to change the color of the river and this this is the river to Lake transition this is the material that you need to change so let me show you this let's uh select the water material here so this is the content material the plug-in content material so we need to make a copy of this let's do the same here let's put in the water folder let's copy let's go here let me rename to M my River there you go and let's replace here and we can change the colors as the other one so let me open the material let's go down there and absorption and scattering let me change to maybe the same one here and the blueish here let me save and close and as you can see we changed the color of the river but we didn't change the transitions so that's why we need to make a copy of the this material as well so River to Lake transition let's select this and now we need to make a copy of this so let me drag into the water copy here let me rename to Mi uh River Lake transition let's replace here and let's open to change the values so let's go down absorption and scattering let's change here there you go as you can see now we change the transition as well let me save there we go let's go down here to make the same for the river to Ocean transition so we need to select this in the plugins we need to make a copy here and now we can rename this Mi I River ocean transition let's replace here and let's change the values let's go down here absorption and scattering let's make this pinky there go and scattering a bluish like this let save and close and of course we need to do the same for the ocean as well so I already copi the Ocean material is this one so let me open here and change the values so let's go down here let's enable absorption and scattering and change the values okay so basically this is how you can change the colors of the ocean here okay so I reset the cols here to show you how you can play with the waves here so let's select the ocean let's scroll down here in the details panel until we find the wave section wave Source water wave asset then we find the gal asset so let's click here in the folder to select in the content browser and again this is the plug-in content so we need to make a copy let's go to the water here and let me drag this into this folder and copy here let me rename this to only waves ocean and now let's replace there you go now we can open this and as you can see we have values here that we can change so let me collapse this one so it's better for us to see so in the default here we have first the number of the Waves so this in if you increase this this basically increase the number of the waves in the water as you can see or you can decrease of course let me reset to 16 the seed basically generates a new um shape for the oceans here for the waves and the redance basically makes everything random in different with different values here as you can see let me reset this again to zero there we go in the wavelength we have settings to change how big the wave is in the plane not in the height so if we increase the max wavelength here as you can see the not the height is not change only the length of the the wave in the same plane so if we decrease this I think you can see this better as you can see this is what it looks like and of course we have the Fallout for that the fall off there we go let me reset this back to 6,000 and then we have the amplitude this is basically the height of the Waves so if we increase the max amplitude here as you can see we basically increase the height of the ocean and of course have the fallof as well as you can see let me reset this values again we have the direction this is basically the direction of the wind in the waves here so you can change this to match your s in any direction here by changing the dominant wind angle there we go let me reset and the steepness basically changed how the edge edes of the Waves will look like there you go you can play with these values as well so this is basically how you can change the waves in the water and this works the same for the lake because the lake has um a wave asset as well and that's all for this video I try to show a little bit of this water system um there's a lot more to cover but for this video I think it's good I try to show a little bit of the ocean the river and the lake how you can add this and that's basically it but keep in mind that this is in experimental so things may change in the future and some bugs may occur for you so this is not recommended to use in a production game but we can start of course learning with this so if you do like this video please hit the like button and subscribe so you don't lose any new com content as always thank you for watching keep learning and I'll see you in the next video
Info
Channel: NoWhere
Views: 489
Rating: undefined out of 5
Keywords: unreal tutorial, water tutorial, how to add water, unreal engine 5
Id: 5b6yx3FHz9A
Channel Id: undefined
Length: 36min 6sec (2166 seconds)
Published: Thu Feb 22 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.