Foliage shading in 4.7

How do I correctly use the new foliage shading mode? If I just switch to the new model in the material things go weird, e.g. if I use the standard SM_Bush I go from

Default Lit


Foliage shading

How do I have to set up the material for this to work properly?

For the new shading model to work correctly you need to assign a subsurface color. Otherwise it just falls back to a grey/white color. That’s why your foliage looks partly grey.

Any examples of how the subsurface color should look like? Sample content showing this will be great.

What exactly do you mean? -> you could download my grass package from here (it uses the new shader setup) :slight_smile:

For starters you can your diffuse texture as an input for the subsurface color.

When I pipe white into diffuse and SSSColor, I still get a black material. I have it switched to translucent shading, and the foliage lighting mode is selected. What am I doing wrong?

I’m applying it to a single-sided sheet piece of geo as well.

Have you already tried it with the “opacity mask” shading? + post a picture of your material. :slight_smile:

I’ll post an image when I get home. Thanks!

I figured it out. I was selecting Translucent in the Blend Mode. It was just an automatic choice since I come from rendering in Vray/Arnold, and translucency is their description of foliage lighting. You should leave that setting to “Opaque”

Sorry we don’t have any examples yet, got behind due to GDC.

For two sided foliage:
Use Masked blend mode
Hook up BaseColor, Roughness, Normal, and OpacityMask like normal
Hook up SubsurfaceColor to filter the lighting on the backside of the leaf. Usually this is what you put into BaseColor but maybe with some extra saturation or darkening to simulate multiple light bounces within the material. Stuff like leaf veins darkens the subsurface lighting.
Hook up Opacity to control how much light penetrates through the material for dynamic shadows. Usually a value of .5-.9 works well. Don’t go near 0 or shadows will be gone.