Nature Environment in UE4

An early version of it is already on GitHub if you want to try it out! Here it is:

https://github/EpicGames/UnrealEngine/commit/ce1ba4c9537e72c0ef9397d696be15a24e841c80

Oh, didn’t notice that. Great, thanks!

Pffff, i just using “Unlit” “Shading model” in Material for grass. :smiley:

That must look horrible. :wink:

Hah, but it solves problem with weird shading - everything is unified! :wink:

You could just make the vertex normals point up.

Yep, was mentioned multiple times in thread

I’ve been following thread for a while so thanks for all the help with plant shaders. forum is the best resource I’ve found on the subject.

I’ve looked it up but I’m still a little confused about what vertex normals are and how they work.

I was trying to fix a tree I made in speedtree by changing the vertex normals in Maya. Are these the same vertex normals you’re changing in UE4?

Do the vertex normals only control how the normal maps handle the light or how the entire mesh does?

The normal shows the direction of a vertex and defines what is front and back of said vertex.
Graphic-cards work the way that everything between the vertices of a polygon is interpolated…like color (dx-triangle…here each vertex has either R/G or B as vertex-color)
or the normal. So there is only one normal-direction(vector) for each vertex. I think other stuff than lighting is affected…a direction may be used in many ways like … in which direction a displacement takes place.

Thanks, That helps a lot. Can you actually change the normal inside UE4 or just call it?

Edit: One more question. Is there any way to cull a material if it’s completely transparent. Like if I wanted to make grass die could I make it completely transparent and then cull it as a foliage instance. I only ask because the more transparent a material is the more overdraw it has.

I found a boolean “hide in game”-variable in each component of a foliage-actor…and an index-number.
Someone else has to jump in for the other question though, sorry about that.

I’m getting about 40-50 fps and I kept my opacity down to a minimum.


9bb7d15eb0c9243e656d47754806de5372e0879d.jpeg

Let me tell about grass disappearing.
My simple “grass disappearing” material, like Z-buffer:

&d=1416697831

&d=1416698736

Is still available anywhere? Link is dead for me.

Why not use culling instead? Having more opacity to calculate isn’t optimal.

Well apparently the foliage shading model is done and ready for 4.7! yay :slight_smile:
https://trello/c/pDVTghVt/455-foliage-shading-model-done-4-7
I hope it will be useable for normal static meshes too, not just meshes placed with the foliage tool.

AntonioModers solution seems really counterintuitive to me as well.
Perhaps it will be possible to have the grass far enough into the disance with the new shading model that it can just be culled directly without popping in.

What’s wrong with AntonioModding’s solution? I am using it, and it seems fine to me.

Unlit shading have no light .

With large clusters the culling can look quite jarring, when large swaths of grass disappear at the same time.

Can someone share grass asset with material setup just for educational purposes, my grass looks afwul =(