“Bump” light from spotlight source
30.12.2007 Anton VolkovDespite all the russian holidays and clear Karpovich’s directive to forget about job and have some rest, I couldn’t let go an idea to make fast “bump light” not only from directional light source, but from spotlight too. This is relatively hard because light goes in all directions, so it seems that you’ll have to count lighting for every pixel… or not? I came up with an idea to modify normals map, to kinda “bulge” it in spotlight coordinates. Main issue is that it is not so hard to count it pixel by pixel, but it is slo-o-ow process. So I was forced to cast a spell find a way to modify normals map using standart Flash filters and blending modes.
We will use that in engine for sure, because our bet is do-it-once counting phases with further maps “baking”. When Hydra will come out with new Flash 10 we’ll just have to pass this routine to shaders.
Controls:
- Mouse move — move light source
- Mouse click — change light color
- Mouse wheel or +/- — change material’s highlight curve
- Ctrl + wheel or +/- — change spotlight size
- Spacebar — nex tex
I hope now I can finally turn loose now :) Happy New Year and Merry Christmas!

