How to make Stylized Grass in Unreal Engine 4/Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] first [Applause] [Music] we're going to start in blender by creating the mesh for the grass so delay is the default cube with the light and camera are the plane we're going to rotate it and move it up scale it down and i'm going to shape this into one simple blade of grass now i'm going to explain this because later when we apply wind in unreal engine i don't want to bottom part to move so go to vectorx paint select black and fill the whole plane with the black color that means this is all going to move now select white and paint just the bottom also i want to gradually make the wind to go up so select gray and paint the upper part i'm going to move the origin paint to the bottom so i can rotate it from the bottom and now we can start making the grass mesh [Music] after you finish the mesh and you like it to go and join all of the planes together to make the double sided mesh select the grass duplicate it go to edit mode select all of the duplicate go to alt n and flip now just go back to object mode and join these two planes together and to achieve good lighting in the underground engine we are going to fix the normals so go to edit mode select all and to see where the normals point go to overlays and select this display split normals now before we are going to fix them go back to object mode select all and apply all transfer now go back to edit mode select all go to old n and points to target now click and every normal is going to point to 3d cursor now we want them to point up so go to the left and change the z value to some high number now everything is pointing up and we have fixed the normals the last thing we need to fix are the uvs so split the viewport go to uv editor and select the mesh go to edit mode select all and go to uv and unwrap now we are going to fix two things and that is the position of the uv and the rotation of the individual planes so select uv sync selection go to wireframe and select just the bottom vertices so every plane with up vertices we need to rotate so go and dislike all the down vertices and now select all of the planes with the top vertices and rotate them 180 degrees okay so now we are going to fix the position of the planes so select all of the ones and move them down here on the line [Music] now just put them closer to the middle and scale them up okay so now our mesh is ready to be exported to anal engine so just go to expert fbx and in geometry select the face instead of nerd mouse only and export when you import your mesh in the fbx import options i want you to go to the mesh and in the vertex color import option i want you to select replace instead of ignore in the unreal engine all i created is a basic light and the landscape when you drag your grass into the landscape you can see that it may be a little bit big so you can fix it just going back to blender and reinverting it with the smaller version so just go back to blender and scale it down and now you can reinvert it and you can see it's smaller now now we can go and create a new material make a material instance open the stylized cast and take the material instance and plug it into the mesh now i'm going to also disable cast shadow and save now let's open the material and we are going to create the base color and plug it into base color we're gonna set the specular to zero and roughness to one okay so the first change we are going to do is to make the gradient to go from the one color to the another from down to up so let's find an linear gradient and create a second color now we are going to add the larp node and if we elect these two colors with the gradient as an alpha and we are going to use v gradient because we want to use the gradient from the down to top not from the left to right so direct v gradient alpha and drag it to base color and when we do that you can see that we have gradient but i want to also control the gradients so we are going to back to the material and add a multiply like this to multiply and create a constant plug it to multiply and convert this to parameter this is going to be gradient strength i'm gonna set default value to one and i'm also going to convert the parameter these two colors now if we plug this into the alpha and save this and open material instance you can see that we can change the gradient but instead of getting the black color i want to get this green so let's get back into the material and add the such rate note and if we plug this to the alpha and save this you can see that we no longer have the black color so i'm going to set this to 1.2 for the example now we are going to create a variation color for this grass and we are going to need this variation texture and we are going to create a new color for the variation color now we are going to need to like these two colors with the lag note and we are going to plug the gradient to the alpha now we are going to create another alert and lock these two layups together and as an alpha set this texture now plug this into the base color and we are going to have this texture applied on our chaos but we want to use it as a global texture at the world position but we can plug this into uv because the uv is just the two dimensions u and v we're gonna need to mask this out with the mask node and set it to only rng we also gonna want to control the size of it so search for the divide note and add the constant convert this to the parameter and this is going to be variation texture scale and i'm going to set the default value to 20 000 now we can see that we have some variation in the graph and we can control it in the material instance i'm also going to convert this colored parameter and this is going to be color variation so in the next step we are going to add a wind so search for the simple grass wind and we are going to create an infer constants and we are going to convert them over to the parameters and plug them into these outputs and for this last constant we are going to plug it in just like that because we are going to change this later now just plug this into world position offset and now if we enable everything in the material instance and change this to one you can see that every grass is moving and i'm going to change the parameters a little bit and now you can see that our grass is moving but also the bottom part is moving and that's what we are going to fix now so go back to material we are going to add in vertex color which is the color that we have painted in a blender and we are going to add in large and we are going to alert the wind with the constant and as an alpha we're gonna use vertex color and plug this interval position offset and now we have our grass not moving at the bottom so for the next step we are going to add in wind lines and we are going to need this texture now we want this texture to be applied on the whole world like this texture so we are going to just copy this and change this constant we're gonna rename it now we're gonna add an new color for these wind lines and we're gonna convert it to parameter this is going to be wind line color and we are going to layer with these two colors and use the gradient as an alpha now we're gonna learn these two larps and as an alpha we're gonna use this texture now you can see that we have these wind waves and we're gonna make them move so go back to material and we're gonna add and pan air we're gonna apply this coordinates to the coordinates and this to the uv and now we're gonna add two constants which gonna represent the speed of the u and speed of the v and we're gonna convert them to the parameters so you can change them later in material instance so this is going to be speed u and speed v and we're gonna append these two and plug them into the speed okay so now in monte carlo instance we can change the size of the lines and we can also set the speed of the lines and i also want this waves to be moving with the wind i'm going to multiply this because i want to control the density of it and i am going to plug this into additional vpr and convert this to the parameter and that should be it for the material for now now i am going to play with the settings and see what i can create okay so this is it for this tutorial in the next one i will show you how to blend this grass with landscape using grand theme virtual texture and i will also make a video on how to make these two textures so if this video was helpful leave a like and subscribe thank you for watching and bye bye
Info
Channel: Marpy
Views: 131,832
Rating: undefined out of 5
Keywords:
Id: FT-QfuzoQEk
Channel Id: undefined
Length: 11min 50sec (710 seconds)
Published: Wed Jul 14 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.