So i tried making my own grass, by baking grass from fibermesh in zbrush to a plane, then cutting a rough shape of the grass out and then intersecting multiple planes of grass in different ways, how ever it performed horribly, I was wondering how do people achieve optimal grass? i was going to try to take pictures of individual strands of long grass convert those strands to planes in blender then assemble the strands of grass into a pattern.
You cant do foliage like that in UE4. The renderer doesnt work well with transparency and overdraw.
Its best to make your foliage meshes be the actual grass blades. Yes, youll have millions of triangles on screen but the engine can handle that and you’ll haveno overdraw so performance will be fine
Using masked material and only evaluating mask in early z pass should do the trick.
That is a questionable advice.
You would choose between using grass planes with minimum number of triangles and enabling what Kalle_H suggested in a post above, or fully disable depth pre-pass and author your grass planes to have least possible non-opaque areas. Falling in between of this two choices usually yields performance issues or inability to maintain sufficient negative space and poor visuals as a result.
I just made grass via speedtree and the performance was so much better but now I’m having trouble bringing my pine trees down to 3k tris in speedtree. I think the pines are responsible for 80% to 90% of the total tri count as they are just planes. i think now the total tri count for a pine tree is around 9k-10k, which was an improvement from 30k. As soon as i add the trees procedurally my computer slows down considerably. Another problem is the pines on the tree look bad, and i do not know how to remedy the situation. I am trying to achieve a full but i do not know how this is done. I am trying to find a balance
We have used this kind of trick for optimizing trees. For mobile this make huge difference. Leaves are divided to fully opaque parts and masked parts. This increase drawcall- and polycount but you need to measure the benefits for you project.
Fully opaque parts are highlighted.
Kalle_H, is there a video or site where i can learn about this that you recommend?