I have been doing some work on a custom lighting model for foliage. Basically its an approximate SSS that can be used to give foliage more life without the impact of actually using SSS. Grass uses an even quicker branch, allowing for a lot more instances. The demo that I tested on had 116,000 instances of the grass, and about 500 tree’s, running above 60fps. This is still a work in progress and can be optimized even further, and made to look better.
My plan is to eventually submit this as a PR to be included into the engine so everyone can use it.
Some ideas of mine dont make it out of the testing phase, such as the metaballs. (But I’m always happy to give people the source of what I have done so far). But this is not one of them. The main reason I want to go the pull request route is because to use this in your project, you have to modify the engine source to include the new lighting model, will be easier on everyone if its integrated into the engine.
Sorry for the bad camera footage, Im not a very good camera man I’m still playing around with the grass, so what you see is not final. The grass model is the hero grass model from the SpeedTree grass pack. Bluriness is due to recording at 1280x720 and having TXAA on. Looks crisper at 1920x1080.
I already said it look very good, but would not hurt to do it again :D.
But I think it would be better if trees were more bright and less dark(shadowed, occluded ?), and ignore normals for shading completely. It might not be realistic, but could provide more plausible results.
Thanks everyone. Okay I am currently experimenting with a few settings. I am trying to reduce the waxy look they have. So the next set of screenshots are just testing, they may not look as good as the primary pics. I’m not satisfied with the results, but I wanted to get opinions of others. I do think the grass looks better, but I still have more work on the leaves.
and below is a video of me experimenting with back face lighting. As the light passes behind the object it reveals details as if light is passing through the object.
Are you sure that doesn’t have to do with the actual textures more? Either way, more options for users is better, I saw your video (if it was your creation) and I wonder how big scale would that setup work on with decent performance(?)
My own experience has been rather horrendous performance unless I use extremely simple setups for my grass and that is with just ~18000 instances of very low poly grass and approx same amount or a bit less trees (landing around 60 FPS as well) than Eham. Now I do not know what kind of hardware he has but I’m guessing it isn’t that far much higher than me (i5 4690k, 16gb ram, r9 290x tri-x). Personally I’ll take any possible way to improve my foliage performance issue.
EDIT: Just saw your last post, mind telling us your system specs Eham?
Same as what? As the default lit shader? Or a standard subsurface shader? If the second, then thats good, thats what I am trying to get to without actually having the cost of the SSS. I will get to some comparison shots and speed tests once I have finalized the shader, as you can see by my latest post, I am still in the midst of testing. So things are bound to change. As for the lighting used in the screenshots, its just an ambient cubemap. Turned off eye adaption. and used color grading (LUT_Daytime) and thats it, didnt touch contrast.
I have darkened the textures of Speedtree a little, as I find them initially too bright. Performance wise, As long as you dont go crazy with the tris, should scale significantly well. I would recommend no more than 500 tris for a patch of grass, this way I was able to paint 288,000 instances without a significant hit in performance.
I am testing on a i7 3820 (3.7Ghz Quad). 32gb memory. Nvidia Titan Black and AMD Radeon R9 290X