How to get an average colour from a Texture Sample

Hi!

I am using Unreal Engine with alongside a virtual production piece of software, Brainstorm’s Infinity Set.

Through a plugin, it allows a material to be played that feeds through an input to be rendered within the Unreal Engine. This material is put on a virtual screen in our set.

What I am interested in, is a way to analyse this texture and get an ‘average colour’ in real time, that can then be used to set the colour of some dynamic lights within the set. In short, what appears on the screen and it’s average colour will set the colour of the lighting within the rest of the set.

This is the idea at least. Is it possible?

Thank you!

Hi,

I’ve wondered on and off about this since the advent of external monitor lights too.

The only close to practical idea I’ve had is to use a linear filter over the texture, reducing it down to 1 pixel (you could use the smallest MIP in the texture chain).

I’d be interested to know if anyone has any ideas on this too.