Quote:Original post by Ysaneya
Dark mapping
Name is (copyright Ysaneya). I never heard anybody use this technique but in my engine i will mostly rely on this one, which is an adaptation of Lightmapping. Lightmapping is obsolete now; it simply does not work well with per-pixel lighting, which any state-of-the-art engine must have today. Dark maps are similar to lightmaps except that:
- they do not encode a color, but a "grayscale" brightness.
- there is one dark map per object and per light.
At run-time, you have one pass per light. When you paint the objects affected by your light, you render them using per-pixel lighting as usual but you modulate the end result by the dark map. This allows you to have static lights with soft shadows, it's pretty fast and does not have any particular requirement, but you can no longer use radiosity or global illumination solutions. Another advantage is that you can turn lights on/off independantly of each other.
A friend of mine made a map editor a while ago and the lighting stuff that was exported from his editor, as he described it, is almost exactly what you've said. So apparently there are some other people that have done it (first maybe, even), but I really wouldn't worry about it. He's even stopped coding now, so you've got nothing to worry about from that area, I don't think he'd care even if you did blatently copy off of him to begin with. [smile]