Koola's vegetation material setup?

Hi.

Found the solution to my issue.
You can see the answer on the link or at the bottom of the thread.

https://answers.unrealengine/questions/201155/foliage-issues-bug-or-no-bug.html

OLD POST

Im trying to find infromation on what the materials setups look like in koolas work.
However it appears finding this information fruitless.

I was hoping to use the Lightroom example but alas. Its only available for very old engine buils.
Anyone has any idea how the trees are achieving their look?

My vegetation materials look pretty weak. SSS doesnt appear to support shadows and well… yes.

I dont know which setup he used, but try the new foilage shading mode -> under the blend modes you can change it. :slight_smile:

I’m pretty sure I read in a thread on these forum that he uses the foliage shading mode with the diffuse map plugged into the subsurface pin.

Maybe i am missing something then.
Light is hitting the surface directly. But it renders as if being a backface.
The red is SS colors for demonstration purpose.

66dc632f0463a604b2439894e1ddfeb5de6f3db2.jpeg

As you can see here. My normals are 100%.
What am i missing?

170504901e1fad8785b514dca7d63f2ab5ca3d0b.jpeg

I did a buffer visualization of the normals and although in the mesh the normals are correct, in the world, the world normals are all buggered.

ok. so after more testing i discovered two things.

1:) Two sided planes do not work well. How people do vegetation with it… is beyond me.
2:) The Foliage subsurface shader is not 100% there yet. But im confident it will be addressed in future updates.

Conclusion.
Double the amount of verts is a worthwhile workaround until the normal flipping issue is resolved and the SSS is improved.

Two sided planes on the left. Actual doubled up on geometry on the right.

Just for clarification, when you say “Double the amount of verts”, do you mean use more vertices in each leaf face? So, subdivide the faces to add more tris? Just want to be sure I’m understanding you properly. Also, are you using billboards for the leafs, adjusting actual faces to face the camera, or just dropping a ton of leaf faces at random rotations? Thank you for sharing your progress. Cheers,

J^2

Kinda weird conclusion, to be honest.
Two-sided planes works good and foliage model of course could get some fixes, but the problems it has is beyond your issues.
Your hack is simply unnecessary and new updates won’t do anything for you

Also, it’s hard to say what exactly is off in your setup, because we can’t see it, but something is definitely off.
Here is basic setup

Comparison of 2-sided shading(Backface normals are “real”, we get shadowing and stuff) and foliage shading(Backface normals are flipped, we don’t get lighting difference between face and backface. When Directional light kicks in we get subsurface scattering, nifty lighting at mask edges and so on, but normals are still flipped)
v=trvdMJxEKbI

On the two sided material version, did you multiply the normal map with the two sided sign?

I made a duplicate of all the leaf geometry and flipped them. They are all random. Some of them are pointing to the ground.

Nothing strange

I do not have a normal map.

I plugged in a twosided node on the normal. And it looks better. But its still pretty bad.

Without. Left is single planes. Right is double sided geometry.
First screen is without. Seconds screen is with.

As you can see. Double sided geometry shading is 100 times better. Unless we count leaves then its like 9 times better.

Turns out the shadows are supported. Just saw them in the realistic rendering demo.

Hi. Just reporting back here with the final verdict. Also updating first post.
Andrew from epic was kind enough to explain that normals are used for the light calculation. As in normal maps.
Due to my mesh not having had any normal map plugged in… it could not do the calculations correctly.

So i just used a 3vector… well actually a vector parameter for the normal map.
This resolved my rendering issues and thx to this im already seeing a nice performance increase on my maps.

So this was an oversight or lack of knowledge on my behalf.
Here is the result using single sided geometry.

Oh yes. Untick the tangent space as this can cause some issues.
You can see the answer here
https://answers.unrealengine/questions/201155/foliage-issues-bug-or-no-bug.html

Thank you for letting us know about it. I’m curious when you say:

How come you got a performance increase by plugging a flat normal color into the normal map slot?

Cheers.

Hi.

Its not that im using a flat normal that’s giving me the increase in performance. Its due to not needing double the amount of leaves or branches to render the tree correctly.
So im back on 800 polys as opposed to 1600.