So I want to change the Horizon, Cloud and Zenith Colors upon trigger, and I can’t seem to achieve exactly what I want. I have tried 2 approaches :
- I tried using Set Vector Parameter Value on the Parameters of Sky Material, and fed the output of a CInterpTo to the input value. I then called the event with a timer so that CInterpTo could feed new values everytime it ticked.
- I also tried using set Zenith Color, Horizontal Color and Cloud Color directly using the set nodes, like this
This is my Timer:
So a couple of interesting things are happening here:
Without CInterpTo, everything changed to black instantly, just as it should. Then I started off with hooking up just one value to CInterpTo for testing, and thought to replicate the approach for the other 2.
-
In the Set Vector Parameter approach, I first started off with just the Zenith Color (Exactly the way I’ve shown in the first screenshot). When I triggered it, The Horizon and Cloud colors went black (just as they should because they weren’t hooked to a CInterpTo), and the Zenith changed to something brownish. After a while trying to figure out what’s happening, I played around with the value of Delta Time and realised that the Zenith Color was a sort of interpolation between current color and black, based on Delta Value. Like if I gave a value of 1 (equal to Interp Speed), it would instantly go totally black, if I gave around 0.5, it would be more like brown, and so on. WHY ? Why and how does Delta Time value control the color ? And again, it wasn’t lerping, just one instant transition.
-
With the direct Set Zenith, Horizon, Cloud approach, nothing is working at all, not even without CInterpTo and just direct assignments. But WHY ? I even have the Colors determined by sun position unchecked. Why can I not set these colors here ?
I am barely a month old with Unreal and Blueprint, so I understand I might be doing some things wrong. One of the suspicions I have is that could it be something to do with the different kinds of Colors - LinearColor, Vector Colors (Or colors represented by vectors ?) and then I guess there are some colors with masked alphas that prevent Interpolation ? I am not sure, I’m very confused regarding all this and any nudge in the right direction would be greatly appreciated. Thanks