Andy90 Posted October 13, 2023 Share Posted October 13, 2023 Hello i want ask what is the best way to create a day night cycle with the leadwerks engine. I know it from unity that you create a pivot in the middle of the scene and attach the directionlight (sun) to this. So you can rotate this pivot and the light will turn arround the terrain. But if i do this it works not realy well. I think its because the ambient lightning from the skybox. Quote Link to comment Share on other sites More sharing options...
klepto2 Posted October 13, 2023 Share Posted October 13, 2023 One way is to use a post effect, I can't fully reply currently, but this is a starting point: DayNightEffect.zip You attach the pfx to your scene, and if you have a driectional light in the scene it will automatically find it and use the correct light vector. 1 1 Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Andy90 Posted October 13, 2023 Author Share Posted October 13, 2023 Okey thanks i will have a look later. Quote Link to comment Share on other sites More sharing options...
Andy90 Posted October 13, 2023 Author Share Posted October 13, 2023 ok its night but the trees are grayish okey its because of the fog Quote Link to comment Share on other sites More sharing options...
CJO Games Posted October 16, 2023 Share Posted October 16, 2023 Another way - and one I am hoping to use in my maps - is as you've suggested, with the use of pivots and - in my case at least a sky-dome - although it can be done without. I find the sky dome quite effective. My set up uses a pivot with a script attached to make rotation and then the directional light is a child of that pivot - the movement of light and shadows looks great - although it appears to have an impact on FPS. I'll upload a video of it in a working state when I can get around to it... Quote Link to comment Share on other sites More sharing options...
Andy90 Posted October 16, 2023 Author Share Posted October 16, 2023 This would be great. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.