Simple script designed to quickly create timelapses in Unity HDRP. Ideal for presenting scenes, cinematics, or testing lighting variations without using Timeline. Version 0.4.4 -> Has only a directional light rotation, volumetric cloud offset animation and water simulation speed.
This project is made/test under Unity 6.1 (6000.1.12f1)
- Interpolated sun rotation (Directional Light)
- Volumetric Clouds offset animation
- Water simulation speed (HDRP Water)
- Customizable duration, loop option
- Speed curve for smoother transitions
- Runtime input handling (start/reset)
- Volumetric Clouds (HDRP) – if enable
- WaterSurface (HDRP) – if enable
- Fork and Copy the project folder (
Runtime/andEditor/are required) into your Unity project. - Make sure to use HDRP with the necessary components (Volumetric Clouds / WaterSurface) – if enable
-
Create an empty GameObject and attach
Timelapse.csfromRuntime/. -
Assign:
- The Directional Light (the sun)
- The Volume containing the Volumetric Clouds component
- The WaterSurface (if used, and loop disabled)
-
Define:
Cycle Durationin secondsSpeed Curvepreset (controls global timelapse speed): X=0→1 is progress, Y=0→1 is adjusted speed)
- Enable/disable Loop, Clouds, Sun, Water as needed
Sun Rotation StartandSun Rotation End(in degrees, Euler)Cloud Offset StartandCloud Offset End- And the Water Surface –
Time Multiplier
If Loop is enabled, water management is automatically disabled.
The Timelapse script was not originally designed as a full day/night cycle system. However, using the Loop mode, you can simulate a continuous cycle easily – useful for quick prototypes or scene presentations.
-
Enable the sun
- Assign a
Directional Lightto thesunvariable. - Set:
sunRotationStart = new Vector3(0f, -30f, 0f); sunRotationEnd = new Vector3(360f, -30f, 0f); - The cycle will interpolate from 0° to 360° for a perfectly seamless loop.
- Assign a
-
Enable clouds (optional)
- Clouds use a simple offset (
cloudOffsetStart→cloudOffsetEnd). - No special setup needed: the loop remains seamless since the offset repeats naturally.
- Clouds use a simple offset (
-
Water handling
- When
loop = true, water is automatically disabled (notimeMultiplier). - When
loop = false, water can be animated usingwaterTimeMultiplier.
- When
This is not intended as a full production day/night system.
For a production-ready solution, consider using:
- Unity Timeline
- Specialized lighting/skybox frameworks
- Or a custom system handling weather, ambient lighting, etc.
This Loop mode is mainly a bonus feature for fast timelapse prototypes or scene showcases.
A small tool is included to quickly convert an AnimationCurve into C# code (Keyframes):
- Accessible via
Tools > Curve To Keyframesin the Unity toolbar - Allows you to draw a curve in the editor
- Clicking "Generate C# Keyframes" automatically copies the code to the clipboard
- Useful for creating static presets in
SpeedCurvePresets.cs
-
Multi-element Control:
- Fog (density, color)
- Lens Flare size/intensity
- Water (orientation, reflection parameters)
-
Object Management:
- Enable/disable objects at specific times
- E.g., disable fill lights after a certain offset
-
Advanced Options :
- Ping-pong (back and forth)
- Separate timers (clouds ≠ sun)
- Custom editor (cleaner interface, presets manager)
-
Official Unity package
- Demo scene + presets
- Asset Store release (v1.0.0)
For issues, suggestions, or contributions, feel free to open an issue on the GitHub repository.
