Foliage lighting

We all know getting lighting to behave decently with two sided materials is a pain to say the least.
There are numerous of workarounds that looks okay but none of them gives a very good result and because of that more or less all foliage in the engine have to suffer or double their polycounts.

SSS looks good but can’t be used too much due to performance issues. Two sided sign can be used to reduce the black backfaces but it’s still not ideal. There are other ways of doing it, all of which gives okay results at best.

This is all known but I just wanted to get some clear answer on: is a better lighting model for these kind of assets is being worked on?
Epic have mentioned it could and might(?) be done but as far as I know they haven’t said anything definite yet(?)

Foliage is such a huge part of many games and because of these issues the engine might be seen as inadequate in some people’s eyes compared to Cryengine, that better handles lighting for these types of assets.
It’s also really bad publicity for IDV and Speedtree, as the top quality they are known for isn’t really given a fair chance because of engine limitations.

I think it’s a tiny thing that greatly would benefit the engine and it’s users and I don’t think it would require too much resources and work to get it done (just talking out of my ***, I have no idea how hard it would be but seeing as it have been done in numerous of applications It doesn’t seem like it would be an issue).

Yes, I am sure many of us would like to know if anything is being pursued in this area. Foliage is a pain right now.

+1 - I’m sure they are aware that we all aim for better foliage, and I really hope Epic works on something about foliage! Our maps consist more than 50% of foliage XD

Same here, our map is covered to probably 80-90% in foliage that are all botanically correct for the area of which the game takes place, we really put a lot of focus on this so it’s a bit disheartening when it all looks kinda **** because of the lighting issue.
Really hope we’ll see improvements in this area as soon as possible, it’s kinda hard to work on the foliage at it’s current state.

Mind posting a screenshot?

Sure, I’m at work at the moment but I can post one once I get home as long as I remember.

Yeah…would love to see some screenshots! I mean, its not perfectly ideal yet, but its far from being really bad as well. We managed to get foliage to look quite nice on DI2. When you look in the work in progress section for the rain forest scene thread or the grass by Ulrich Tümmler, you should actually see that its not that bad :wink: So I would say its possible to achive very nice looking results even with the systems in place as they are right now.

Sorry guys I forgot to take the screenshots.
I just wanted to bump the thread to see if we can get a response from Epic?

The answer is. “we want to do it (along with **** ton other fancy rendering stuff), but all our rendering guys are working on multi threaded renderer”.
And unfortunately there are only 4 rendering guys working. While more people probably wouldn’t help with multi threaded renderer, it could help will implementing fancy features.

I say, if there is anyone good ad graphics programming, he should jump on topic :D.

They better hire more people then.

A bit late to the party. Our art team is suffering similar issues. Credit to Epic though, they sent a tech artist to us to see the kinds of issues we’re having, and while it seems they can’t promise definite dates for this kind of stuff, they’re certainly aware that foliage shading and performance is in very high demand.

Good to hear! Hopefully we’ll get some answers in tonight’s stream.

It seems everyone on this forum is talking/complaining about bad foliage/grass but I can’t find any ref pics where all these problems would be indicated. Even in this thread hasn’t posted any pics yet.

Check out this old thread

Thanks, but I’ve already read that thread. Unfortunately that discussion went another direction. It’d be great to see a list of things you actually want improved/changed/added instead of just writing I want grass/foliage to look good.

Problem with grass is well known and guys from Epic team said what exactly should be done before in order to fix grass shading. Basically we need unique shading model for “thin” objects like grass, leaves etc and forward shading rendering support for this model. They are working slowly towards this goal and you can find some stuff about this in Trello.
Point of this thread - to remind Epic team, that’s we are still waiting for this important rendering feature!

Are you sure about forward shading for grass, leaves etc.? As far as I remember, latest Cryengine renders vegetation in DR pass.

It looks like its coming in 4.7 (not sure why it says ‘Done’ though)

I’m happy that they’re giving foliage features some love.

Here’s another trello card that should be interesting.

Change 2353634 on 2014/11/07 16:51:21
TwoSided Foliage shading model
* Diffuse lighting on the opposite side of the leaf becomes subsurface lighting on the side being shaded. SubsurfaceColor filters this lighting and can be used to represent varying thickness as well (leaf veins). Subsurface lighting is a mix of wrap-around diffuse with a directionally dependent lobe.
* Opacity only affects shadow falloff distance

There’s now a two sided foliage shading model, this will be in 4.7. However, we’re not completely happy with it and it needs some more work.

Basically all light sources that affect one side of the leaf, will contribute to the backside as well, filtered by SubsurfaceColor. The normal of the frontface is taken into account, unlike the Subsurface lighting model. So SubsurfaceColor is where you put both the leaf vein occlusion and the scattering color inside the leaf. Opacity is only used to control how far light penetrates through the material when using dynamic shadowing methods. It’s not very physical but it gives a nice impression of light bouncing off of the first few layers of leaves.

For punctual lights (directional, point, spot) there’s also a view-dependent lobe, so that if you look straight through the foliage at the light, the subsurface lighting gets brighter.

Note that lightmaps are supported on instanced meshes (foliage) in 4.6 and now Distance Field dynamic lighting methods (shadows and AO) support instanced meshes as well, in 4.7.