Lit pixels (luminosity channel)

This is an abstract suggestion that I just thought of, perhaps flame bait but I’m offering the idea anyway, and I’m sure other people have thought of it already.

We all know what alpha channels on a texture are used for. What I’d like to see is a luminosity channel and also a glow value, so that the face of a surface using said texture could be lit accordingly (luminocity) as well as light surrounding pixels AND other nearby faces (glow value).

Computing technology cannot handle putting a light on every pixel, of course, but tricks can be performed to accomplish the task. For example, the average light value of an area of pixels on a texture could be calculated, and a light placed there. Also, the default should of course be 0, and where 0 (or a value range of x to y) is determined, no light is placed. You could also specify the size of the area to determine said average, embedding this value within the texture file itself.

There are “cheats” that could accomplish this task in an application without modifying OGL by simply dropping lights throughout a scene, but the reason why I post this here is because if OGL implemented this it could be optimized on the video cards.

Just a “cool thought”, I guess.

What you call a “luminosity channel” is already straightforward to do, even in unextended OpenGL 1.1. It’s just an alpha or luminance texture drawn as a second pass with lighting disabled, EQUAL depth-test and additive blending. I’ve no doubt it can be done easily in a single pass on more advanced hardware/drivers.

What you call “glow value” sounds very much like a special case of radiosity. AFAIK there’s no chance of being able to do this efficiently on current hardware - it’s one of the Holy Grails of realtime graphics, along with correct order-independent transparency and robust, high-quality generalized shadowing.

Actually… you could probably get a decent “glow” using a 3D texture for the additive-unlit pass. But texture memory requirements for any but the most localized effects would be prohibitive.

Originally posted by MikeC:
What you call a “luminosity channel” is … just an alpha or luminance texture drawn as a second pass with lighting disabled
No, I specifically am NOT talking about passive lighting, but generation of a light source, so that other faces and meshes can be lit from it as well.

What you call “glow value” sounds very much like a special case of radiosity. AFAIK there’s no chance of being able to do this efficiently on current hardware - it’s one of the Holy Grails of realtime graphics, along with correct order-independent transparency and robust, high-quality generalized shadowing.
Understood.

Nonetheless, it was not the task to accomplish so much as the approach that I was suggesting, without respect to “doability”. Specifically, a per-pixel texture map for effectively generating light–not just turning light off and rendering the pixel at “full blast color”, but actually having the texture emit light as a light source.

Obviously, as you say, what I suggest is unthinkable in today’s hardware. Meanwhile, of course, there will always be and always have been alternative approaches to basically the same end.

Just use multiple render targets. Bind a couple of AUX buffers and render your luminance and “glow” to them.