Friday 19 September 2014

A Low FPS Day

Be warned, programmer and back-end screenshots to follow. If you have a sensitive disposition, stop reading now.


My Friday began with the above shot, showing almost all the art hidden except for terrain and the new light mapped object collections.  I am currently struggling with an issue which mystery drains almost all performance from the engine when these objects gang up. The same number of regular entities with full shaders do not do this, but the new objects are playing silly buggers.


As part of my journey of experiments, and to find out where the bottleneck (or as I like to call it, squashed straw) I removed the camera cycle render loop and was pleased to see the FPS return in at just under 2000 frames per second :) Obviously very fast when you are not rendering any 3D but I have my HUDs, text and the engine running the background so it gave me hope that we could find some good gains when I started the performance work next week. 

My plan is still to finish the lightmapper and 'glass terrain' shadows but I wanted my test level to run at a decent speed, and 10 fps does not cut it. Alas I spent most of the day skipping functions to isolate the code responsible for the massive slow down but to no avail. At 4PM I decided to throw in the towel on the old school method of finding hot spots and instead broke out my new edition of the Intel VTune Amplifier XE 2015. Although this premiere tool is designed to find these kind of issues immediately, I am not too familiar with the latest version so my Friday evening has been spent learning how it works and how I can get it to work for me.

Once I can get The Escape running fast enough to run around and view lightmaps, I can revert to the Visual Camp and finish off the floor terrain shadows, small artifacts in the larger entities and squash the light mapping memory usage down as far as it will go.  Also had a few ideas how I can batch, group and consolidate the lightmap objects to reduce texture files, how to entirely skip using light map textures for very small polygon surfaces and even did some research into a way to create many instances of an object with a single draw call using a clever Vertex Shader 3.0 system of using multiple streams, one for vertex data and one for instance data.  Can't wait to get light mapping done so I can enjoy the theme park of performance optimization!

12 comments:

  1. You need to try equal this for shaders and lights etc. They are also a small team and have halved the time you been on reloaded and so I am hoping you can aim to equal the lighting and shaders etc.
    http://www.grimrock.net

    ReplyDelete
    Replies
    1. Thanks for the link. I never heard of Grimrock and it looks awesome. I'm definitely picking them both up.

      Delete
    2. That is my point. They look awesome and me and you want to buy instantly. Reloaded I am sure can match if given the opportunity to really get the shaders lights and stuff correct. Of course you need good models and an eye for application of efx and lighting. I can only hope for water efx like the dungeon bit in the video. But we shall see. Anyway what happened to mini instalments of beta alpha type things. I finally have a week off so some model mayhem about to commence. Come on lee up the ante and drop the wonderous grimrock 2 like visuals ;)

      Delete
    3. OMG thanks for the share, this looks awesome. I've just purchased the LOG1&2 bundle for $25. Reloaded should be much better once the ambient occlusion light mapping is included but still have concerns over performance if 'the escape' is only hitting 10fps with ambient occlusion at the moment. Lee really needs to focus purely on graphics and performance and let the other team members do all gameplay work. Lighting has barely even been started on yet.

      Delete
    4. I'm hoping indoor levels in Reloaded can visually look better than they did in FPSC-Classic. At the moment when you attempt them they look... okay... but not too impressive. I think that has something to do with lighting. We will be getting directional lights in the future? I noticed we are at the moment stuck with 360 ball light.

      Delete
  2. Not concerned with fpseconds. Can always find speed ups. It is getting the overall look to stand out and clearly shading and lifhts are key to the whole image. Crack that and the rest follow. I hope tgc realise and will understand eye candy awesome will only help with salea and help to fund more advanced engine.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  3. Looking great won't matter if the performance is not acceptable and to have better graphics the engine needs to be even more optimized. If you were to throw a load of high end shaders on Reloaded now it would crumble. I also think Reloaded will get there but unless Lee really concentrates on performance and graphics its going to be a long time coming.

    ReplyDelete
  4. yeah but to get new pledgers to gain money to then work on performance and tricks you need to attract and how come you only getting 10 fps? i overload my levels and still get 30 fps, and none optimised. and this is before other tricks and many other gains to come. this is a long haul but i do think to attract more clients they need to let it sparkle and to trance them, i know blocky has done well but these days if you saw some of the levels created here on steam you would totally not go there. but the presentation on grimrock made me you and tom go for it. not just the game but the efx and stuff, if we are going to be honest, but i agree about optimisation but then if you have a great shader and lights you can then work harder on your levels to optimise

    ReplyDelete
  5. I agree. Lee said he was only getting 10fps on the escape level after it had been pre baked with the new ambient occlusion light mapper. I don't really understand why as I thought this was expected to improve performance but I guess there is a bug somewhere that he needs to find and fix. I'm still very hopeful for Reloaded but I still think we have a long way to go.

    ReplyDelete
  6. well in a way yes a long way to go but time is running out for them or should we say funds may be getting lower, must be, and so to cut a long story short he needs more funds and with not fully sorted shaders and lights it wont yet reel them in. i thought my level was good and then i saw grimrock and i almost gave up, but i just hope this is dealt with properly and not just half a job situation. i thought though he was giving us options with efx so high end can get good efx low end not that good. so there is room for high quality stuff, i hope, i am sure he can give us some sugar

    ReplyDelete
  7. The 10fps problem must be a bug. With shadow mapping off and textures pre-baked you should get better performance, not worse. Obviously something in the engine is getting hung up on something silly. Hopefully later today we will get some better news.

    ReplyDelete