I have a texture movie attached to a material that is attached to TV static object. I also have a spot light in front of the TV using Light Function to simulate light coming from the TV effecting its surroundings. It’s working great, except my light stays white. Is it possible to have my movie texture effect the color of the TV light as well?
If the movie is a short loop the quickest thing will probably be to manually observe the clip and decide what the color should be at that frame, then animate the light to drive it in sync. It’s an easier option than looking to automate it by analysing and averaging the color information I expect.
Thanks for the reply. Unfortunately it’s not a short loop and manually animating the color change will be very time consuming. Im also interesting in finding out how this could be done automatically as well.
So no one has an idea on how this is done? There is no way to animate a light’s color from a image reference or blueprint?
I don’t think you can do this with Blueprint at least. I think it would require C++ programming.
You need to read the pixels of the MediaTexture. I assume you’re using the Media Framework.
The way I’ve done it in the past:
- Create 3 lights, and parent them all together.
- Make one fully red, another fully green, and the third fully blue.
- Then create 3 light functions, and pull only the red, green and blue channels from your movie texture accordingly.
- Apply each light function to the corresponding coloured light, and move them into place.
They should add all up correctly to give you your correctly coloured light.
That sounds like a great approach, I’ll have to try that out.
That’s deep! Sounds like a very simple work around. I will give this a try! Thanks for your feedback.
You’re a genius! This works well. Only issue is if the lights are aligned, the result is white. Offsetting the lights slightly resolves this issue. Thanks again!
Hmmm, never had that happen before. Just a sanity check: your lights are set to Movable - not Stationary? But if you’re happy to have a slight offset, thats cool.
I didn’t have that problem either, all 3 dynamic lights in the same location, 2 parented to first one, just had some issues with rotation of lights from light function, was playing with spot and point. Not sure the best way to go for this effect, technique is promising though. I have to spend more time with light functions and playing with the effect.
Yeah, nice thinking.
For TV lighting, I just made a low-res version of my source video, and blurred it out. It helps to decrease the intensity of the green and red lights a bit as well, as I tend to find ‘TV light’ is more blue than anything else.
For anyone coming across this thread:
This plugin will do what you are looking for, and much more efficiently than using multiple lights with light functions https://www.unrealengine.com/marketplace/video-ambient-lighting
For $64.99?? I think I’ll stick with multiple lights and light functions. Let me know when the price is realistic.
$65 sounds reasonable to me, I could spend all day working on a solution and still not have anything as good.