

This for example allows to recreate eclipses just as they would occur in real life. The TOD_Sky.World and TOD_Sky.Cycle parameter sections allow for configuration of the sky dome to simulate the exact earth, sun and moon movement for any location on the planet depending on Gregorian date, UTC/GMT time zone and geographic coordinates.

Both coverage and shading can be dynamically adjusted to fit any scenario. This includes the individual billboard instances, positions, textures and meshes - just have a look at the "Billboards" child object of the sky dome.Ĭloud layers are volumetric and their density is traced using a combination of noise octaves from the RGBA channels of a lookup textures. Time of Day supports dynamic volumetric cloud layers and handmade cloud billboards.Ĭloud billboards can be customized to fit the specific art style of a project. Remove the old version of Time of Day from your project.
Unity timecontrol upgrade#

Backup the current set of parameters using the export function in the context menu of the TOD_Sky script.Note that all events are only fired once per frame, which means that even if more than one minute passes in a single frame, any methods that are subscribed to OnMinute will still only be called once.ĭoing a basic upgrade: (only recommended for minor releases as this does not delete or rename files) The following events are fired by TOD_Time:Īll events can be subscribed to by adding a void method with no arguments via the += operator. That means the higher the inclination of the curve the faster this certain part of the day passes by. The Y axis of the graph denotes the time that is being set in the sky dome and is therefore visible to the player. The X axis of the graph denotes the current time, which always progresses linearly. It also offers a time curve that can be modified via the Unity inspector to speed up or slow down certain parts of the day-night cycle. The following parameters are being set by TOD_Time: The script TOD_Time manages the dynamic day & night cycle. You should not move the sky dome in "LateUpdate" because this can cause minor differences in the sky dome position between frames when moving the camera. NOTE: The camera script moves the sky dome directly before clipping the scene, guaranteeing that all other position updates have been processed. Tweak the sky dome inspector variables until you are satisfied with the result.Enable or disable any child objects of the sky dome you do or don't want to use.Add any of the optional camera scripts to your main camera (Component -> Time of Day ->.Add the Time of Day camera script to your main camera (Component -> Time of Day -> Camera Main Script).Drag the prefab "Time of Day/Prefabs/Sky Dome" into your scene.
Unity timecontrol code#
You can expect a thoroughly documented, well-written and highly optimized code base with references to the scientific papers it is based on.

Time of Day is a package to render realistic dynamic sky domes with day and night cycle, realistic celestials, dynamic clouds and physically based atmospheric scattering.
