Monday 4 March 2013

Monday Celebration

Lee Reloads!

That's right, this is the first actual day where I have only one project (well, two) left on my plate and it's all Reloaded baby!

I am tingling at the thought of immersing myself in the land of Reloaded and not coming up for air until I really have to.  My amazing artist has been producing art since the start of this year and moreover, the ideas he has to enhance the FPSC world are contagious!

I am sure Mark would not mind me sharing his latest experiment, this one launching way ahead into the world of terrain. As you can see we're going to change the face of Arrakis with this one!




Not to get ahead of ourselves, the current mission is to get the editor up to speed quickly. My pro-brain is screaming at me to catch up and my fun-brain is excited about working in full-on 3D again, so both sides are ready to go.


Perceptually Challenged

I also found 26 spare hours over the weekend to advance my Perceptual prototype for the Intel Ultimate Coder Challenge which turned out quite well all told. Getting some nice comments already from the 'Internets'. For more juicy details on this, check out my sister blog: 

http://ultimatecoderchallenge.blogspot.co.uk

I don't like the blow my own tuba, but I've been getting some very nice comments from this latest edition of the blog, so I might be onto something with this little app idea. My mission for next week is to outdo week three!

Reloaded Diary Day

Such is my fancy, I have decided to do another 'day in the life' for this evening to track the highs and lows of my first 'proper' day back in the Reloaded camp. The last time we saw it, we had the editor tamed into jumping directly into our 3D world at the press of a button. No more build game. The downside of course is the level looks awful and it's not very nice too.  I want it to look much nicer and for that we need real-time light mapping running in the editor while we paint levels. Once this is done, dropping into the world at any time will look much less un-nice and we'll have progress. Before that of course we need to throw away the old object management system which had a finite limit for editor based objects (which explain the 'shroud' some of you might remember from FPSC of old) and replace it with one that produces as many objects as we need (and I am talking millions here). Rather than devise ingenious ways to combine data into highly efficient meshes and what-not, I am just going to dump the whole lot out as DBP objects and let the future occlusion system handle what gets drawn.  It also means maximum flexibility during the edit/play process which might lead to new and exciting features as yet undreamed of.  Only when you press 'BUILD FOR REAL' will it turn the objects into highly optimised and efficient mesh groups, at which time you won't mind the wait as you're building the final standalone executable and you want THAT as efficient and small as possible.  

11:50PM : So that's where we are now, and where we're going in the next 24 hours. For the action as it happens, read on.  I have started my background music for the evening, which I think you will approve:

http://www.youtube.com/watch?v=_fj5pIpjS14

12:30PM : I often pop in and out of my emails so they don't gang up on me, and as it's FPSC related I wanted to note that there will be a new BETA16 of V120 up on the forums soon and also that I have just completed the installer to a new FPSC model pack which is wicked!  Lots of WW2 graphics, including vehicles and tanks, and some pre-created level for you to run around in. The author did a great job here and I think you will like the pack when we release it later this month.

2:35AM : Okay, so I rescued the DBP DarkLIGHTS source code from another part of my archive and dropped it into VS2010 to get it up and running again. This will be the module from which I will create my real-time lighting system. I created a new quick prototype so I could focus on the ability of the module to light map an object that was already light mapped.  The reason for this is that I could then re-run the current light mapper on objects without having to do the complicated double buffer hide/show trick I did in the P001 prototype. It turned out this was remarkably easy to do, and my simple demo was able to light map the same object over and over again. Hurray!

I then created a grid of 1600 objects and placed the light above them, which took 32 seconds to light map each time. I activated multi-core in the module and this dropped to 15 seconds. I lowered the quality a little which helped some more. I then added code which ensured the light mapper would only deal with objects that where within the range of the light rather than the whole scene. This was a huge feature as it brought the time down to 1.8 seconds. Not bad from 32 seconds wait to less than 2 seconds!

Naturally there are some issues like the OLD objects which where lit before the light was moved still use the old light map information, so I will have to extend the process to include re-lighting them, and I will also need to free up light map textures which the new process replaces. I tried a quick and dirty release on them, but of course in threaded mode other objects may still be using that texture so I commented it out for now as the member leak was not huge. The grand solution is to collect all the dead references and free them at once when LM Reset is called. This last command is only needed to free up the resources used during the light map process, and ensures each light map event is clean and does not carry garbage from the previous sessions.


The reason for the pretty red backdrop and nice font is a policy decision we made at a recent strategy meeting.  That was, to avoid showing you what I like to term 'programmer art demos', which might cause offence to some viewers. It was decided that if we come from a position of working high end materials and artwork in earlier in the project, it will improve the overall project and create a culture of quality in TGC Reloaded lab.

My plan now is to add another light, sort out a refresh for the left-over objects and see what I can do to clean up the code and anticipate what else this system will need before dropping it into my editor.  I am also concious of the fact I need to be up in the AM on Tuesday for a delivery, and I also want to eat something and perhaps watch half an hour of 'Mitchell and Webb' which I have rediscovered on Netflix.

03:49 : Just finished the P003 prototype, and achieved everything I wanted relatively painlessly. The system now restores the light maps of objects no longer under the influence of the edited light, it can handle multiple lights in the scene and the icing on the cake, it will only include other lights for those objects touched by the process, rather than ALL lights. These are all the ingredients I needed from my real time light mapping system, and it means I can eventually drop in lights willy nilly, move them about, change their colour and range, and the scene will update objects that need to be changed, leaving the majority of the scene unaffected.



Above is a small video of the technique. Before I leave P003 prototype, I think Tuesday would be a good opportunity to add in some objects to move about, so it works with objects as well as light entities.  I will also import some LARGE meshes too, to see how the light map handles imported geometry which is a new feature of the Reloaded product.

Signing Off

I am glad to be back on Reloaded full time again. My AGK apps where definitely worth doing and represent apps that have a very good chance of charting really high and staying there, which will be great ambassadors for our AGK technology moving forward.  Hopefully I will be able to reveal what they are soon, and perhaps as soon as March.

So in closing, thanks for your patience last week and the weeks before that, and baring further distractions I have now made my new home in the land of Reloaded and shall begin building immediately.

2 comments:

  1. Thanks for the update. Looking good.

    I am sure everyone is very excited in looking forward to watching the progress of FPSCR and supporting you along the way.

    ReplyDelete
  2. I AM SO EXCITED FOR THE LANDSCAPE!!! I want to create games like Starwars Battlefront!

    ReplyDelete