About directional lightmapping ...

Ask questions about mapping in general, and show off your in-progress work.
Posts: 30
Joined: Thu Dec 12, 2013 5:35 pm UTC

About directional lightmapping ...

Postby Spiney » Mon Sep 08, 2014 12:05 pm UTC

So the game does normal mapping on map geometry by storing the direction of the incoming light.
One of the issues with storing a single light vector is that you have to work with averages when dealing with overlapping lights.
This creates some strange behavior in cases where there's a sudden change in light direction.
It is especially visible for the specular highlights, sometimes the specular might even make the shadow appear brighter than the lit area.
Some examples would be small radius bright lights on some maps for things like wall lights, or a spotlight shining through floorgrates.
There's also potential issues with shadow penumbra where the one dominant lights source fades into another, causing a low-contrast fringe to appear around the light.

I was wondering about ways to avoid or fix this.

1. Have the ability to mark certain light sources to only contribute to light intensity but not direction. This would need to be supported by the compiler.
2. Use lightstyles on fail-cases to do a second pass over the world geometry, this would be more expensive and would need compiler support.
3. Use dynamic lights for certain lights, this would be more expensive.
4. Blur / Lowpass the lighting directions to hide obvious artifacts.

This is not an issue with the engine, it's a limitation of using light maps to do normal mapping.
Here's an example of the issue in Unity:
http://forum.unity3d.com/threads/direct ... ct.134335/
User avatar
Project Head
Posts: 2137
Joined: Fri Aug 03, 2012 11:50 pm UTC
Location: Berlin

Re: About directional lightmapping ...

Postby Viech » Wed Sep 10, 2014 10:02 pm UTC

You are correct about what you outline but I don't think we have anyone capable of doing this on our team who isn't yet occupied with other stuff. After all, most of this would require vast engine changes to work.
Responsible for: Arch Linux package & torrent distribution, Parpax (map), Chameleon (map texture editor), Sloth (material file generator), gameplay design & programming, artistic direction

Return to “Level Design”

Who is online

Users browsing this forum: No registered users and 2 guests