The Elder Scrolls

A Review of Grass Performance Studies: Resolution, Overdraw, Poly Count, and Draw Calls

Content of the article: "A Review of Grass Performance Studies: Resolution, Overdraw, Poly Count, and Draw Calls"

There has been a lot of controversy on how to improve grass performance in Skyrim. Some of these theories have turned out to be true, others false. Here I will discuss the results of a well controlled series of performance tests.


RESOLUTION

With mip maps, the resolution of the texture doesn't even matter as long as you have VRAM to spare, your FPS will not be affected. Some may note that a lot of detail is lost in the mip maps. There are techniques to preserve detail, but these will not be discussed here.

Recommendations:

  • Use 1k, 2k, or even 4k textures if it's necessary to preserve the details of the texture, but don't be wasteful of VRAM.
  • Always generate mip maps for grass or they will shimmer horribly (due to aliasing) and waste extreme amounts of performance.

OVERDRAW

Overdraw is the process by which, during the rendering of a three-dimensional scene, a pixel is replaced by one that is closer to the viewpoint.

The vast difference in performance here is fascinating. The more transparent pixels on a texture, the more performance cost. The resolution of the texture doesn't even matter. Transparent pixels cost extreme fps.

Read:  Morrowind mechanics that should be brought back

Recommendations:

  • Use up the majority of the space in your texture, but not so much that the geometry of the model becomes very obvious.
  • Use an alpha test coverage near 1.0 for textures with thin grass blades so they don't become completely transparent in distant mip map layers. This will improve performance as well.
  • Use an alpha test coverage near 0.0 for textures with thick blades (such as for ferns), so the blades don't become a thick opaque block in distant mip map layers

POLYGON COUNT

Here I have created two grass models. The texture is identical. The triangle model has a large triangular UV map that captures the entire texture, and the rest of the triangle becomes transparent in game. The square model has a square UV map that captures the entire texture perfectly without any areas of transparency in game.

Fewer polygons is not necessarily better if it increases the amount of transparency in the model. In the above example, we have increased vertex count by 33% in the square model, but we saw a large improvement in GPU usage because we decreased overdraw. The question you should be asking now is, "just how much can you increase the vertex count before additional polygons become more expensive than transparency?" The results will vary across systems and mod lists. From my testing with Cathedral – Rocky Shores, which contains models that have no transparency and are placed only on the shoreline, I started to notice performance cost at grossly 250 triangles per square meter.

Read:  A Different Spellcasting System I'd Prefer in TES VI

Recommendations

  • For grass that is used diffusely across all landscape, I'd recommend staying below 50 triangles per square meter.
  • As a general rule, if increasing vertex count by x% decreases transparency by the same x%, then it is probably worth it.
  • Carefully map your UVs to minimize transparency

DRAW CALLS

A draw call is a call to the graphics API to draw objects (e.g draw a triangle), while a batch is a group of draw calls to be drawn together. Draw calls can become very expensive if you ask the game to render tens of thousands of objects. It was previously speculated that by increasing the amount of grass clusters and plants in an object file (.nif), then the game would need fewer draw calls to render the same amount of grass. However, this has been determined to be largely false for Skyrim grass, as the engine internally batches it all into a few parts for an instancing optimization. This has been verified through both extensive performance testing on my end as well as analysis of the world node tree by Prog.

Recommendations:

  • Do not add multiple grasses to a nif file to improve performance. It doesn't.
  • Grass does not conform to the landscape morphology, so create grass models with a small footprint to minimize floating grass.
  • To cluster a grass type together, ie a group of lupin flowers, try restricting that grass type to grow within a minimum and maximum slope range as defined in the esp grass record. This avoids having to create models with large footprints.

Source: reddit.com

Similar Guides

Read:  Why setting TES VI in High Rock/Hammerfell would be disappointing.

© Post "A Review of Grass Performance Studies: Resolution, Overdraw, Poly Count, and Draw Calls" for game The Elder Scrolls.




Top 7 NEW Games of June 2020

Quite a few exciting games are releasing for PC, PS4, Xbox One, and Nintendo in June. Here's what to keep an eye on.


Top 10 NEW Open World Games of 2020

Video games with open worlds continue to roll out in 2020 on PC, PS4, Xbox One, Nintendo Switch, and beyond. Here are some to look forward to!


Top 10 Best New Upcoming Games 2020-2021

The best selection of games which will be released in 2020 and 2021 for PS4, PS5, Xbox One, Xbox Series X, Google Stadia and PC - and you can watch in amazing UHD 4K and 60FPS with latest updates about all of the games in this list!


You Might Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *