How to use the new Foliage Shader?


Just a short question:
How to use the new Foliage Shader in 4.7?
What Map i need when i bake in Max, and how to plug it into the Material?
Is there a Tutorial?
At the moment my Grass has: Normal, AO, Diffuse.
So can i work with this?


Take a look at the materials in my free vegetation pack -> [FREE] Foliage Starter Kit - Community Content, Tools and Tutorials - Unreal Engine Forums :slight_smile:

Otherwise (dont know if that’s a 100% correct setup :D):


Thanks for your answer.
Your Shading Model is not set to Subsurface.
Is that important?
And whats the different between Subsurface and Subsurface Profile.

My Grass is Grey when i set it to Subsurface or a mix of Grey and desaturated green.

Why do you want to use subsurface? ^^ -> you should use the two sided foliage shading mode (that’s the new foliage shading system)
It’s grey because you have to connect your diffuse map with the subsurface link to give it a colour.

Subsurface - Subsurface Profile**
The ability to rendering realistic looking human skin is a must for any modern Video Game engine. To fulfill this need, Unreal Engine 4 (UE4) now offers a shading method specifically for skin or wax like surfaces called Subsurface Profile. While the Subsurface Profile shading model has similar properties to the Subsurface shading model, its key difference is in how it renders. SubsurfaceProfile uses a rendering approach that is based in Screen Space because this helps to better display the subtle subsurface effects seen in human skin where backscattering is a secondary effect only seen in few cases like ears for example. The following document will cover the what a Subsurface Profile is and how you can use them in your work.

I saw some Grass Sampls of Ulrich here in the Forum using SSS. And it looks amazing O.O
So i want to use it too ^^ In 4.7 it should be easier?

You can do it with the way from Ulrich, but that was made before the new foliage shading mode was released :wink:

Yes, so now it should be easier? :smiley:
But at the moment i dont know how, here is my very basic material:

As I mentioned above -> connect the base colour texture sample (diffuse) with “Subsurface Color” :slight_smile:
Now it’s not easier, but you will get a better result ^^

Oh, now its not grey anymore Thank you ^^
A friend of mine tells me that i need a subsurfacemap which is a black/white map and white stands for translucent.
Would that be better for the Subsurface Color Slot? ^^

Because the Grass looks the same now.
Maybe i need to Build the Lightning… ^^

With a SSS map you can decide where the “light” should be abel to pass through the mesh/texture -> with “opacity” you can control the strenght of the SSS effect. The best way to see this effect is, when the sun shines on the mesh from the back side :slight_smile:

Yes that i mean :slight_smile:
So i try a Baked Out Highlights Map for the SSSlot. Or maybe a Gradientmap where the Peak of the Grass is white and the rest black O.o

Ok, so when is set a gradient map whit white color on the peak, the whole grass gets white on the peak. I plugged it into the Subsurface Color Slot, but that seams to be wrong ^^

You will have to create a combination of a lerp + your sss map (mask) + constant vectors -> plugged into opacity :slight_smile:

Hi guys.

I made a quick video showing the new shader. It’s set up pretty much the same as how fighter has set it up.

There’s a fundamental flaw in all these shader setups as you have your bark/twig part of the texture pumping into the Subsurface color slot. Only the leaves should have light passing through them. On top of that; leaves have veins which do not allow as much light to pass through. So the new foliage shader needs a new mask added into the equation. The only problem is I don’t know how to set it up properly.

Does anyone have any ideas?

Hey guys,

I actually just posted a new tutorial on the Wiki page for how to create a simple two sided foliage material. It uses the starter content static mesh ‘SM_Bush’ and is a simple tutorial to follow.

Two-Sided Foliage Material Tutorial

Wiki User Page

My user page has links to other tutorials on the Wiki I have written.

If you guys have any questions or need more help, please let us know.

Thank you,

Andrew Hurley

You’re supposed to leave the non-light-passing bits as black in the sub surface texture.

Nice, thx for the tutorial :slight_smile:

You can read more about Subsurface Profiles and what they do here…