Wednesday 17 April 2013

Wednesday And Light Design

Illuminating Day

A good day today with all those little niggles being squashed one by one. The system is so nice now I almost made a video for you guys and gals.  I passed it to quality control (Rick) and with a few more polish tweaks it will be ready for public consumption.


The above picture shows some of the alley graphics you saw in the original Kickstarter. What you might find quite cool is that this is a shot from the FPSC map editor. The shadows being cast are real time generated, and will move when you move the yellow posts (or if you move the light too). The combined effect of this feature is quite amazing as you start to appreciate the subtle and powerful art of lighting design!

A Run Down

Right now I can add and remove entities and segments as fast as I like, and the light-mapping keeps pace very nicely. I switched from area lights to point lights and naturally it got even faster, so much so that they could be mistaken for dynamic lights in a low poly area :)   I dare say the light mapping routines can be optimised even more, and with control over quality settings while editing the whole thing could potentially zip along at a higher rate. That said, I am happy with what I have now which means I am nearly ready to move on.

I was going to add a system which chained all your changes into a list of required updates, and the light mapper could work through the list, but as I edit the scene now it seems not to be required. Not wanting to make work for myself I will skip this feature and come back to it if needed. This omission reveals itself when you might place five entities very quickly in a wide area of the map, and the middle entity might get missed as the 'latest' entity placement overwrites it. This is normally hidden as entities are usually placed close together when editing, and the next entity is already cued up ready as the present one is being light mapped, so it usually gets hidden well.

Another optimisation I had was to refine the way the light mapper detects exactly which objects need lighting as right now it is a rather crude distance calculation. A better way would be to check for objects clipping the light frustum volume from the point light to the object being placed (thereby objects within the shadow cast by the newly placed object need updating). Again, this is an optimisation I can call on if I need more speed in this feature later on.

Going to go through the usual steps of checking for stability, memory leaks and of course restoring editing to the same functional level as the classic engine. Right now all this happens on one layer. There is no longer alpha mapping and slicing of the edited level so I need to reintroduce a new system to cope with that. For some reason alpha mapping is not working with the new cloned objects so that needs looking at.  Once I can step up and down the layers, and edit as before, I will be happy to move on.

Signing Off

I will be moving onto player controls after real time light mapping, which will be a lot of fun. Right now the mouse has a limited mouse look capability as I use keyboard and mouse sharing technology, which means when I move to the left of the screen I switch to another PC.  Not good if you are mouse looking in the test game. Once I solve that, I can bring in the old control system from the classic engine and make any improvements required. One comment from a previous blog used the word 'fluid' and I think that sums up the goal perfectly. You really need to feel the mouse is an extension of your hand, and that sliding around the level feels responsive and slick.   We have the frame rate, we just need the subtle art of inertia tweaking and speed control.  I will probably need some mouse sensitivity settings too, as everyone's mouse is different!

4 comments:

  1. It Really needs a feature the disable all ligthing in the map,so you can easily edit dark areas of the map

    ReplyDelete
  2. Good point, @alessio forlante. Lee, make sure there's a toggle button in the editor to turn off all lighting (fullbright) so we can see clearly in areas that, when lit, are pitch-black.

    ReplyDelete