Download

Advanced Day Night Cycle

Actually the GMT is automatically handled in blueprint and you just need to use the local time for the lat/long you are setting , and you are good to go.You can see a “Game DateTime” variable in the main blueprint properties, just use your local game time and date. And GMT will be taken care of based on lat/long

Thanks…

Hi ,

Yeah that is because in the runtime , several colour grading textures are being loaded, at about 8 o clock the morning textures are loaded , and with a color grading intensity close to 0.6 we will get result in the runtime similar to the screenshot you posted , if you want to disable colour grading , you can simply set the intensity to 0. If you want to minimize the intensity of a particular time of day , say at morning , you can use a for loop iteration in the construction script , like I have shown in an above post , then determine sun’s elevation angle during morning time , from the colour grading texture look up array in the blueprint , or also by observing the angles manually during runtime. And if it falls between that range (during morning , maybe between 20 to 80), minimize the colour grading intensity till you get desired result.

I turned color grading to zero. It is not as dark but still very dark compared o the non play mode. Without getting into the blueprint is there anything else I can modify?

EDIT: I got it a little better by reducing the max brightness. I would still like the sky to be a bit lighter.

4b3add5513314f1d1820e36c20997d886e0cc163.jpeg

The min and max brightness play role in adjusting the sky brightness definitely , however to get the result like in the non play mode , you just have to unplug the post process section of the event graph in your main blueprint.

I packaged the project. Is there away to disable the running screen info so my client will not see the running date and time etc?

Thanks,

Aaron

Hi,

yes , just uncomment the Creating Widgets section in the event graph of the main blueprint, as shown below

8958369ee9b2c553fc7a14d5d8c97dae8a4a5e7e.png

For some reason I’m not seeing this in the blueprint. Can you show me where I can put in the exact time? I’m guessing setting the exact time basically runs the whole system? Wouldn’t world GPS coordinates be more accurate? Also, there’s no map in the Maps folder (or Sprites in the Sprites folder) - should there be?

Edit: I’m just now noticing some additional options in the widgets - is this where I would put in my time? The widgets are nice for demoing your product but won’t be in my game. I need to have easy access to edit exact parameters for this day/night system, as well as hooks to edit it in real time during gameplay to adjust for storms and such. How can I do this easily?

If I can’t do it easily, how long until something is adjusted to make it more user friendly?

Yes , there are files in those folders, as you can see in one of the screenshots posted by asmithey. Gamedate time can be directly set in the detail customization panel , and system date time can be used by checking “Use system datetime” checkbox. You can disable the userinput widgets and the in game widgets by unplugging the respective comments “User Input Widgets” , and “Creating Widgets” from the main blueprint. You can also put the time in your userinput widget in runtime like you said, but since you are unplugging it anyway , you won’t be needing that.

If you still face issues , once I reach home I will explain you with screenshots. Also I will soon update this. Let me know if you need additional features or anything that is currently not very convenient.

Can you please re download , to check if the files are there in those folders ?

Re-downloaded the package, still nothing in the maps or sprites folders. Here’s a picture of the detail customization panel (as I understand it) on the right: http://i.imgur.com/me46hPD.png

I don’t see any options here for setting time.

Hi,

That is the sky blueprint. There is one more blueprint called AdvancedDaynightCycle in the Blueprints folder. You need to place that in your level. I am sending you the package. Give me your email id.

PMing it to you.

Thanks for the support!

Hello,

I bought this package and I must say, it is a pretty good package. I do have a couple of questions though:

  • I need to calculate the various seasons (spring, summer, fall, winter), how would I go about getting what month it is (1: January -> 12: December) and setting it to a variable such as “CurrentMonth”?

  • Is there a time scaling, for example, 1 minute in the real world = 1 hour in the game world? I thought I saw this in the details panel, but it didn’t work properly… though I was playing in the viewport

  • The create widgets section has several (3-4) errors, which I suspect is an issue with fixing redirects after I restructured the content folders into my project… as I don’t need to create user widgets, from reading above I can delete/remove this section, correct? Due to the errors, the blueprint won’t compile, which I suspect is the cause of the above issue.

  • As I’m not at home right now, I guess I can ask… what variable do a call to get the current time in game?

1>You want to know the current month ? here is how -

e91c4c8468a8fc422f195eaff8b802cf2b1df41d.png

2>Time scaling is there in the details panel , but everything is set up to work in play mode and not in the construction script. Below is the variable which sets the time factor. A factor of 3600 means game time scale is same as realistic time(1 game hour = 1 real hour)
086bdb6d93a6bda70a0d476625f0e545f538f7e0.png

3>Everytime you unplug a CreateWidget method , you need to remove the entire thing , because CreateWidget function needs to have something plugged. A nice bypass would be something like this (make the simulationOn variable to True by default-

Capture.PNG

4>Here is how you can call current time -

f4be5f5abd0b0fe2491222ef3fbcbdef1c0de1ad.png

Let me know if you have any further questions.

Hello,
I just wanted to ask about the moonlight. I created a blank third person blueprint project and added the cycle to it. I loaded the test level and tried it out (clicked Play, didn’t change any values), however the moonlight doesn’t appear to be creating any light. I’ve tried adjusting the intensity in the editor and regardless of whether I set it to say 9 or whether I set it 0 the lighting doesn’t change for me in game. When I set the setting in the editor the map instantly becomes washed out (if set as high as 9) but not once I click Play. I was expecting the map to be quite brghtly lit as though it were a full moon and my character illuminated since there’s nothing in between the character and the moon to prevent light reaching it.

Also I’ve attached a few odd graphics glitches I experienced at sunrise/sunset as well. After several loads they suddenly stopped happening so I have no idea why that was happening, but figured you might be interested - the third picture is strange banding that happens on the map at sunrise/sunset - after the other two glitches stopped happening this one remained and could well be (in fact they all could be) engine bugs - I admit it could also be GPU drivers but I’m up to date ont hose.

Thanks.

Sorry about the Moonlight confusion , you need to set it in the blueprint like this :

d8449d8512f4338e68e678f741e9488259d404c4.png

In the parameter where a factor of 0.05 is mentioned , you can set to whatever intensity you like , however that will only take effect if moon elevation is greater than 0. To further enhance the brightness of night , you can increase cubemap intensity in the construction script as shown below :

e5347e597d6329642ad3c5fcc7f8d5031b1fac95.png

I am not experiencing any graphics glitches at any point of time in the entire 24 hour cycle. Maybe it has to do with your GPU ? Is it possible for you to try it out with a better GPU? Do you experience this glitch usually , I mean without using my pack ? You can test this by using the default skysphere and varying the sun height.

Capture.PNG

No, the problem doesn’t affect the normal sky sphere and I’ve tracked the problem down to the colour grading - if I disable it (set it to 0) then the problems no longer occur.

In investigating this further I’ve noticed that throughout the entire cycle I can see the colour grading (when enabled) pop between colours but that the orange of sunrise/sunset makes this all the more noticable, so if I set the time units to make the sun move slower than default I can actually watch my shadow pop between orange and black.

Also if watching the sky, the sky will flash with each colour change so won’t smoothly transition between the colours, here’s what the sun looks like as it colour changes - I can’t show a picture of this happening at sunrise/sunset as the sun becomes so blurred as to match in with the sky colour and be difficult to really see. The shot on the left is the flash, the one on the right the normal sky.
e5b3dfb65bddde9c16b4feffaf46ea3c05b554ed.jpeg

It’s almost like the sun has inverted itself.

Also, if I rebuild the lighting this can fix it temporarily (not always though) and allow me to use colour grading, however if I save the level/project, close the editor and relaunch the editor again the problem has returned as soon as I click Play to rest.

Hi , this issue is not happening to me anymore , can you please set both the adjacent post process elements as Enabled , as shown below ?

Capture.PNG

However , not sure if it will occur in some specific scenarios. I am keeping my investigation on , and will soon update this. No worries. Keep me informed for any issues.

Sadly, enabling that checkbox has made no difference and the problem remains.

Sameek4,

I have my lighting all jacked up. Can you help clear some things up for me? The project that I am working on is an arch-viz project. Same one I posted the images of in this thread. I am having trouble understanding what light model to go with. Static or Dynamic lighting and what those actually mean. From what I understand is if the have the sky moving I need to set up dynamic lighting? I want to have the day/ night cycle running while the client moves around the project. I think I have a mx of the two light models going on. All my surfaces facing down have all of a sudden turned black. Not even sure why that happened.