Download

Is it possible to adjut self shadow strength for objects? Foliage way to dark

I use dynamic shadows in the scene. Everything looks great, but the foliage is way too dark.
The foliage bush is made out of 4 faces and it seems to self shadow way too strong. The shadow on the ground is ok, but the self shadow is very unatural.

Is there a way to get the desired result in the example below? I could really use a “self shadow strength” slider for vegetation.

Actually you can do this with the skylight actor. It simulates ambient light that comes from the surroundings.
Edit: Or you can put the color texture to the emmisive slot inside the material editor and use mulitplier to “light” up a bit the material. I am talking about really small values. :slight_smile:

This is apparently not possible in unreal engine. I’ve made a thread about this a while ago and the only way I found to do this is like NasteX said, grab your diffuse, multiply it by a value between 0.1 and 0.4 and put that in your emmissive.

Try to use Two sided foliage Shading model.

If you use two sided foliage shading you can use opacity input to handle this.

I use two sided foliage, opacity seem to do nothing?

Already have a skylight. The problem is that the rest of the scene is ok. It’s just foliage that is way to dark. So I can’t really change any global stuff. Will try the emmisive trick though.

is your material Translucent or Masked? this would explain opacity seeming to do nothing

also are you using lightmass or purely dynamic lighting?

It’s masked. It’s 4 planes with a grass texture and opacity mask.
I’m using purely dynamic lighting.

Apparently foliage has no depth info, and I can’t use the opacity channel. I tried adding a dither to it, but I need to be able to turn it off at a distance since it looks weird further away.

I wish there was a “self shadow strength” for meshes. Foliage really needs that kind of setting.

Show your foliage material.

I think I found a solution that works somewhat. But you can’t tweak it further than the result in the middle without getting artifacts (right).

Here you can compare original and adjusted: Foliage shadow - Unreal Engine - Imgsli

Left = original
Middle = adjusted (fade = 1.0, emissive color = 0.0015, 0.015, 0.0)
Right = adjusted too far (fade = 0.8, emissive color = 0.0015, 0.015, 0.0)

e51b354bb5ff197196133c916f3dde6b9081dccf.jpeg

And here is what the material looks like right now.

966ed3809ea6a77d70d0272e50d36bc9523091e0.jpeg

You can fake it by multiplying the input to the “color” output by some constant, and routing that to “emissive.”
Note that this works well as long as you know how bright the general surroundings are. If you turn the surrounding lighting down very far, you’ll get glow-in-the-dark bushes.

I’m trying to go for some general approach that work in both direct light and in the shadows.

On a side note I changed the foliage mesh. The initial mesh was 4 planes rotated, and this caused very dark shadows in the center. Making two and two planes like in the figure caused the shadows to be more uniform.
And I think it looks better than the “rotated” approach.

foliage_shadows_mesh.jpg

Here is another example: Foliage shadow - Unreal Engine - Imgsli

In this all foliage has fade set to 1.0, and Emissive slot is (base color * 0.15)

You need to setup subsurface color for Two sided foliage shading model to work.

Thanks! I think that worked quite well.

That’s better than the hack :slight_smile:

Nice looking staging, too!
(Who planted those bushes to make a path?)

Yes, the sub surface node is the very essence of the two sided foliage shading model.

Just a note: More intersections at one point = more AO generated = Darker result.

Yeah, that’s what I learned. That’s also why it should (if it’s not already an option) be an option to adjust AO on objects. Fake objects like bushes tend to get way to much AO.