For past few days I’ve been trying to get nice material for foliage lighting that will work good regardless of lighting conditions (from bright light to pitch black).
Unfortunately without much success. I’ve been trying various methods along sub surface lighting, but to be honest sub surface just doesn’t fit lighting and more importantly all lighting modes currently available are far to dependant on normals orientation of mesh.
Here is what I’m talking about:
I know exactly where issue is, so that is not the problem. The issue lies in normal orientation of planes. But believe me I have spend last 3h on fixing and repositioning normals of planes on this grass, and no matter what the results where not what I expected or wanted.
My expectations Foliage Lighting mode:
-
Uniformly lit.
-
Lit. That means when it getting darker the grass is darker because it receive less light. I looked at tree from Blueprint_examples. They are using emissive which is in that case unacceptable.
-
Should receive shadowing from other meshes.
-
Support subsurface scattering (although I could live without it for foliage, it could add nice variation of lighting for outer branches).
In UDK custom lighting input practically solved issue of non-uniform lighting, wrong normals, dark backfaces etc. It was simple matter of reconstructing phong lighting using light vector, and adding any customizations along the way. It was
Reintroducing custom lighting input is probably out of question, due to entire engine using differed rendering, but it would be very, VERY useful to get lighting mode specifically designed for foliage.
Just to be clear. I browsed trough provided foliage examples, and they are not fit for real use case with foliage that is mainly made of planes.
Subsurface is good for meshes that have some thickness to them and are thick enough to do not transmit enough lighting to lit surfaces behind them, or lit them very very dimly.
Leaves, grass and and other very thin foliage, are thin enough, that most of the lighting pass trough them unchanged (at least that what human eyes see in broad view).
This is the reason why, uniformly lit foliage is better. It’s cheap and it is doing pretty good job of approximating the light transmission on leaves/grass. Sunlight just make the meshes in front and them brighter as well case cast shadows on meshes behind but doesn’t affect the backside. In result we have nice uniformly lit tree with self-shadowing.
The tree in blueprint_examples is using Emissive to simulate the effect of uniform lighting. Which in most cases is out of question due the changing lighting conditions (night/day/etc), and mesh in result is always lit the same way.
The grass have the same issues as mine. Though they are best visible when you start mass painting grass. It changes shading drastically depending on angle you look it. which is not even how grass in real-world behave.
I looked in UDK Foliage sample, and even there all thin foliage used custom lighting mode (;.
Sorry for long post, but I feel I had to made my point very clear.