So if there were objects that moved, were disabled/enabled at any point or what have you, it wasnae batched. The usual sort o' generic implementation to counter that would be dynamic batching, which is where every non-static object is batched after every frame.
Which is, uh, a bit cock. 'Specially when there are loads o' objects 'n' high-poly ones as well.
There is a solution, 'owever! I wiz talkin' to Boris Vorontsov over on the ol' ENB forums a while back, and it turns out ya can in fact perform batching, in the same way as static batching, on yer dynamic objects; ya dinnae have ta batch after every frame ta account fer 'em.
Here's the ol' direct quote coupled with a bit o' formatting.
Thread's 'ere, if any of ya pansies fancy a gander. http://enbseries.enbdev.com/forum/viewt ... =17&t=4869Fully batching objects in to statics is the best possible thing to improve performance. And there are tricks to minimize negative side effects of statics by not making them total statics.
Pack meshes in few big vertex buffers and add data to each inside it, or in an external stream which identifies individual mesh, for example; you've got one float value. Use that value to index to any data, such as matrices for transformation, which will be selected in shader similar to matrices of bones.
Works fine with dynamic objects, and all you need is to remove deleted meshes or add new ones to large buffers. It can also be done on hardware too via other tricks (don't ask that please).
Seeing as how AMD's GPUs are not exactly stellar in terms of draw calls fer OpenGL 2 ('tis what OpenMW's variant of OSG uses, aye?), and even if ya have an NVidia GPU, not everyone has some hyper expensive i7 Skylake overclocked ta five gigabloozits, this, uh, dynamic static batching will work wonders. Especially once ya jack up the render distances and chuck in a bunch o' NPCs, which'll need this batching for even the beastliest o' compies.
And seeing as how we've got plenty of cores sitting idle (OpenMW only really does heavy lifting with a couple cores), there's ample space for threading. 'Specially for lads runnin' with AMD's FX processors.
So aye, any chance of gettin' some wizardry like that punted in? We had that rudimentary static batching with Ogre, after all.
And on a different note, is deferred rendering on the cards some time soon? Being able ta go heavy on the lighting would be sweet, and deferred rendering's gonna be needed when the draw distances are jacked up too.