Light Falloff through a grid I'm playing with a grid-based lighting system, where light is transported and accumulated through a grid. I initially tried attenuation based on 1/(distance*distance), but that doesn't work when the distance between each node is 1.



I tried hacks like adding an epsilon or clamping the distance, but nothing looks right. I'm sure there's something obvious I'm missing. Any guidance?
It looks to me like you're resetting the distance calculation at each grid intersection? So every time you march another grid cell you're dividing the light intensity by $gridsize^2$ ? That would explain your observed results, since dividing by $1^2$ equals no change. It won't give you the correct result though, since to get the right attenuation you need to track the total distance back to the light source and square that. 

Also note that the attenuation term used in rendering is usually a bit more complicated than just $1/D^2$ - generally it's a quadratic, $1/(aD^2 + bD + c)$. While not physically correct, it's more tunable and easier to get visually pleasing results. In your case, for example, using $1/(D^2 + 1)$ would prevent the edges immediately surrounding the light from being brighter than the light itself.