Tuesday, 26 August 2014

Houston, We Have Triplanar

After a three day bank holiday break, I returned to a huge inbox of questions, action points, feedback and comments from all across the Reloaded spectrum. Took a while, but whittled them down to five, and one of those was a useful email from Rick showing a great tutorial on Triplanar terrain texturing. So well described was the technique, that it formed quite quickly in my head and I was able to see how it could be grafted to the current terrain shader.



As you can see, the rock texture is not stretched now and uses it's own XY and YZ texture UV look-ups to create a perfect vertical mapping. It cost me a little performance (from 205fps down to 187fps) but will measure less than 1-2 fps when down in the 60 fps range.  For this trade-up in visual quality, I plan some more aggressive performance work to get that back with interest.

We also had a team meeting just before the holiday break and it was agreed that performance be given the highest of priorities where-ever possible.  To this end I will be working on shadow baking and render reduction so that we can get high frame rates on the lowest of hardware (integrated graphics).

The good news is that I have already made a good start on this process, and I will be getting some extra modern day assets this week which will allow me to show off what this new pre-bake step can do in terms of visual improvement and overall performance increase. I was using a new Ultrabook this weekend and was able to run around a small scene with characters chasing me and weapons free action at 70-90 fps, so we are not too far away from where we need to be.  Watch this space for some new 'pre-baked lighting' screen shots which should be worth a thousand words :)

Thursday, 21 August 2014

Short Code Week

I am off to a PR meeting Friday so this will be a short four day coding week for me. Today I finished the UNDO and REDO for terrain painting, and added these to a new EDIT menu on the IDE.  Improved weapon accuracy system so the whole weapon set are a lot more accurate, allowing inaccuracies to come from in-game motion rather than built into the gun. I also added new fields for RANGE and DROPOFF in the weapon entity properties so you can control these from your level editing session, and they work a treat!  You can now fire through fences again (and another other transparent entity), and I have fixed the distant black issue on LUSH2 terrain, and did a little command line magic for Ravey who will need this in a week or so.


Also got a nice new preview of more modern day asset items from Adam, so I cannot wait to add these into the demo level once V1.009 features are bedded down.

The next things on my task list are more small but important editor and engine tweaks, a closer look at video memory use to see if I can make some big savings and avoid those quarrelsome crashes that occur as a direct result of running out, getting characters to explore INSIDE buildings and finally looking to finish some level of support for the ambient occlusion light mapper which has been pushed to the end of the V1.009 list due to it's relative importance compared to bug fixes and vital improvements to the editing experience.

Probably won't be a blog Friday as it will be a LONG day, but I will tinker over the weekend and might provide an update then. If not, I will write again next week and until then, have fun and enjoy your weekend!

Wednesday, 20 August 2014

A Non Widget Day

After many days of widgets, widget for breakfast, widget for dinner, widget for tea, widget for supper, I finally wrestled myself some non-widget tasks to make my Wednesday more fulfilling.  I write this blog at 3PM (early) as I wanted to record a little micro-victory in that as I was creating the REDO code, which I had given myself a whole hour to work on, I started to craft in the ability to add Entity Move to the list of things you can Undo. Great I hear you cry, but that would have extended my original hour and the knock-on would have been EVERYTHING else on my list shifted on!  I took the decision to add it to my task list, but not on Wednesday's list. There it can sit and marinate in a little quality time until suck time as a decision is made which day it shall be coded. This might turn out to be a better strategy to get more tasks done in a day and stays eternally vigilant about tasks that distract!


Other tweaks so far are the File Menu now has the IMPORT MODEL option, which will be having it's debut with V1.009.  The black texture on standalone model issue was finally fixed, which now allows all multi-material models to work in test game AND standalone game. Against my better judgement (on the grounds of performance) the engine now supports these types of models and the store already features this multi-textured leviathans which certainly expand artist choice. I may come back and optimize how the engine handles these down the road :)

The remainder of the days tasks consist of some gun accuracy work and some small editor tweaks and improvements, and in total will represent a good amount of work for Wednesday. In other camps, Ravey is doing well with Steam SDK research and Simon is charging full steam ahead with the Con Kit with a special focus on how the various components will be textured.

On a personal note, my favorite mouse, the one I went on eBay and replaced like for like when the original went scatty, is now exhibiting a strange 'double-left-click' issue every now and again which is starting to get a little noticeable and ever so slightly distracting (maybe 20 times a day). A mouse is a personal thing and finding a replacement is a hard task!  In other animal news, I discovered a Mole had been making it's way across my newly laid grass lawn (well not lawn, big flat area of soil with grass seeds coming through). Funny thing is, the line was almost perfectly straight, a compliment to my earlier work of removing all the rocks and debris from the dirt. To be continued...

Tuesday, 19 August 2014

More Widget Work

I did not anticipate the widget taking so much time, but with the addition of scaling per entity instance and having to store this, and handle it, and various UI changes brought about from a conf call yesterday, it grew slightly. The good news is that the current incarnation is done, and Wednesday I look at adding a free flight system to the editor so you can fly about but get back to top down whenever you want. Hopefully it will all make sense by the time the alpha testers get a hold of it.

I also found an hour to solve the black texture issue on standalone exports, which involved going through the model files one byte at a time, but it's in there now.

A short blog today as I need to eat, and skipped lunch to play a little catch-up.  Had planned to do a little ambient occlusion work but just ran out of minutes for Tuesday :(

Monday, 18 August 2014

Another Widget Day

The introduction of the widget has the potential to upset quite a few users as we fundamentally change the interface used to select, place, modify and delete entities. This transformation could be even greater when we consider adding the ability to 'mouse roam' over the terrain in edit mode, which will remove the top down restriction currently present. You could almost call the top-down way of editing a signature feature of FPSC and the potential could be that we make the editor 'more difficult' as we create more of a 'modeller' flavor.  To this end we are being very careful how to re-design the editor controls and taking extra time to do this.

A year ago I would have shown you a current screenshot, but as some users might take offence at programmer art and early design, you will simply have to imagine the state of play from the nuggets written here.  At present the system calls up the widget which allows the entity to be positioned, rotated and scaled, and to call up the properties panel. The right mouse button was being used to extract the entity from the map, and duplicate the entity, and also to delete the entity once finished.  The new suggestion is that we re-purpose the right mouse button for a mouse-look to control the navigation of the camera through the editor, and move the controls over to the widget buttons. Time and testing will tell if this is the right course to take.


Managed to get a few other tweaks sorted today so it was not 'all' widget stuff, including fixing the vertex corruption of the shotgun soldier, and also reducing the size of his weapon a little. As you can see in the shot, the gun is a little too big for him!

Ravey and Simon have performed Stirling work today with the conquest of the Steam SDK and the introduction of layers to the Construction Kit.  Again, too early for screenshots but exciting advances in functionality happening.

My next task over in my last hour of the day is to get the ragdoll system to include hierarchically correct bones for non-standard custom character models, such as those converted from ANIMER so you can bring in more characters without waiting for the core Reloaded team to produce a new set of characters. Expect these improvements to be part of the V1.009 build due later this month (if things go as well as today).

Friday, 15 August 2014

Widget Day

I spent the day integrating and repairing the new Editor Widget system which will add additional controls for entity manipulation.  Getting the rotation widget to behave itself in a real-world setting was pretty tough, but it is settled now and working fine.  No previews at this stage, due to severe programmer art.  Showed the internal team and the feedback was to add four new buttons on the widget to quickly switch between Position, Rotation, Scale and Entity Properties. 

The last one is a hint that we are changing around how the left and right mouse buttons work, so I will be curious how many users I can upset with this one! That is, I will be curious of the feedback when we release this enhancement to the editing capabilities.

At the end of the day it was integrated, but for some baffling and foggy reason the mouse pointer is not lining up with the widget, making gadget selection very horrible. At it's the end of a 9 hour stint with only a salad for company, I will leave this one for a new day when my fresh brain can solve it in five minutes.

I did manage some quick light mapping work somehow, and got textures and shadows to cooperate so here is a very early sneak peek of ambient occlusion with a low quality texture and no special shading effects.  You will notice however the creases are properly shaded to create nice inter-object lighting.
 

The next step on this module would be to add normals, specular, illumination and perhaps even metallic cube map reflection, depending on time and final shader performance.  Not sure whether the occlusion map texture needs to be carried into the pre-bake process but I have a spare texture slot so it's no big deal if the answer is yes.

In other news we have started our researches into Steam multiplayer and general SDK, and have made some great construction kit progress too. Both too early to show shots, but getting closer! Until Monday, have a great weekend and happy creatin!

Thursday, 14 August 2014

A Barrel Of Tweaks

I have managed to get to Thursday and drag with me a number of inbox emails that had not been actioned, so I decided to target them with action and responses so my plate looks cleaner for next week, and to that end I have been tackling little questions and small fixes before returning to the challenge of AO lightmapping.

The characters no longer cannot do a 'hip flick' issue as I have added code to set a maximum amount of hip turning that can be done per cycle, and the results are subtle but good with enemies swinging weapons around before bringing them to bear, and no sign of any hip flicking. Time and V1.009 test will tell if this solve this issue.

Also fixed the muzzle flash of UZI weapons so they no longer penetrate the barrel of the gun being fired which made the whole effect lose it's visual quality.


I am also downloading a 4.5GB project from a Reloaded user who wants me to see what can be done to speed up the engine and stop it occasionally crashing. When I asked for a snapshot of the files I did not expect nearly 5 GB but it's the only way to reproduce this one, so download we go.

Last night I spent a good deal of time, hours in fact, answering forum questions and suchlike, so I hope my contributions helped. Early feedback on V1.0085 are good so let's hope that continues as we plug away at V1.009 which will promise to be a very good build for all.

In other news, the importer has been getting even more TLC, as a direct result of new feedback from the alpha testers who are putting the importer through some tough times. All good, and will make the final result stronger!

I also want to blog in no uncertain terms that the Jet Pack took me three hours of coding, with the remainder contributed by a third party artist and did NOT distract the core development of Reloaded in any, shape or form. Indeed it added a new LUA command allowing the player to achieve flight, created a new HUD Layer system which can be re-used in future for more cool things like helmets, exo-skeletons and even first person vehicles (with more art and code). It also allowed us to trial a new incentive scheme which might increase pledge levels and allow even more core engine development.  It also, perish the thought, allows people who want a Jet Pack in their game to have one. For more information on how you can help us make this early beta of Reloaded more popular, visit our new incentive scheme page:

http://en.tgcstore.net/?md=invite-friends

I may also have omitted to say what improvements where added to the Hot Fix, so I will list them here if you are interested in the murky details:

Custom character control via scripts, ragdoll model repair, physics weights and friction, entity LOD shadow fixes, support for multi-texture entities, brass ejection from Colt 1911, adding Shotgun character, new LUA Jet Pack command, proximity mine and remote explosions, improved muzzle flash positioning, better behavior for Rocket Man, one stage undo, transparency issue for for glass entities, new zoom mode for RPG, accelerated IDE speed and better time slicing with external apps, improved Escape level beginning for easier demo play, BSP weapons pack fix

I extracted this direct from my 'jobs done' list so I apologize it's not pretty, but should give you some guidance on what your friendly neighborhood Reloaded coder is getting up to.