Hey everyone! I'm new to polycount and still new to Unreal so bear with me!
I'm having some issues matching my grass normals to the normals of my landscape, and all I'm getting is uniform normals everywhere. I have my grass distributed by my landscape master material and the normals of my grass mesh are pointed upwards if that's important? I'm also going for a stylized grass look similar to what's used in the Witness and Fortnite. I appreciate the help!
Grass Material Graph:
Normal Visualization:
Replies
You can also blend between the up vector and the original vertex normals of the foliage. The up vector would be used on the bottom of the grass, and the original one on the tips. Use lerp to blend between them. The alpha of the lerp would be the aforementioned y gradient.
Also, I went for a full stylistic style in that post, so I did not use such strong normalmap. In fact I didn't use any normalmap, which, I understand that it isn't always possible, depending on what style you are going for.
I'm referring to this picture:
https://us.v-cdn.net/5021068/uploads/editor/ii/9a1dwh3l3t5i.jpg
If it doesn't work with the transform node, try without it...
result:
Consistent shading on back and front faces...
This is the material:
World normal pass:
I didn't use a foliage asset though, I just dropped the mesh directly into the foliage editor. The 0 spec is not necessary, the result looks the same without that too.
https://drive.google.com/open?id=1OcPbHVgOgJ79G58SHWMlI0e1gXxzeNAf
You use a normal edit modifier to change the direction of all of the normals.
Its kinda hard to tell from the pixture but I have a punch pf them painted there. Tangent space normal is enabled.
I was skimming through this and read a comment about not having access to the normal of the terrain within the grass material.
That may be not be true.
First of, since .18 I have been manually pointing vertex normals up in my grass meshes. This solves most issues and makes for some interesting features.
Second, if you place the grass with the aligned to terrain option, the normal from the terrain is immediately accessible by sampling the objects orientation, which is the z vector.
From docs: "The ObjectOrientation expression outputs the world-space up vector of the object. In other words, the object's local positive z-axis is pointing in this direction."
This should get the normals to start with the correct angle from the terrain and drift to their proper value. Similar to what you get when you manipulate the vertex orientation in a DCC before import...