Lightmapper first pass

This time I’m way behind schedule. The lightmapper was always going to be a huge task. It didn’t help that I didn’t have as much free time as I’d hoped. By the schedule, I should have shadow mapping working already. If I can really push myself for the next three weeks, I may be able to get shadow mapping in by mid-October.

In its current state, the lightmapper is very limited. Point lights only, lambert shading, poor layout of the UVs, one lumel per world unit, and only axis-aligned polygons are really supported. The results are fine and it was a struggle to get to this point, but I think the path forward for the future of the lightmapper work is clearer. Below, I’ve uploaded some screenshots from the editor after getting the UV mapping working as well as some images of the lightmap itself.

Incorrect UVs. It was an issue assigning them to the vertex stream.

UVs fixed, but the lightmap is still incorrect.

Working lightmap. This is the debug view, where the +X, +Y, +Z, -X, -Y, and -Z values map to red, green, blue, cyan, magenta, and yellow.

Bilinear filtered result.

The greyscale version. Lights are not yet assigned colours so it’s just the intensity for now.

Bilinear filtered result.

Here are the raw lightmaps. The first one is what gets used in the end, the second is the debug version early in development with an incorrect V direction. The last image is what I started with before stripifying the UVs. These have been scaled 5x from a 64x64 texture.

There’s some ugly bleeding due to the bilinear filtering, but it’s a lot better than before. Plus, it almost looks like free ambient occlusion where the neighbouring lumels are black.

At this stage, with six weeks left in total, I don’t want to try and go beyond four weeks working on non-polish tasks. The lightmap needs to be converted as well as the scene geometry for the Dreamcast. If I can get that done over the weekend, I may be able to try and spend one more week trying to get the shadow mapping working. If I can’t get the shadow mapping working by the end of next week, I’ll abandon it in favour of content creation.