Jump to content

Best way to create a day / night cycle?


Andy90
 Share

Recommended Posts

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. 
 

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...