Thursday, June 19, 2014

UE4 Time of Day Setup

My blueprint for a fully dynamic day-night cycle setup.  Download here.

Quick setup instructions:

- Extract archive;
- Copy the "Content" folder into your project folder (it should merge with the content folder already there);
- When it asks if you want to merge folders, say yes;
- Launch UnrealEd, and load the project you copied that folder to;
- Go to 'File > Open Level' and choose "TimeOfDayTemplate.umap" (it should be located under \YourProject\Content\Maps);
- Hit simulate, and watch the sun move!

Experiment with the properties in the blueprint.  I've written comments for all of them (I think), so it shouldn't be too hard to figure it out.  Quick tip: If you want to change the speed of time, "Time Speed" is what you're looking for.

For more details and information, see here:


Version 1.2, 6/23/14,
Added support for a moon;
Improved organization of variables, added new "ToD - Debug" section;
Fixed sun to move from East to West;
Sun's rotation is now calculated from a curve, use this to set sunrise/sunset times;
Added sample map;

Version 1.1, 6/19/14,
Changed sun's rotation to be based on time, not vice versa;
Split into multiple functions, for readability;
Various minor improvements;


  1. Hello, thanks for the time of day tutorials and the files. I got a question and perhaps something you could add in the future. How do you implement a moon into the time of day? I tried adding a second directional light sun but cannot figure out how to change the second sun to look like a moon? Any help would be appreciated. Thank you for the great article.

    1. Wish granted, new release has support for a moon in it! :)

    2. Hello Greg,
      My sky and night is split in the middle and my sun and moon are not moving but my lights are...What am I needing to do? Can you post a youtube step by step video? OR email me a step by step? I am VERY new to BP's and I installed it right I just don't know how to setup in my is my email.

  2. Awesome work, this is what I was looking for!!

    I'm stepping through each peace of your blueprint to understand the concept behind your work. I want to add the T_Moon texture in the M_Sky_Panning_Clouds2_Custom material. I found the Texture Sample for the moont texture, but this node is unpinned. Can you give me a hint where to pin this texture sampler to get the moon texture in the final result?

    Thanks in advance!!

  3. Hey I think 4.6 broke this :( I downloaded it and did everything the directions said, including rebuilding my lighting, and the sun still doesnt move and is stuck at the horizon :(

  4. The site contains a very great article. the information present in this site will be very useful for us. thank you for sharing the blog with us.
    ROI Services in Chennai

  5. It is important for theology & religion writing service students to seek Religion & Theology Research Writing Services from a reputable theology & religion research paper service provider for their custom theology & religion assignment writing services.

  6. English literature assignment writing services are essential for English literature coursework writing service students and English Literature Writing Services seekers.