Use average value of emissive texture to drive RGB value of area light in eevee

Hi there,

I’m trying to render a TV screen in eevee, in a dark environment with a little bit of volumetric scattering. I currently have an area light in front of the screen to simulate the light emitted by the screen, but it would be nice to be able to use the video texture that I’m using for the screen to set the colour and the brightness of the area light. Is that possible any way?

Interesting! Please post your results when you find a solution. I’m not very well experienced in eevee, but can’t you set the texture on an emission shader and disable camera visibility? (or would that only work in cycles?)

Try with drivers. In my opinion is the easiest and best solution.

The screen itself is already an emission shader, but in eevee emission shaders don’t act as actual lights.

Hmm see if this can help you: https://blender.stackexchange.com/questions/99631/how-to-make-mesh-lights-work-in-blender-eevee

It sounds like it should work, but with some extra work and not the complete light feature set though.

Yeah that’s what I thought, but I got as far as adding a driver to the color field, opening up the drivers editor…

I don’ think that’s updated every frame though unfortunately, unless it’s changed since.

In cycles, why not just texture the area light?

In cycles, yeah that would be fine, but not an option in eevee I don’t think.

I think something like this should work for eevee - or maybe voxel cone tracing

once it’s ported to vulkan some of these options may be able to be integrated from existing git repo.

I can’t help with the drivers but, if you want bounce light from a solid object and your emissive object is in screen space and isn’t fully occluded maybe this would work: Fake SSGI in Eevee There’s a blend file bit futher down.

1 Like

That looks really good, but really I’m just trying to get the emission shader to create some nice beams of light in the volumetrics. That said, having a load of area lights for multiple TV screens (I’m experimenting with a video wall at the moment) slow eevee down quite a lot, so maybe faking the volumetric effect from each screen would be a better way to go about it

Only way I know to get samples from texture to numeric data is animation nodes (extra nodes branch). First time actually using it so this is the best solution I could come up with:

  1. Sample image sequence texture withing animation nodes.

  2. Output the color rgb info to empty’s location (coudn’t get AN to change object properties for whatever reason)

  3. Add drivers to light’s rgb values from empty’s transforms.

Getting the average would just be getting multiple samples and dividing. Don’t know if there’s better built in fuctionality in there for it, google gives decent amount of results, but I didn’t dive deeper into those.

Blend file (requires animation nodes with extra nodes):

Light_SampleTexture.zip (2.4 MB)

Edit: I also had trouble with AN texture input seemingly randomly stop reading values from the image sequence, changing any property in the texture tab fixed it.