Jump to content

Day to Night cycle script (wip)


klepto2
 Share

Recommended Posts

Hi, after long silence I want to present a small wip script/shader which replaces the Atmosphere script in the Editor with a dynamic sky tool. The other options from the old atmosphere script are all available through mine.

 

[screen]

post-4-090690200 1288989871_thumb.jpg

 

[Download]

DayNight.zip

 

[installation]

Unzip this in the models/Environment folder (or somewhere you like within your SDK/Editor folder) and restart the Editor.

 

Keep in mind that this is still WIP and needs tweaking on various aspects, also I will add moving clouds in a later version.

I hope you like it and I waiting for feedback.

 

thx klepto2

  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Link to comment
Share on other sites

thx macklebee,

 

I will add it to the toolbox as soon as it is stable and balanced enough. Currently the dawn and dusk effect is a bit out of sync (the effect starts to early and stays to long). intensity.lua and suncolor.lua are data scripts i have used in an earlier version and i have forgotten to delete the references in the current script. They are not needed.

  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Link to comment
Share on other sites

thx macklebee,

 

I will add it to the toolbox as soon as it is stable and balanced enough. Currently the dawn and dusk effect is a bit out of sync (the effect starts to early and stays to long).

sounds great... nice work.

intensity.lua and suncolor.lua are data scripts i have used in an earlier version and i have forgotten to delete the references in the current script. They are not needed.

good. thats what i did already as well. :)

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Nice Klepto2, but I'm having no transition with this. I have the latest download of the Leadwerks Engine. Placed the unzipped contents of your file into the Leadwerks Models folder. Ran the Editor and placed a painted terrain in the scene. Then placed the day/night object into the scene. At first I got errors for the 'intensity and sunglow' so I deleted the require lines for these two from the Lua file. I assume this was correct. Now when I place the day/night object into the scene there is a sky and there are no errors but no transition. Am I missing something? Thanks.

AMD Athlon x2 7750 2.7ghz, 6gb ddr2 ram, Galaxy9800GT 1gig ddr2 video card, Windows 7,64.

Link to comment
Share on other sites

Nice Klepto2, but I'm having no transition with this. I have the latest download of the Leadwerks Engine. Placed the unzipped contents of your file into the Leadwerks Models folder. Ran the Editor and placed a painted terrain in the scene. Then placed the day/night object into the scene. At first I got errors for the 'intensity and sunglow' so I deleted the require lines for these two from the Lua file. I assume this was correct. Now when I place the day/night object into the scene there is a sky and there are no errors but no transition. Am I missing something? Thanks.

 

... intensity.lua and suncolor.lua are data scripts i have used in an earlier version and i have forgotten to delete the references in the current script. They are not needed.

 

and you need to open up the DayNite properties dialog and set the Rate of change... its default is 0. Change it to something greater than that to see it do the day nite cycle... also, check the DeBug checkbox to see the current time and change.

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

[installation]

Unzip this in the models/Environment folder (or somewhere you like within your SDK/Editor folder) and restart the Editor.

 

Keep in mind that this is still WIP and needs tweaking on various aspects, also I will add moving clouds in a later version.

I hope you like it and I waiting for feedback.

 

thx klepto2

Thank you for sharing Klepto ! :)

 

edit: i solved all my problems , it was my fault :) it is working well now.

Windows 7 home - 32 bits

Intel Quad Q6600 - nVidia GTX 460 1GB - 2 GB RAM

Link to comment
Share on other sites

Hi,

 

thx for the feedback. I have uploaded an updated version ( Download at first post).

 

Changes:

- Removed unneeded references to lua files

- Fixed the ambientlight bug.

- Reordered the Options and splitted them in different categories

  • Windows 10 Pro 64-Bit-Version
  • NVIDIA Geforce 1080 TI
Link to comment
Share on other sites

Thank you very much for sharing this klepto. I got it to work on the first try (and that's a feat for a beginner like me)!

 

The only thing I noticed was that the snow texture remained bright white even when the sun was fully gone but I'm guessing that may not have been addressed yet. I also didn't play with any other settings beyond turning up the rate of the sun movement.

 

Finally, how can this be used in C++ code? Is it possible yet?

 

Thank you again!!

Link to comment
Share on other sites

  • 5 months later...

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