Download

Does it count for performance what is behind a wall?

Hello,

if I have a opaque wall the player is looking at and behind the wall are meshes with for example 100.000.000 vertices, does this reduce the performance when the player does not see these 100.000.000 vertices? I mean, the vertices/faces are not being rendered, but hasn’t the engine to check if they are visible or not? How is the engine doing this?

Thank you,

Thilo

Hi, basically you’ve got 3 threads running simultaneously one frame transferred.

(1) Game Thread, which is handling the game logic

(2) Draw Thread, to collect what should be rendered

(3) Render Thread, the actual rendering

What you’re describing would happen inside the Draw Thread. Basically it checks for

  1. Distance (you can set a Cull Distance for each mesh, this is only used if you actually set a Cull Distance)
  2. Camera View Field
  3. Precomputed Visibility (by default not used)
  4. Trace

And it checks this object wise. So if even a small part of the bounding box of a mesh would be inside the camera view, then the whole mesh will be passed on to the Render Thread. [HR][/HR]
In your case, it would be discarded via the Trace test. You can see what the Draw Thread passes on to the Render Thread by using the “FreezeRendering” command from the console, that will freeze what the Draw Thread passes on to the Render Thread.

So if you would have many different objects, then it might be a strain on your performance since UE will have to process them all in the Draw Thread, if you use “stat unit” then you see the time each of those three threads is using up.

Doc: https://docs.unrealengine.com/en-US/…ing/index.html