Since MS introduced the concept of drawcall batching in SP2 of FSX there has been a lot of discussion going on about levels of details still working or not. In the end it comes down to a choice between either having LODs working for your object or having drawcall batching. The MDL files that the GMax gamepack makes will have working LODs by default (and thus no drawcall batching). Since I don’t use 3DS Max I am not sure what the default situation is there. But by compiling with an empty xanim file and the /XANIM flag in XtoMDL you can ensure that your LODs will work.
So this brings us to the choice do we want LODs working or do we want the drawcall batching to work? Today I did some experimentation to try to answer this question. What I did is the following. I made a test object that has three levels of detail, a sphere, a cylinder and a cube. I then compared the performance of a grid of 486 of these objects placed in the situation with LODs working and in the situation with drawcall batching working (but always the most complex LOD showing). And to add another dimension to the test I then varied the amount of triangles in the spheres, cylinders and boxes to see which effect that has. Below you see a screenshot of the test situation.
Sounds complex all this? Let’s take a look at the results I got:
Triangles |
Drawcalls |
Framerate |
744440 |
486 |
19 |
1928448 |
1 |
11 |
|
|
|
435072 |
486 |
25 |
1073088 |
1 |
20 |
|
|
|
259704 |
486 |
25 |
594864 |
1 |
26 |
|
|
|
54456 |
486 |
25 |
139968 |
1 |
36 |
Each row of two results is the situation with a different complexity of the object for the situation with the LODs working (486 drawcalls) and with the drawcall batching working (1 drawcall). So it seems that the conclusion from this is that if you have an object that will be used in many places (many instances) that you are better of without the levels of details, but with the drawcall batching working. Only for complex objects (when more than 600000 triangles are rendered in the scene) it seems that using the levels of detail gets the upper hand again. But I doubt there are many autogen or generic objects that are so complex and placed so often to reach such limits.
I am not completely sure yet what this means for custom objects that are only placed in one or two locations. For those drawcall batching will not bring so many benefits, unless the same material is used on many of those custom objects. So I guess for them using levels of detail to reduce the triangle count is the best choice. But I will try to do some more testing to see if I can verify that.
As I mentioned, these are my first results and I am not sure if the conclusions are correct (yet). So I would be happy to hear your thoughts or ideas about this subject. I have also posted this information on the FSDeveloper forum, so please join the discussion there if you have feedback.