I’m creating an oniric space in unreal, and I created a world sphere with a changing color texture. The logic of that color change is shown in the next screenshot:
Now I want to change my light’s color in the same way as the world sphere, but I have no idea about how can I cope that.
I tried making the sphere texture an emissive source so I don’t need any lights, but it’s not affecting the world, I suppose that’s because the sphere is too far from the player’s position and the light doesn’t reach.
I already thought about that, but I can’t just copy the material logic into the level blueprint or viceversa, since their nodes are not compatible, so I’m a little lost about how could it be done.
just do the same math in a ticked blueprint and set the light colors. it’s a global “in software” operation. no need to compute this in every material shader. and per pixel.
Recreating the same math it’s not working for me. It’s the first time I try to do this, so it surely is due to a mistake in the logic, but I can’t find the issue.
well… in bp you have delta seconds not an absolute time. you gotta add it to a global time parameter and maybe frac it to not overflow the numeric value for this very effect.
I don’t really catch you. I’ll check some info about global time because I’m a bit lost. If you want to explain me better I’d be grateful, but you helped me a lot already!
It’s solved! I just replaced the material color change logic by a vector parameter, then applied the math of the last screenshot into it in the level bp every tick.