How to Use GodotSky
Once GodotSky is loaded into your Godot 4 project, you will be able to immediately load the GodotSky into your desired scene. If you do not see a GodotSky folder within your folder list, please refer to the installation instructions.
What’s Included
GodotSky is an asset package for the Godot Engine. As part of your purchase, you receive a zip file containing a Godot 4 project that you can import and load within Godot. This project serves as an immediate example showing GodotSky in action.
The GodotSky folder within the project can be moved into any other Godot 4 project as an asset.
This folder contains the following:
- Presets – Contains two preset skies that house default settings and color curves for each.
- Scripts – The main GodotSky script that controls the time of day and updating of the sky parameters
- Shaders – The main sky shader
- Textures – Various textures for clouds and stars
- WorldEnvironment – The default resources for the WorldEnvironment node
And finally the GodotSky.tscn which is the main scene file.
Loading GodotSky Into Your Scene
To load GodotSky into your parent level or scene, simply drag the GodotSky.tscn file into your scene tree. It’s best to place it at or near the top of your other nodes to ensure that the two directional lights for the sun and moon load first before any other directional lights in your scene.
After loading the GodotSky scene into your parent scene, you will see a WorldEnvironment node named GodotSky.
IMPORTANT: Having another WorldEnvironment node will cause issues with GodotSky. Any existing WorldEnvironment settings you wish to keep should be done within the GodotSky node.
GodotSky Functionality
Within the GodotSky node are three (3) main components: the Environment settings, the Shader parameters, and the Script settings.
Each of these components is vital to the functionality of GodotSky.
Script Settings
The script settings contain the global TimeOfDay variable which controls nearly every aspect of GodotSky. Within these settings you can also turn on the Simulate Time settings to initiate the day and night cycle, set the Rate of Time of that cycle and the overall rotation of the sky.
The Sky Preset contains a list of customizable parameters used to adjust the sky shader. Here you can customize the default preset or create your own.
IMPORTANT: the GodotSky script is using the @tool feature within the Godot Engine which allows the script to run within the editor. You will see a blue script icon next to the GodotSky node telling you that it is running as a tool. The script will also run in-game. Without the @tool setting, any changes made via the script would not be visible in the editor and only in-game.
Environment Settings
The Environment settings contain the general settings found in the WorldEnvironment node and can be used to turn on various graphical improvements.
Shader Settings
The shader settings are managed via the GodotSky script and cannot be manually adjusted.