Jump to content
Pennyworth

Some Findings on Draw Calls and Instancing

Recommended Posts

I thought I would verify some information I read on the wiki regarding section counts. More specifically,

Quote

Ingame, in the entire scene that your GPU renders and that is displayed on your monitor, every model requires it's own sections. It doesn't matter if it's 20 completely different models with completely different textures and materials on the screen, or if it's 20 copies of the exact same model. This also applies to proxy models.

For this test I created two objects, one with 16 proxies of a shelf model in the 1st LOD, ShadowVolume, and Geometry, and the other object had all of the shelves in the "base" object, instead of proxies. Images of the models and the video settings I used can be seen here. I then created numerous duplicates of the object and observed the FPS and draw call count from an Intel debugging tool.
 

Here's a small spreadsheet with some of the data I found while testing. Though the model with proxies did have higher draw calls, the total number is so low in this testing that there was no adverse effect on FPS. With the object without proxies we only see the draw calls go up between the 500-550 range, but we see it go up for the object with proxies first between the 30-40 range. I was initially confused by this, but after some testing I determined that the draw calls went up for the object without proxies exactly on the 513th object, meaning that the first set of 512 objects shared draw calls. Now what about the object with proxies? Well if the draw calls are shared between 512 "instances" of an object, and there are 16 proxies in the object, then that should mean the first 32 objects of that type will share the same draw call (512 / 16 = 32), and the 33rd copy of this object will get a new draw call. I then tested this and did in fact see the draw call count go up every 33 objects.

So my findings are that the information on the wiki regarding this is wrong, but I wanted to get opinions on my method of testing and any thoughts before I made any edits. I'll do some more testing with this later for things like weapon accessories and equipment, and post an update if I see anything interesting.

  • Like 5

Share this post


Link to post
Share on other sites

great post penny!

would be intresting to see if the "frequent" property in clutter models has any impact on the instancing as ianbanks and you suspected that it has to do with instancing.

Share this post


Link to post
Share on other sites

Regarding frequent = 1:

Quote

[...] preallocated larger instancing buffers than usual and therefore the instancing is more effective (but consumes more VRAM).

 

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×