Best Way to create foliage-grass ?

Which is the Best Way to create grass ?

  1. Foliage-Cards

Ive been using this technique for my landscape, im quite new to the engine. Ive heard that using this method increase overdraw? because its also rendering the object behind(?).

  1. Using geometry

Ive watched some videos about this one, which is considered as better way to create foliage instead of using card/opacity. Even tho this one technically better, my viewport is smoother when using the opacity method, because of less vert?. also when using lods, people tend to use cards for their lowest lod, if using opacity really that bad then why they use it as the lowest lods ?

#0
This unrelated to the topic, but is it okay to not use square UVs ? ive seen people use a non square Uvs. And i wanna know is it ok or not ?

Can u help explain which is better in terms of performances and looks. And maybe how to create those lods ?

It all depends on the peoject, art direction, and target environment.
There really isnt an A is better than B which is better than C scenario to be had.

Considerations on what and how where and when also have to based on desired gamplay elements; the ability to trample or remove grass at runtime for instance.

Graphic load wise, tris count has much less impact than drwacalls.
So, 1000 grass with 1000 drawcalls is going to cost just about the same no matter how you spin it.

Yes, Overdraw will increase material calculation complexity somewhat. This is:
A) easily avoidable now that the engine has ficed up the option/setting to reduce the cost by precomputing alpha.
B) not really a concern for grass, because being on the floor you have very little if any scenarios where grass would cause overdraw for the scene.
C) something that newer/more powerful GFX don’t really care as much as the older ones (rtx1060) used to care about.

On ther other hand however Tris count is a hard limit that impedes rendeirng any more objects once exceeded (and the limit depends on the hardware itself).

As far as UVs go.
There isn’t any way afaik to define them any other way but a square.
0 to 1 is 0 to 1, no matter what you may try.
You have a value from 0 to 1 on the U, and a value from 0 to 1 for the V which you can assing to a specific vertex for mapping purposes.

All this said, a properly created grass mesh will likely have (at a bare minimum)

An LOD0 with vertex and very little opacity.
An LOD1 with cards that mimic or convert as closely as possible from several grass blades onto a single sheet with alpha transparency.

Proper Vertex Paint applied to the asset which the engines will then utilize to apply effects (wind, displacement, whatever else).

A single material - because each material slot is a drawcall.

Rendering wise in most if not all engines you will have:

No shadow casting - because the amount of meshes casting and calculating a shadow edges on insanity.
Self shadowing is often faked using vertex paint or proper texturing.

Wind like displacement either done with Normal map panning over WPO or actual vertex displacement.

Ray scattering - the back side of foliage/grass will be lit and colored differently just like human skin or anything similar that absorbs light for lack of better terms (but also literal in the case of plant life).

The ability to be moved around on an axis via the material - this makes it so you can drag grass under the landscape based on distance from player, which will then also cause it to stop rendering and cost less.

And last but not least, the meshes themeselves will usually cover preset areas of
.25m^2, .5m^2, 1m^2, 5m^2.
Which mesh is applied by the artist will then depend on the zone they are intent on dressing. Slopes and hard transitions will require the smaller meshes, while the larger flat areas can utilize the larger meshes.

One could probably write 2 or 3 books on how to actually do it, and everyone’s project having different needs leads to very different solutions…

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.