Performance Question

Hello

As we are creating a open world map, it’s very important to know some performance stuff. So somebody knows which of those 2 ways is better?

  1. a low poly mesh with big transparent surfaces
  2. a mesh with more polys but with just very small transparent surfaces

We where discussing about that in our team, but we aren’t 100% sure which one is the better way XD

What is exactly you want to do with those transparent meshes ? All masked/opacity surfaces have something that is called overdraw (where you have to test transparency and render transparency, for entire surface, even though only small portion of it might be visible).

In general, polygons are cheap, very, very cheap. Modern GPUs can grind milions of them without any issue.
The issue is how fast those polygons can get from memory to GPU.

Either way for sure I can tell that rendering transparency (or masked surfaces) is more intensive in means of needed computing power, but you must bear in mind that there is usually less data to send to GPU (transparentt objects are usually less complicated in terms of polygons and amount of texture).

Edit:

Simply speaking. Rendering more vertices is more vertex shader intensive operation, while rendering transparency is more pixel shader intensive. Of course modern GPUs doesn’t have physical diffrentation between those two. But if you scene if pixel intensive, you should consider offloading some rendering to vertex (and vice versa if you have vertex intensive scene).

There is unfortunetly no straight answer, You should just create test case with both approach and see which one works better for you.

Thank you for your answer. Mainly I will use those transparent meshes for foilage. I will ask the modeller if he could do nearly the same model with more transparency and less polygons → I will also post the result of the test into this thread.

For foliage you say. Then don’t use transparency. I tried it and it simply doesn’t work. Not even because of perfomance but because there are transparency sorting issues and even though white should be perfectly opaque surface, it is not, and you get really strange look, like grass rendered on top of grass on top of ground. all this melds togather and and look like blob. Use masked, and have a look at material from Blueprint_example sample. There is pretty clever usage of Fersnel and Subsurface, for rendering foliage. It helped me immensly with understranding why my test foliage looked like crap.

Also for grass you can use pretty small meshes (the the point of few grass blades per mesh), and just instance it. Perfomance impact is minimal, and such grass blended better with uneven surfaces, while patch grasses will just shot in the air if they can’t conform to surface normals.

You always want to use less transparency when and where you can. As Baran stated overdraw and trans sorting will be the main issues that you will always fight. One thing that was not mentioned is that you will want to cut up your mesh surface to match your opacity texture as much as possible. This will greatly help in reducing overdraw even with masked materials.

Thank you for the tip. I also realised that the foilage looks really bad with transparency ^^