Help please! Day/Night Cycle

Hey, i have been trying to figure this out however i am struggling. So i started with a timeline on the level blueprint aswell as a moveable directional light, and added a float track, and changed some of the numbers. Then tried lots of different rotation nodes but i couldnt figure it out. Please Anyone can help!
Theres some pictures of what i currently tried . Maybe i am very wrong and i new to this. Thanks.

ok for starters your directional light needs to be MOVEABLE.

Lets start with the light you are using as your SUN as an example. Place it in your level if there is already not one and then in the Details tab under MOBILITY change that to MOVEABLE.

The in your LEVEL BLUEPRINT drag the light in. From here you are on the right path and there a few different ways to do what you want and also how you want to see the effect.

Anyways start here and if you need more help I will be happy to help if someone else doesn’t jump in before I check on here again.

Thank for the reply…however i did set the default “directionalightstationary” to moveable. But instead of dragging it in… i addeda reference, but are theynot the same? Thanks for the help though.

You can take a look here: link text

Ok, so i have tried to figure this out a bit more and think i have something… the directional light cycles and you can see it with lighting changes… however the actual sun on the sky sphere doesnt move. When i hover over the 'Directional Light actor ’ property on the sky sphere, it says a description but i cant tell whether it will work… Anyone have any ideas on how to move the sun in the sky to follow the directional light?

Thanks, any more help would help.

Heres some pictures if it helps.

Set the Actors LOCAL Rotation :wink:

This is great and VERY useful. Makes it look much better. Thanks. However i have still not figured out how to get the actual sun from the skysphere to move with the directionallight… any ideas? Thanks for the help.

I’m not entirely sure but I think you use this


I am working on your question here

Yes, this is what i already have, however it still wont work! thanks for the help though.

Thanks for the reply on my other post, i saw the blueprint of the Skydome… however i instantly was confused and i really dont know where to start. So yes, thanks for the post!

I have a slight design for one, no pictures currently in at work bored out of my mind. The basic just is to have your event play begin node connect to your play on the timeline node, my timeline node is still under works but I plan to have a keyframe for every hour or two in game. Have the set pitch from your timeline, or whatever you may have called it in your timeline connect to a make rot node, connected to the pitch. The return value will be set to a set actor rotation node the target of which is your source of light, after words you would connect to whichever nodes you wanted, if you wanted to change the skypheres color or add on a different texture like stars or auroras, I’m still working on having a different sky pattern appear during specific keyframes, stil haven’t quite got that down. If you want to just go through the bp_skysphere that’s included you can connect the set node target of which will be the bp_sphere and that would be connected to the last node which update the bp_sphere. The target of the set node and the update node would be the sky sphere, that’s about the extent of my knowledge, that should be a good base for what you need, I’m trying to get one working that will changed the clouds and light color tons more ominous grey during hours that would technically be night but haven’t had much free time to dabble with that yet.

I have created a tutorial on how to implement day and night cycle in unreal. posting it here because someone might find this useful.
I have created another blueprint by extending the skysphere blueprint and the M_Sky_Panning_Clouds material is modified to add a moon as well.

Time of day system : Unreal Time of Day - UE4 Open World Tutorials #21 - YouTube

Adding Moon to sky sphere : Unreal Moon with SkySphere Material - UE4 Open World Tutorials #22 - YouTube

Moon phases : Unreal Moon Phases - UE4 Open World Tutorials #23 - YouTube

Lighting based on time of day : Unreal Time based Dynamic Lighting - UE4 Open World Tutorials #24 - YouTube