Timeline won't drive Directional Light color

I have a timeline in my level blueprint called “Light Color Timeline” that is a vector that is supposed to drive the RGB values of the Light Color of my directional light over time. However despite getting good RGB values out of the output vector of my timeline on the event graph (print string, they are all changing as intended), the Directional Light in my scene (sun) just won’t update its values (details panel) when I play the game. But I have noticed the following:

  1. If I plug an “event tick” into the “play from start” input on the timeline in the event graph, I can get the R value to wobble. It seems to start to do what I want, but resets and plays over every tick (several times per second) and never plays the entire timeline. (And only the R value! G and B do nothing!) If I plug it into the “play” input instead, it does nothing, as if event tick weren’t connected at all. Event Being Play plugged into “play from start” also does nothing.

  2. I’m able to change the RGB values over time of the “overall color” for the SkySphereBlueprint no problem. This kinda does what I want, but the effect is not as strong as changing the directional light color itself, which I can do of course manually in the editor to preview what I want.

This is pretty frustrating. Seems like it should be really straightforward, but it feels like something might be overriding the directional light color. Well unless I do #1 above, but then only the R value changes, and not how I want.

I’m stumped. Any ideas? I’m fairly new to Unreal so go easy on me. :stuck_out_tongue:

Hi again. If my question is confusing please someone ask for more information. I do believe this should be a simple thing to implement. I already have timelines driving the rotation of this directional light over the course of a “day” with no problem. Thank you.

Can you post screenshots of your event graph setup and inside the timeline please? Also dont play Timeline with EventTick.

It works as expected for setting the “overall color” in the SkySphere but for the directional light it does nothing. In fact, if I manually change the directional light’s color, upon playing the game, it immediately gets set back to white. So something is definitely overriding the directional light color, but I can’t figure out where.

I think you need to scale your ranges from 0 to 1 rather than 0 to 256

It’s actually going from 0 to 255, not sure why the graph shows that. Are you sure? Because the DirectionalLight color RGB values in the “Details” panel in the editor go from 0 to 255, and the RGB values the timeline is spitting out are correct, and plugging into the RGB inputs - and it works as expected for the “overall color” of the sky sphere. What makes you think the range for DirectionalLight color are 0-1?

Here is what the sky sphere Light Color RGB values look like while the game is going:

Screen Shot 2015-10-08 at 1.16.22 PM.png

They are rapidly changing and look to be hitting my set values at the appropriate time. The DirectionalLight values tho are static.

As Dannington said, when using the make colour function the input values should be between 0 - 1, it outputs a linear color. If you don’t want to change your timeline, just plug each value into a Normalize node, with 0 as min and 255 as max.

Give it a try. Most values are floats for things like this in ue, we’re not locked to an 8bbc colour space. I’m actually surprised the sky one is set up this way. I imagine it too is designed to take floats, then a multiplier boosts the overall level - as there’s no ceiling on the floats you’re just boosting it past 1. Also, just to check, have you got something plugged into play from start? If you have and it’s a key press, have you enabled input on your blueprint?

Thank you for the replies. Interestingly enough, using the Normalize to Range nodes or not produces the same results. So there must be something built into Make Color that can accept either. I appreciate you bringing that to my attention tho. :slight_smile:

I do notice now though that when I play the game and mouse over the “New Light Color” pin on the “Set Light Color” node in my blueprint, I am seeing the proper RGB values (see attached) in the tool tip. However using either method, normalized values or not, I’m still not getting the light color to update in-game and it is remaining white. While playing, if I try to adjust any of the values (RGB) and release the mouse button, they immediately snap back to 255.

Screen Shot 2015-10-09 at 11.11.47 PM.png <– shown during play

So something, somewhere, is overriding my light color. But in the sky sphere blueprint, the only reference I see to the light color is “make the sun color the directional light color”, unless I am understanding it wrong.

To answer your question Dannington, no, I am not plugging anything into Play from Start; I just have the timeline set to auto play and loop.

OK, autoplay and loop must be a new thing. I’d suggest plugging a random float generator set from 0 to 1 into the set light colour node just to see what it does. Once again, its definitely not 0 to 256. I’ve never used that node before, but it might be clamping from 0 to 1 meaning it will snap to white whatever your putting into it. If the normalise node isn’t working try the map to range node.

Interesting! Using 3 “Random Float in Range” nodes (0-1) plugged into the “Make Color” node does seem to work, and is turning my map into Disco Zoo. I will try the map to node range node.

Success! It is working now. Thank you all so much for your help. :slight_smile:

Here’s a pic of the working blueprint.