Self Shadowing on foliage

Is there a way I can turn off self shadowing for foliage.
Here is what i am using to fix the self shadowing :

but this brakes when when my character passes over it:

the foliage is glowing because of the emission.

All of this starts because of self shadowing, because if I don’t use emission to cover the shadows this is how the foliage looks like:

Mu question is is there a way I can turn off self shadowing for foliage but still be affected by other objects casting shadows on to it?

Thank you in advance :slight_smile:

The solution to this is generally to point the vertex normals of the grass in the same direction of the landscape under it. That way, they will always be lit consistently with the terrain.

You can do this a bunch of different ways, if you’re using an RVT you can capture the landscape normal and use that as the world-space normal output for the grass, or you can just use 0,0,1 as the worldspace output of the grass but this means the normal is always pointing straight up so you might get undesired results on grass, another option is to just manually point the vertex normals up in your modeling software before exporting.

1 Like

How would I capture the landscape normal?

1 Like