First of all, thanks a lot, TIG, I really appreciate your help! I've started to ask my friends familiar with programming about how to make a Ruby script based on Jim's advices, but you've actually wrote the whole thing already! It really feels great to be there, in such a friendly community. π
Plugin works great!
Hovewer, I feel really, really dumb for not thinking about the method proposed by RickW earlier. π It is really perfect: incredibly simple and producing really great results, especially with high-res gradient image.
Still, I think your plugin, TIG, deserves a release: as the default fog control window is perhaps insufficiently precise in some other areas - for example, for some styles of architectural visualization. I imagine it would be very useful with one small addition - the detection of a distance to the camera from a certain point on screen. I don't know if API allows to read that, but if it is, it would be awesome: you just click on some vertex and get a distance to it, allowing you to precisely configure the fog distances for your needs (or perhaps other things, like Depth of Field falloff range in V-Ray). I don't know, maybe distance determination would work better as a separate window (or even separate plugin), or maybe it'll be handy to instantly paste it to the fog values. Oh, well, maybe such a plugin already exists? π Nevertheless, great work and thank you again! π