Are you
– tired of trying to change settings to simulate the color of real sunlight each time you alter the angle of your main directional light?
– searching for a quick and robust way to set a directional light to the correct angle for a given time and location?
– looking for useful and lightweight tool to make most out of Unity’s global illumination skybox?
– in need of a perfectly compatible solution to simulate a Day/Night Cycle?
– searching for an inexpensive tool for real world shadow simulation ?
SunLight – Location based Time of Day calculates the light color and orientation of a directional light source based on geographical location and time of day to create a realistic sun light source. Simple to use; just drag it into your scene and let SunLight handle the directional light.
Works with Unity’s built-in procedural skybox, making it rock solid and 100% compatible.
SunLight creates two directional lights, one to illuminate the scene and another one is used to trigger Unity’s Skybox only (layer mask set to nothing). This is necessary to avoid unwanted directional illumination from below the horizon in twilight conditions.
Two variants to fit to your prefered workflow: written in Unity Script (JS) and C#
Script reference: http://www.hessburg.com/AssetStore/SunLight_Manual_Reference.pdf
Usage:
Drag the prefab (C# and JS based prefabs available) into the scene and set location and time in inspector.
– Chose a location from 10 presets or manually set latitude and longitude.
– Choose whether to let SunLight handle the progress of time or control it in your script.
– If you wish you can manually override the azimuth (horizontal rotation) of the sun via inspector or in your own script.
Super easy artistic workflow: SunLight always updates the directional light based on your changes in inspector even when not in play mode. (Of course only when the prefab is actually in the scene and activated)
Just $9.99
You can use SunLight as a quick meaningful tool for architectural or urban planning purposes in Unity, when accuracy does not have to meet scientific standards by using it for shadow simulations.
The simplest way:
Simply use a map texture from any provider as a texture for a plane and scale and align it correctly:
Or use the slightly more expensive option:
Use one of the several assets offered in the store to create the terrain, textures and sometimes even rough buildings correctly using data from map providers – for example: