[Closed] [Request] Foliage Lighting
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:
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.
The question has been closed Jul 18 '14 at 04:09 PM by Tim Hobson for the following reason:
Archived post generating comments
just wondering if you have tried to use the backfacing option in the material properties? that should at least get rid of your black backsides.
You're right that we have no good way to light two sided foliage right now. This is on our wish list and I hope we can get to it soon. It will probably have to be a foliage specific lighting model since we can't support custom lighting with deferred shading.
hello i found a cool way to solve this, you can check subsurface but limited to use just only a color in the ss material input and another const value for opacity, the result es great for me, and the shader still cheap!
answered Jul 18 '14 at 04:06 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here