Jump to content

Recommended Posts

Posted

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. 
 

Posted

One way is to use a post effect, I can't fully reply currently, but this is a starting point:

DayNightEffect.zip

screenshot4.thumb.jpg.d8d6e40c36778a2a6abf8a926d3376aa.jpg

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.

  • Like 1
  • Upvote 1
  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Posted

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

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.

×
×
  • Create New...