Ive run into a problem with my grass meshes being that they dont blend well with the landscape, and form a sharp point of contact. In a forward rendering engine, I would generally just use a gradient in the alpha to blend the grass and landscape together seamlessly, but in Unreal it would be too expensive to use transparency and not masked for the grass. Is there any other way to get the grass to not have such a sharp contact?
I have already done that, but thats not quite what im looking for. That technique applies to the entire material (or where I specify) but I want just the base to somehow blend. Its not a color issue but more of an actual blending issue.
Well there really is nothing for it. The two meshes have to have a point of contact somewhere… The main problem I see here is that you are putting grass meshes over landscape material that does not have grass texture on. You can’t expect a magical blend between two meshes with completely different mats. Using alpha on grass to do that is the wrong way.
1, Change your landscape material so that it has multiple textures blending. Tons of tutorials on how to do that. You can’t miss this step as its essential for the realism of the scene. Honestly - just do it.
2, Then you can either use the new landcape features that populate foliage automatically depending on landscape layers OR paint foliage yourself where it logically should appear… grass on top of grass texture, rocks on top of rock texture… and so on.
The landscape does have a grass texture and a dirt texture, and Im using the grass node in the landscape material to populate the grass layer with the grass meshes, thats why you dont see it covering the entire ground in the picture. And as for the alpha method, it works perfectly fine and achieves the exact results I would like, its just not optimal for UE4.
I’d argue that if you had a proper grass texture on the landscape underneath the grass meshes, which you don’t have according to your image, you wouldn’t need to blend anything. Plus the alpha technique you are talking about may give you results that you’d like but goes against how this is normally solved.
I do have a proper grass texture
OK in the original image it’s not so apparent. Now go into your landscape mat and multiply your grass texture with a Constant3 that best matches your grass mesh mat color thus diminishing the sharp edge effect. You’ll have to experiment here a little to get a good match.
Also think about reorganizing your grass mesh to match your desired point of view. Is this a top down game ? First person shooter ? Your meshes will have to reflect that. Most games have problems with this area once you start getting the camera into extreme angles not originally intended.
The way my landscape material is set up is there is a macro detail texture that covers the landscape in order to add colour variation across the terrain and break up repetition, and then the grass layer texture is multiplied by that, and then the grass mesh material is multiplied by that. So in that picture above is about the best colour I can get with my current knowledge.
As for the grass angle, this is for a first person shooter. The grass mesh is just a flat plane and is most likely to get replaced eventually.