What A Busy Boy
Yesterday was crammed with my AGK project, which seemed to stretch off in every increasing distances for each door I opened. I am pleased to say I solved almost all the issues on my plate but it certainly gobbled up a lot of hours. Looks like Thursday is shaping up to be the same kind of deal, with plenty of spreadsheets lining up my coding tasks like toasted soldiers about to be eaten.
On the Reloaded P002 front, while I was deliberating writing a view space culling approach, Rick sent me a very interesting article from Intel which covered the very issue of geometry culling. The article describes a more advanced technique which uses a system memory depth buffer and multi-core operations to break down the task of figuring out what to draw. It still uses occlusion volumes and AABB bound boxes, but is written in C++ and optimised by brainiac Intel engineers. When I read the article and ran the provided code sample I made the decision to abandon my little P002 experiment and use this new technique instead.
A New Occlusion
We can argue that the purpose of the P002 prototype was to highlight the challenges to me, and give me a better grounding on the problems my occlusion system needs to solve. It took me HOURS to figure out the dynamics of a single plane culling system, and even that small piece of code I had to fudge before it worked. Can you imagine what an entire scene management system would look like with that approach, and the performance hit such a system might incur.
The benefit of using the Intel sample is that the code is already written and tested. I just need to cut and paste the pertinent parts into a new Dark Basic Pro module and link it with object visibility. Another extreme benefit is that our occlusion system performance jumps up when it gets a whiff of any multi-core processors in the room. The metrics quotes in the article suggest a sizeable increase in frame rate when all techniques discussed are implemented.
What I like about the system is that the scene appears to be a collection of independent objects, and the occlusion system can figure out within a few milliseconds which ones should be rendered, and all done in real-time. I am sometimes asked to run my apps through a concurrency checker to see how many of the cores are being utilized and in the case of FPSC Classic it would only melt the cores during the light mapping stage. During the game only a single core would be taxed. In theory, this new system will be running the occlusion stuff all the time, which means all the cores will be working all the time, improving my concurrency markedly.
This means the next time Intel ask me how well my app is threaded, I can wear my cheesy smug grin.
Signing Off
No new games have been installed since finishing Dishonoured, mainly due to the onset of additional work. Hopefully I can break free of these micro-tasks and in the next few weeks complete my research into the remaining FPS games I have here. Borderlands 2 is burning a hole in my shelf!!
Any chance you could share the Intel doc? It might be useful for those making or modding their own engine :)
ReplyDeleteSure thing. The link is http://software.intel.com/en-us/vcsource/samples/software-occlusion-culling
ReplyDeleteCheers Lee!
ReplyDelete