BzLgt v1.0

What is it?

Similar to the other BZ DOS utils, BzLgt converts from bmp to lgt and back again.

How to use it -

To create an 8 bit greyscale bmp, just drag and drop a lgt file onto the exe. Once you have edited the lightmap (in photoshop or whatever) drop the bmp back on the exe and a new lgt will be created.

But why?

It exists because I want the lava in my levels to glow, regardless of where the shadows are falling. Also, programs like photoshop can do a much better job at making lgt files than "bzone /edit" does. eg. If you just take the existing file and hit it with a small gaussian blur, it softens those hard shadows edges out. I dunno, You could use it for all kinds of stuff... one example; night missions with lit up areas around the bases. That would look especially cool if you also shifted the palette a bit to make dark colours bluer and light colours yellower...

Stuff to know:

Internally, hgt files and lgt files are both chopped up into 128 x 128 chunks, but the lgt file has an extra chunk in it which gets used for the flat areas which surround maps. BzLgt doesn't allow you to edit these areas directly, instead, it uses the value of the top left pixel in your lightmap for all areas off the map.

Photoshop stuff:

There's a few things that are best explained by example, so this is the process I use for editing.
Make a height map in photoshop.
Convert to hgt with bzhgt.
Run bzone /edit, allow it to generate a lgt map, take a look around see what needs fixing. Convert the lgt to bmp with BzLgt. Load up the new bmp in photoshop.
Select all. - Copy. - New File - Paste.
(this is because the bmp file is 8 bit, and photoshop doesnt support layers and stuff in 8 bit. Keep the 8 bit file open though, if you paste the final image back into it, it will automatically have the correct greyscale palette) Then, get the original height map, and paste it into the new file, setting the layer to 'overlay' Looks better already, doesnt it? Adjust levels on the height layer until it looks right.
Now, I wanted glowing lava, and lava is always height 0... so I paste a second copy of the heightmap and invert it so that black becomes white and vice versa, then I adjust curves right down so that everything on that layer is pitch black, except for lava, which is white.
Set that layer to screen, and presto, glowing lava. It's a bit hard around the edges, but a gaussian blur of about 2 pixels fixes that. Some of those shadows are still too crisp, so apply a small blur (0.5 pixels) across the original lgt layer. Flatten all layers. Copy and paste back to the 8 bit file and save it. Check that the top left pixel is the colour i want around all the edges of the map. Run the 8 bit file through BzLgt, and its done.
The above is just an example of one thing you can do with lgt files.. Here's another version I spent a bit more time on...
send questions, comments etc. to slight@evilbastard.org