Day/Night Cycle With Clock - Unreal Engine 5 Tutorial
Вставка
- Опубліковано 15 вер 2024
- Today we are adding in our Day/Night Cycle but were also adding in a clock that will accurately display the time of day with the speed at which your light rotates in the world.
If you enjoyed this episode please consider subscribing. If you want a tutorial created let me know what you need to know in the comments.
We Also Now have a discord for anyone who needs help! And to start building a community of developers.
/ discord
This is part of a separate Tutorial series just looking at Environments and how easy it is to set things up for big MMO styled projects. If you are interested in the Haven Project please check out my FPS tutorial series.
Day/Night Cycle With Clock - Unreal Engine 5 Tutorial
#UnrealEngine #Developer #UE5 #UE4
This is pretty cool. I didn't know you could automate a day to night shift like this and it would be very helpful in creating this type of scene in your movie.
This is excellent, I hope you continue to make more creative content. Is it possible to do a video on walking backwards while facing forwards in ThirdPerson for UE5?
I should be able to take a look at that sure 😁 and thank you i appreciate the kind words 😊
Thanks. I have a very similar set up from a different tutorial, and although I can save and load the position of my sun and moon, I cannot get my clock time to save. Do you know which variable/s I should be saving and loading in order to do this?
In mine, I have been trying to save seconds, (which in your clock function is 'tick') but I just can't seem to get it to work. In your setup here, what would you do? Any thoughts?
This is an amazing tutorial, thank you. I wondered how exactly you would skip the nighttime, like you mentioned at the end of the video. I also wondered if you would know how to associate the time of day with a 'level' ie: Pikmin. You have from sunrise until sunset to do your tasks for the day, once nighttimes falls, if you're not back within a particular area, the player dies. Then, the next day cycle would start and begin the second 'level'. Any tips or advice would be incredible, I'm trying to get this implemented for my final project but I'm struggling to find what I need
So i did cover skipping night when sleeping at a bed in a later tutorial. You could use that as a stepping stone for what you need.
E.g. be at your bed by a certain time or you lose ect if you back at your bed next day begins. Its just about exposing that variable for the time of day and working out when it will hit the time you need. Then you can use that to determine when the player should be in a certain place
@2:00 When you clicked on the BP_Sky_Sphere, where did you get the Directional Light Actor from? Did you add a directional light into the BP itself?
No so you can drag from the content section in the editor window references to Cameras and lights into certain BPs
@@ue5bpguru538 I followed the Skybox tutorials but I cant drag and drop the directional light into the SkySphere_BP that I made. Is there anything I need to check for that to work? I know you said it only applies to certain BPs
Figured it out.. I think. haha.. I went to the Skysphere BP and added a variable. Named it DirectionalLightRef and turned on the eye. went back to the level BP and changed it to directional light from my world.
@stormrungaming thats absolutely one way of doing it too 😁 glad you got it working
Where did you get the BP_SkySphere from? I use UE 5.1 and there is no Sky Sphere in there
It will be in the engine contents. Sometimes you have to choose the option to use the engine content. You will have the Skysphere somewhere as i assume you have it in your project when you first open it up?
@@ue5bpguru538 I will check, I know I don't have it on my map, but I will check in the Engine, thanks :D
Mine keeps freezing rotation at -90 in the sky.
The same thing happens to me, did you find the solution?
Hey, great video, however I'm having an issue where the sky (SkySphere) is only dark very close to midnight, it's basically dusk or dawn constantly during night. Any suggestions?
I would play around with the Expo Fog, Sky Light and Directional Light settings to help ease those effects. They have always been too much as a default to get a nice day night effect straight out of the box
Hey this is what i need, but im using my BP you made for our skybox atmosphere, how do we add the sun and moon to it for this tutorial so we can like add our own custom stylized ones into that match our skyboxes? that would go really good with this!
Honestly i dont think it would be easy to pull off. With the space skybox you can add planets and a sun ect in a set position however if you want a day/night cycle within that it would be a whole other ball game.
You could smoke and mirror it by adding a physical sun into your scene and having it move on a spline but it wont give you the best effect tbh
@@ue5bpguru538 I think I have an idea just need some time to play around with it, and If i come up with something ill post it in comments
Could I do a get time data and base it off the players real time clock?
Thinking of linking this to the pokemon clone tutorial when I finally get the motivation to do unreal more instead of getting some videos together to relearn it after a year of not making anything in unreal.
Instead of the base 3rd person game I'm gonna use a Lyra tutorial I found for stripping out the shooter core.
You should be able to. I think the older gen 2 pokemon games used to get the player to set the time themselves and run the minutes at the same rate as real life.
But im sure there would be a way to get real life time and link that to the in game clock it should be as simple as just setting the time upon loading the level
@@pHaace interesting let us know how it goes 😊
is it possible to do this in a multiplayer game?
Legendary! my night sky doesnt have any stars im running 5,2 any ideas?
Hi, great work, but, I don;t have in my BP Sky Sphere Directional Light Actor component, I dont have whole Default part...- I used wrong BP Sky Sphere - must be this from Engine, if someone have this problem - create new level and check where is the Sphere Mesh - BP Sky Sphere is in this same folder
So, I can get event Update Sun Direction, can you help me?
Nevermind :) But i have another problem - "Multiple directional lights are competing to be the single one used for forward shading ETC....", i Thing this is because of the Moon...
Can you help me with that?
@@dawidpiejko5241
You need to give them a forward shading priority number. Sun would be 0 and Moon would be 1.
hey why is my bp sky sphere not working? it can't refer to my directional light actor
great! but i need simple clock, not to cast on screen or other, just ingame clock, player select start time and play and on this time clock start ... In UE5+ in simulator mode, it is important. I tried many options, yours is the best, but it doesn’t work as it should, the problem appears in the editor, everything is fine when playing, and it’s strange, but everything is connected to both the event graph and the construction script.
Is there a way to change where the sun 's position is based on the way you did this tutorial?
Not sure what you mean? When the day and night cycle happens the sun moves?
@@ue5bpguru538 In your tutorial you have the sun's position to start at around 3pm. or 15:00. Is there a way to have the sun's position be at around 6am?
@@rogerfoster8020 Yea..Just set its location to match the time u want to start..
hello, nice video! I just don't have a moon, could you help me?
Of course there is a video on the channel about creating a moon 😁
ua-cam.com/video/Zn2johiSMTQ/v-deo.html
@@ue5bpguru538 ty!!!!!
@@JeipyFN my pleasure 😊