So I had this idea after reading an article about how they created the lens flares in Gravity to try to recreate something similar in After Effects.

http://www.3dartistonline.com/news/2013/12/creating-gravitys-earth-stars-an...
So the idea is to photograph a led light shining straight into the lens in a 16x9 pattern giving me 144 stills.

I'm thinking that it should be possible with expressions to link a null object with expressions and time remapping so when you move the null across the comp the flare images swap to image with corresponding placement of the flare in the grid.

I've looked at some expressions that for instance swaps a mouth according to rotation or an up and down slider.

https://vimeo.com/11602929
But I need it to change according to it's x AND y position.

So just to clarify. Say we have an 1080p comp and we divide it in a 16x9 pattern, each pattern is 120x120px.

If the null is anywhere inside the upper left pattern (x,y=0,0 > x,y=119,119) we see FlareImage01. If we move the null to say x,y=120,0 we see FlareImage02. x,y=240,0 FlareImage03... up to FlareImage16

But if the null moves down on the y-axis to x,y=0,120 we see FlareImage17.

I realize it will probably be a bit choppy result since there isn't any transitions between the images. I'm more interested if it's possible to create.

So if someone has any ideas how to solve it or any good links with similar solutions pleas let me know!

Thanks!