Thanks Jason ... and yes very true ... the shoulder I'm standing on is LIT's, btw hope he's OK as I've not heard from him in a while. He did say he was going to be busy for a while again.
I'll let you know how I get on with the memory checking facilities, I'm not convinced we will be able to use them fully, if at all, due to restraints on which debug runtime libraries we can use but I've not even tried yet so we'll see.
With regard to your thoughts on the 3DWS Import - DBO export workflow, that had crossed my mind too. I did try exporting from one of my earlier loaders but although all seemed to go well and I could subsequently load the DBO file with no errors it failed to display anything! Abandoned it at that point as it was not important to me at that time.
The whole 'how they are using DBO internally' needs looking at as they definitely have some real efficiency benefits embedded in there, they render consistently faster than anything I can produce. Although, as we both know, there can be pitfalls with transparency (until we can adjust that on a per limb basis) and also the color rendition is a lot darker (you can load the object using mode 3 of the dbLoadObject command which gives similar color brightness but you lose the subtle transparency alpha mapping on multi-layered terrains and all of the terrain light-mapping).
Using the 'Industrial Complex' level dbo export, which currently doesn't load the meshes due to the smf format issue the stats are as follows:
Number Of Objects: 1
Number Of Object Limbs: 452
I get totally consistent poly counts of 70220 and frame rates of 83+ for anywhere in the level, regardless of how may items are in view. This is true fps as I'm running in full screen mode with vertical hold forced off at the driver level.
Loading the same level directly in my loader (meshes excluded for a direct comparison) gives the following:
Number Of Objects: 1746
Number Of Object Limbs: 1054
The poly count alters from 70730 maximum to 59416 and the respective frame rate from 16 to 37.
Doing the same with the All Objects switch selected:
Number Of Objects: 2800
Number Of Object Limbs: 0
The poly count alters from 70730 maximum to 1056 and the respective frame rate from 30 to 164.
The All Objects option seems to benefit from two areas:
1.
It doesn't use the shader for texture blending and the obvious fps gain there!
2.
It seems to benefit from internal culling by the DGDK engine which clearly seems to work better with single limbed objects. Notice the DBO level has a single object and displays no poly change what so ever regardless of camera position!
This Jason seems to be the current price we are paying for true color rendition and light-mapping. Some vertex welding might bring about some frame rate improvement but currently, as far as I can see, the code out there for this doesn't fully support the FVFs being used in the loader. Obviously, frustum culling also helps with most scenes.
One thing I would like to see if the DBO method still retains the same margin of fps improvement with all the meshes loaded. I might have to look closer at how josh is handling meshes in his DBO export. I can't see any .smf file names embedded in there unlike the stf texture names which I have already replaced. I have all the smf models exported as .x so if I can just reference them in the DBO file we'd get the whole level loaded as a direct comparison.
The other thing that stands out is the reported limb count for the loaded DBO file object ... just 452!!! Has there been a large amount of limb optimization?
All food for thought for you to chew on lol
No matter how good your code is, someone will improve on it