Download

best option for manually controlling a day night cycle

Hi there

I need to manually control a day night cycle (more specifically from dawn till dusk) in game where I can click on screen to define the time of day ie click on the left of screen it will be dawn, middle of screen with be noon and right will be dusk preferably I can click and drag to have more interactive control. What is the best way to approach this? the point of view will not change in this example, is it better for me to use Matinee or use a timeline or just blueprint it from scratch? any guidance will be greatly appreciated

thanks

All you want to do is adjust a single variable that you have for your time of day. You can set this up with a UMG slider, just tweak it’s design to match your requirements. There are plenty of day/night tutorials around for you to follow.

Thanks Zoltan, I’ve got the Day/Night cycle running and a UMG slider displaying as an event begin, I know how to remap the values of the slider to the appropriate values for the rotation of the directional light - I’m now stumped on how to link the slider to the rotation of the light, any ideas or links to tutorials or something

Just jump on youtube and search for Unreal 4 day night cycle and there is a bunch there that will show exactly what you need. They all rely on rotating the sun around 360 degree, so all you want to do is map the variable of that to the slider.

I’ve seen some day/night tutorials, but what about on mobile? I’ve noticed my lighting is 50% of my frame rate drop, so how do these day/night systems perform on mobile? And also I don’t have a new phone, is there anything that can help me know if my game will run well on some new phones?

Dynamic lighting is always going to be an fps hit on mobile devices so you will want to use it sparingly that’s for sure, baking as much lighting as possible is going to help you in the long run, but since you are doing procedural stuff i guess you are kinda stuck, just don’t use movable lights unless you absolutely need to.
For testing stuff on mobile you really want to be testing across a range of devices. Emulators and the like on PC don’t go so well with running 3D so it wont give you an accurate representation. Not sure of the best way to go about this honestly but im sure guys who have released some across mobile and desktop would have some decent insight.