Alien Blitz 3d: 3d lighting, maps, smoother lights, dynamic lights

3d lighting

In Alien Blitz lights are computed and saved in 2d, it means some parts are lighted even though they shouldn’t, and lights don’t fade vertically on the walls.

I tried to switch to 3d lighting (first screen is current, 2d, second screen is 3d)

capture_2014-07-15_19-42-04_0881_Alien_Blitz_ capture_2014-07-15_19-43-55_0260_Alien_Blitz_

It makes everything more accurate and darker… but it doesn’t change that much otherwise (especially in default view, it’s a bit more noticeable in FPS view though). On most levels (with low height differences) it isn’t even noticeable… But it makes way more time to compute and takes way more memory, so I won’t keep it.

The good thing is that it made me realize the glitche happening in 2d lighting (the right wall should not be light that much) and so I’ve correct it.

 

Maps

Some new works on most maps:

  • Added locked door at start of levels, to “show” where the player came from
  • Added unlocked door at end of levels, to “show” where the player must go
  • When player come from/go to a an island it will mostly be sand now, I didn’t like the way the decks where done previously

 

No light cache

On Android lights are pre-calculated, I have a tool on my computer that will compute all lighting and save all lights parameters in  a cache file (it reduces loading time by a factor 2).

On PC loading time is not really an issue, so lights are now computed every time the level start, it will reduce a lot map file size as cache is not needed anymore (map files are around 100kb now).

 

Smoother lights

Up to now only surface facing top had lights smoothen, so I’ve added other faces too (before/after, check left wall)

capture_2014-07-16_13-23-11_0579_Alien_Blitz_ capture_2014-07-16_14-00-31_0486_Alien_Blitz_

It’s not a huge difference, but that’s the small things…

 

Dynamic lights

That’s quite a huge part, up to now lights were pre-calculated and stored in a 2d map. Then when computing vertexes lights are taken into account and sent to the shader part. It is kind of light mapping, but simplified.

This part will always stay the same, but I’ve now added some dynamic lights, those are lights that can be created/moved/destroyed at any moment.

I’ve decided to do them differently, these lights are rendered on a texture (2d top view texture), and this texture is then passed to the voxel shader. I don’t know if it’s the best approach performance wise, it seems pretty good so far but it will require more testing (and optimizations…)

And for this special event I will try to publish a WebM video (might not work on Internet Explorer… but who cares?):

It seems better than GIF (file is around 50 times smaller than its gif equivalent, and it has a better quality)

This feature is of course a work in progress, there are a few glitches (lights that sometimes can’t blend, lights are in front of missiles because of position interpolation,…) but it’s a good start in my opinion.

capture_2014-07-16_22-22-26_0799_Alien_Blitz_

Dynamic lights will only be available on PC and in 3d

Comments are closed.