Thursday 21 November 2013

Thursday Tinker

Meeting Day

With a six hour talking appointment starting at 8AM, there was not much time left in the day for coding, but I managed to look into a few small areas.  The issue of the FISH-EYE issue has now been fully explored and the problem was that the Reloaded engine was passing in a horizontal FOV, but using it in the perspective matrix calculation as a vertical FOV value, and the aspect was fixed at 1.777.  The new version sets the aspect ratio based on the resolution you are running under, and the FOV is now providing a vertical angle. By default now, the buildings and high walls don't skew out of all proportion when you look at the sky, and for those users who want the old style back, just ramp up the slider until you get what you want.


Now when you look up, the fish-eye effect is virtually gone and you get the kind of perspective you might expect from more traditional games that set a reasonable 85 degrees for horizontal FOV rather than the 170 degrees that I was using before.

Where Those Draw Calls Go

I also wanted to find out why an empty terrain scene took 73 (SEVENTY THREE) draw calls to perform, and so before Thursday was out I decided to make a shopping list of what GPU calls I was making. Here they are:

12 draw calls for the two overlapping skies (day and night, one side per call)
48 draw calls for the BlitzTerrain module segment renderings (one viewpoint)
3 terrain object calls (to populate the texture painter, editor water plane, etc)
1 water plane draw call which lies under the flat terrain
9 draw calls for the nine-stage post process for Bloom, Etc
1 vegmap draw call to paint the texture paint to the paint camera

As you can see, we have a few questions to ask of our engine here. We don't need 12 calls for the sky, and when not transitioning, one sky mesh would do. So that's 11 calls that can be saved. The editor water plane is not needed in game, so should be removed, as well as the texture painter when in-game! A simpler post process shader could manage Bloom in fewer that nine passes I am sure. All told, I could probably shave off 18 draw calls from the above 'empty' scene. I also want to investigate the 48 draw calls to produce the terrain, just to make sure they are not being rendered twice, and at least to confirm I need 48 segment meshes. Maybe I can find some settings to fiddle with in this regard too.

Signing Off

Quite tired after today's various antics, so I will be starting my research into True Imposter technology on Friday, which I hope the fill in the last of the visual gaps in my performance boosting trinity and get those distant distant QUAD polygons textured properly. I had thought of fake QUAD textures, but it would take me as long, and probably longer to create a system to produce the fixed baked textures to accompany each entity you bring in.  I have a plan, and it should not take too long, so it's worth spending a day on.

It was also aired that perhaps progress is not as fast as the community may wish, and perhaps too much time is being given over to pure performance work. I think however that in the long term this 'boring' performance work will repeat rewards much later on when we take high frame rates and clever scene handling for granted.

17 comments:

  1. Fisheyeing looks to be much better. And that's a nice screenshot, actually.

    ReplyDelete
  2. (It was also aired that perhaps progress is not as fast as the community may wish, and perhaps too much time is being given over to pure performance work. I think however that in the long term this 'boring' performance work will repeat rewards much later on when we take high frame rates and clever scene handling for granted.)

    I agree with the below coment,Keep at it Lee

    (I think however that in the long term this 'boring' performance work will repeat rewards much later on when we take high frame rates and clever scene handling for granted.)

    ReplyDelete
  3. Yes Agreed.

    We are all impatient this end but we must carry the burden and suffer the waiting for as long as you need the time to do the best you possibly can and run out of options and or ideas.

    I am sure you would like to get on too and move on to something perhaps more interesting for you in your daily work.

    From what I have seen many even who had taken it upon themselves to get some work done with Reloaded too are waiting eagerly for performance improvements finding that their hard work and efforts were not being supported by low fps and so have put a hold on any serious further dev work even though we all understand these releases are Betas and really not designed to actually build any great works with. The fear is that unless performance is improved somewhat substantially then a lot of projects will not be able to be developed with it at all and or if so with regard to heavy restriction of what can be achieved when the aspiration rightly or wrongly was that performance and fps was not going to be a seriously major factor preventing some serious level making.

    Perhaps that was over optimistic but best to at least go the extra mile now to achieve the best that is possible. No more can be asked than that can it.

    Without doubt leaving behind missed opportunities to improve performance which may be more difficult to get in place later and may then never get done would be something we will all be sorry for later if any possible opportunities are not taken now.

    I am sure that if performance can be improved to an acceptable level whatever that is then everyone will look back, clap their hands and jump for joy no matter how long they have to wait. If the opportunity is passed over their will be no joy and will will never appear. It will be a forever burden to the engine and the users which wont ever go away.

    As we have seen Reloaded offers everyone involved the opportunity to benefit all and for users to make some great environments and games but users need to be able to have decent performance to be able to get the best out of what Reloaded promises or accept that their games made in many instances may be inferior to what they might otherwise be.

    We know as has been said many times and see in practical application the users have the ideas and skills - they just has always has been the case need the tools to deliver the goods which will benefit the product and all in the long term.

    That must be worth going for and hanging on if need be until its sensible to move forward with the performance issue done and dusted the best it can be once and for all.

    :-)

    ReplyDelete
  4. Oh and thanks for the FOV fix that's great news indeed. These things make a big difference! Now hopefully I wont have to look at all my trees and the player character hands and weapon at such an accute angle and squished up tight :-)

    Thank you.

    ReplyDelete
  5. I do agree that performance should certainly be top priority, but maybe one or couple of small features every update would help keep the ball rolling?

    ReplyDelete
  6. Would it be possible to use one sky "box" and possible fade or transition to a different sky texture? (No idea if darkskies is being added)

    Hopefully the water table does not get displayed when it would not be seen (maybe even an option to disable it completely?)

    Glad to hear about the FOV thing. Very good work so far!

    ReplyDelete
    Replies
    1. in Skyrim they have a two layers of skys. One is strictly clouds while the background layer is night and day textures.

      Delete
    2. oh and the cloud layer actually scrolls.

      Delete
  7. Great! Thanks for solving the FOV issue! :) *thumbs up*

    ReplyDelete
  8. I took a lot of hitting Lee on the head with the FOV issue before he caved in and had his epiphany! In fact it was a quick Google of FOV that saved the day.

    ReplyDelete
  9. I imagine users may feel a little frustrated at the lack of actual gameplay stuff we can do at the moment. Especially those with very fast systems for whom performance is less of an issue. Still, I agree with you, getting the engine as fast as possible is priority! It would be great to be able to fill the entire map up with entities and still get a decent FPS! It would be nice however if you could add in a couple of views, or even a customisable one which you can switch between in the editor. So you can see at a glance how those mountains are looking for instance. Rather than having to test the game, find them looking ugly and then guesstimate it from the overhead view. I'm sure it would be pretty simple to add, even with my programming skills! I'm sure you could add it in a matter of minutes!

    ReplyDelete
    Replies
    1. True words,
      the traditional FPSC Editor View is already out of place for Reloadeds needs.

      A Free 3D View would be the best solution and like mentioned by Glenn a system to switch between Camera Views.
      At the end this wouldnt only leed to a better functional Editor, it could be explored further for custom player cameras - such as thirdperson/ orthographic/ sidescroll - cameras.

      Even if this has less to no priority, its what reloaded is going to need sooner or later.

      Delete
    2. Definitely. I had never used FPSC until the Reloaded beta, but found the fixed top-down camera to be one of the most aggravating aspects (aside from my poor framerate on a very high end machine). Maybe I've just become so accustomed to free cameras in other editors, including Unity, CryEngine, and even the old QuArK/Hammer editors back in Quake and HL1 days.

      Delete
    3. I totally agree. I have been nagging about some sort of 3D view in the terrain editor as you can´t really get a grasp of the landsvace in a 2D view... especially the height.
      I hope TGC will do something about it. As for now you need to go in and out of the game all the time - something I thought TGC wanted to minimize?

      Delete
    4. (but found the fixed top-down camera to be one of the most aggravating aspects ) I agree, i never used FPSC becouse of this.Only played with it.

      Delete
  10. Finally the FOV issues I've always had have been fixed. bliss.

    By the way I noticed an issue with skyboxes. Because they are boxes from certain angles things like the moon warp shape. UDK uses skydomes. I'm not sure what games like Skyrim use?

    ReplyDelete
  11. AAAAHHH finally!! The FOV FINALLY looks normal! Thanks so much, Lee for fixing it, and Rick for making Lee fix it! :D

    ReplyDelete