UniSky

What is UniSky?

UniSky is a jaw-droppingly powerful procedural sky, weather, and atmospheric visual effects system for Unity 3. Create gorgeous, AAA-quality living skies in just moments with this popular and powerful tool. UniSky was developed by Six Times Nothing's Lead Technical Artist, Chris Morris.

 

Note: Unity Xbox is not currently supported by UniSky.

UniSky 1.2.4 Features

  • 24 hour day/night cycle with sun, moon and stars
  • Atmospheric scattering for realistic sky colors at any time of day
  • Dynamic directional light color and positioning for the sun and moon
  • Procedural 2D cloud animation with dynamic 3D lighting and shading
  • Parameterized cloud cover, precipitation level, atmospheric scattering, glow, wind direction/speed and colors
  • Highly optimised and runs almost entirely on the GPU
  • Completely scriptable with an extensive API giving you control over every parameter
  • Plus more upcoming features to be announced soon.

Features added in weather update

  • Dynamic procedural rain simulation with localized storms
  • Custom weather attributes such as storm frequency, strength, and duration
  • Includes a new storm cloud layer as well as all the particle effects and sound effects you need to make your storms come alive
  • Features off-screen particle rendering so that you can change the quality settings to run on a wide number of systems
  • Includes a water droplet image-effect that further enhances the immersion of your weather

Check out a video of UniSky 1.2 on YouTube: http://www.youtube.com/watch?v=ClWJT-eGCVQ

 

Purchasing & Licensing

UniSky is available for purchase and download on the Unity Asset Store. The license cost is US$100.

Purchasing a UniSky licence will give you free upgrades to all future versions of UniSky, allowing you to take advantage of all new features.

Six Times Nothing also have an Academic Licensing Program to support education in the games and realtime 3D graphics industry. If you are interested in academic licensing and pricing, please contact us here.

 

Video Tutorial

A video tutorial showing how to set up and use UniSky including demonstration of all features and parameters can be viewed on YouTube here: http://www.youtube.com/watch?v=rjHJBwNs2pw

 

Written Tutorial

How to set up UniSky

UniSky is very easy to import into your projects:

Important: First and foremost, make sure your camera is able to see UniSky. Turn its clear flags to "Solid Color" and to the color black. Also set the far clip plane to around 100,000.

  1. The first step is to import the .unitypackage of your choice (CS or JS) into your scene, and open the folder.
  2. Find the "UniskyAPI" prefab located in the "Resources" folder, and drag it into your scene hierarchy.
  3. Drag your main camera into the "Scene Camera" slot on UniSkyAPI's editor UI. 
  4. You can now instantiate and control UniSky through script. Below is an example script in C# that does this, and also sets up a (pretty fast) 24 hour cycle.


public class ExampleScript : MonoBehaviour {

// create an instance of the API
private UniSkyAPI uniSky;

void Start() {

// define the instance
uniSky = GameObject.Find("UniSkyAPI").GetComponent("UniSkyAPI") as UniSkyAPI;

// instantiate 
uniSky.InstantiateUniSky();
}

void Update() {

// set up a 24-hour cycle with a framerate dependent speed of 1.0
uniSky.SetTime(uniSky.GetTime() + Time.deltaTime * 1.0f);
}
}



Important Notes:

  1. It is important to leave the positions and scales of UniSky alone to avoid problems with the shader. If necessary, scale your own scene and movement scripts back appropriately, and you won't lose any sense of scale.
  2. If you can't see the entire skydome or you can't see the moon, it is likely because the camera is culling it. To avoid this, set the camera's far clip plane to a very high value (maybe 100,000). A smarter solution is to setup the prefab on its own layer that is not culled by the camera's far clip plane so that you can still maintain a more reasonable culling distance.
  3. To take advantage of the sun and moon lights and colors, remove all other directional lights from your scene and set the ambient color to a dark gray or black.


API Functions/Parameters

UniSky parameters are somewhat self-explanatory. Here is a list with general explanations of the expected effect. This list can also be found at the top of "UniSkyAPI.js/cs".


 

// The time of day (0-24 hour cycle)
SetTime(float time);
LerpTime(float time, float milliseconds);
GetTime();

// This returns the sun's Color
GetSunColor(); 

// These enable or disable the sun and moon's shadows. Types are: "LightShadows.None" "LightShadows.Hard" and "LightShadows.Soft"
public void SetSunShadows(LightShadows sunShadows) 
public void SetMoonShadows(LightShadows moonShadows) 

// Sets the coordinates that the storm cloud layer will center over
SetStormCenter(Vector3 stormCenter); 

// The scattering radius, which effects the colors of the sky (45000 is default, and typical for a realistic sky)
SetScatteringRadius(float scatteringRadius); 
LerpScatteringRadius(float scatteringRadius, float milliseconds); 

// The level of cover that the main cloud layer has (-5 to 5)
void SetCloudCover(float cloudCover);
LerpCloudCover(float cloudCover, float milliseconds); 

// The darkness of the main cloud layer, not the storm cloud layer. (2 to 0 - the lower, the darker the clouds)
SetPrecipitationLevel(float precipitationLevel);
LerpPrecipitationLevel(float precipitationLevel, float milliseconds); 

// The level of cover that the storm cloud layer has (I recommend -3.5 to -1.0)
SetStormCloudCover(float cloudCover);
LerpStormCloudCover(float cloudCover, float milliseconds);

// The amount of rain. Not heavy storm sheets of rain, but light rain. (Anywhere from 0 to 1000)
SetRainLevel(float rainLevel, float sfxLevel);
LerpRainLevel(float rainLevel, float sfxLevel, float milliseconds);

// The amount of HEAVY storm rain. The sheets of rain. (Anywhere from 0 to 200)
SetStormLevel(float stormLevel, float sfxLevel);
LerpStormLevel(float stormLevel, float sfxLevel, float milliseconds); 

// The brightness or intensity of the sun. Fade this down to get it dark during a cloudy or stormy day. (0 to 0.5)
SetSunIntensity(float intensity);
LerpSunIntensity(float intensity, float milliseconds);

// Sets the built-in fog (0 to 0.03)
SetFogLevel(float fogLevel);
LerpFogLevel(float fogLevel, float milliseconds);

// Sets the rate at which droplets fall on the screen for the image effect (0 to 5)
SetDropletLevel(float dropletLevel);
LerpDropletLevel(float dropletLevel, float milliseconds);

// Sets the direction, speed, and evolution speed of the clouds. X = x direction and speed, Y= y direction and speed, Z = evolution speed. (0 to 1)
SetCloudSpeedDirection(Vector3 speedDirection);
LerpCloudSpeedDirection(Vector3 speedDirection, float milliseconds);

// The glow variance. Sets the intensity of the lighting near the edges of the clouds (0 to 10) Tip: Setting this around 0 will give a nice cirrus cloud effects
SetGlowVariance(float glowVariance);
LerpGlowVariance(float glowVariance, float milliseconds);

// This sets the distance at which the clouds fade into the atmosphere (0 to 20)
SetViewDistance(float viewDistance);
LerpViewDistance(float viewDistance, float milliseconds);

// Modulates the default colors. Default is RGB(1.5, 1.5, 1.5), which is recommended. This is your parameter if you want pink or green clouds :D
SetColorVariance(Vector3 colorVariance);
LerpColorVariance(Vector3 colorVariance, milliseconds);

// If you want the time cycle automated, this is the speed at which time passes. (0 to 0.1)
SetSpeedOfTime(float speedOfTime);

// This changes the scattering of light to the clouds, effecting only the cloud color. Best to keep at default, 40. (-20 to 100)
SetRayleighLevel(float rayleighLevel);

// If this is enabled, the time of day is synced with the system clock of the player
SetUseSystemTime(bool enabled);

// This changes the ambient light color. I'd recommend interpolating this with the time of day, or cloudiness
SetAmbientLighting(Color ambientLevel);
LerpAmbientLighting(Color ambientLevel, float milliseconds);

// Sets the moon's size
SetMoonSize(float moonSize);

// Clears the droplet buffer 
ClearDropletBuffer();

 

// Sets the frequency of lightning + thunder. Higher the more frequent (0 to 100)
SetLightningFrequency(float frequency);

 

UniSky Screenshots





Share |

Follow us on Twitter