UniSky getting started

Source: Internet
Author: User

Image: 1.jpg [delete]

It is the one that UniSky creates the sky. Today, I don't want to be in the same way as before. It's step by step. Here, I use the documents on the official website to translate Chinese characters, some annotations are added. I also hope that my friends can understand that they can quickly get started to create their own sky. UniSky is a staggering Program weather plug-in. He provides a simulated atmospheric visual effect system. Allows you to quickly create AAA-level realistic skies. Note: UniSky currently does not support Unity Xbox. How to Set UniSky? UniSky is easy to import to your project: Note: first, make sure that your camera can see UniSky. modify the camera label to "Solid Color" and set the Color to black. set the crop surface of the camera to about 100000. 1. step 1 import the selected package to your scenario and open the folder. 2. find the "UniskyAPI" preset in the "Resource" folder and drag it to your level panel. 3. drag your main Camera to the "Scene Camera" slot of the UniSkyAPI's editor UI. 4. now you can instantiate and use the script to control UniSkyAPI.5. the following API functions have been added with Chinese annotations. To set the environment, you can call the corresponding api functions! API Function/ParameterThe following describes the UniSky parameter and explains its effect. The following list can be found in UniSkyAPI. js/cs. // One day (0 to 24 hours cycle)
SetTime (float time );
LerpTime (float time, float milliseconds );
GetTime ();


//Returns the color of the sun.
GetSunColor ();

// Enable or disable Sun and Moon Shadows. Type: "LightShadows. None", "LightShadows. Hard", and "LightShadows. Soft" Public void SetSunShadows (LightShadows sunShadows) Public void SetMoonShadows (LightShadows moonShadows)

 

// Set coordinates for the center of the storm cloud layer
SetStormCenter (Vector3 stormCenter );

 

// Scattering radius, which affects the color of the sky (default value: 45000, usually a real sky)
SetScatteringRadius (float scatteringRadius );
LerpScatteringRadius (float scatteringRadius, float milliseconds );

 

// The coverage of the main atmosphere is (-5 to 5)
Void SetCloudCover (float cloudCover );
LerpCloudCover (float cloudCover, float milliseconds );

 

// Dark clouds are not the atmosphere of the storm. (2-0, the lower, the deeper the color of the cloud layer)
SetPrecipitationLevel (float precipitationLevel );
LerpPrecipitationLevel (float precipitationLevel, float milliseconds );

 

// The coverage level of the storm is (recommended from-3.5 to-1.0)
SetStormCloudCover (float cloudCover );
LerpStormCloudCover (float cloudCover, float milliseconds );

 

// The amount of rain. There is no heavy rain, but it is light rain. (From 0 to 1000)
SetRainLevel (float rainLevel, float sfxLevel );
LerpRainLevel (float rainLevel, float sfxLevel, float milliseconds ); // Heavy rain. Rain is everywhere. (From 0 to 200)
SetStormLevel (float stormLevel, float sfxLevel );
LerpStormLevel (float stormLevel, float sfxLevel, float milliseconds ); // The brightness or concentration of the sun. Fade in and out due to dark cloudy or stormy days (0 to 0.5)
SetSunIntensity (float intensity );
LerpSunIntensity (float intensity, float milliseconds ); // Set built-in FOG (0 to 0.03)
SetFogLevel (float fogLevel );
LerpFogLevel (float fogLevel, float milliseconds );

 

// Set the drop rate on the screen image (0 to 5)
SetDropletLevel (float dropletLevel );
LerpDropletLevel (float dropletLevel, float milliseconds );


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

// Halo differences. Set the lighting intensity of the cloud edge (0 to 10 ). Tip: if it is set to around 0, it will have a good effect of rolling cloud.
SetGlowVariance (float glowVariance );
LerpGlowVariance (float glowVariance, float milliseconds ); // Set the distance from the cloud to the atmosphere (0 to 20)
SetViewDistance (float viewDistance );
LerpViewDistance (float viewDistance, float milliseconds ); // Adjust the default color. The default value of RGB is recommended (1.5, 1.5, 1.5 ). If you want a pink or green cloud: D
SetColorVariance (Vector3 colorVariance );
LerpColorVariance (Vector3 colorVariance, milliseconds );
// If you want to automatically cycle time, this is the speed at which time passes. (0 to 0.1)
SetSpeedOfTime (float speedOfTime );


//Changing Light Scattering to the cloud only affects the color of the cloud. It is best to keep his default value, 40. (-20 to 100)
SetRayleighLevel (float rayleighLevel );

// If this option is enabled, the player and the system clock in a day are synchronized.
SetUseSystemTime (bool enabled );

 

// Change the color of ambient light. I suggest interpolation or turbidity within one day.
SetAmbientLighting (Color ambientLevel );
LerpAmbientLighting (Color ambientLevel, float milliseconds );

 

// Set the moon size
SetMoonSize (float moonSize ); // Clear drop Cache
ClearDropletBuffer (); // Set the frequency of lightning strikes. The higher the frequency (0 to 100 ).SetLightningFrequency (float
Frequency ); Important:1. to avoid the problem of the coloring tool, it is important to retain the UniSky position and zoom. if you need to scale your scenario or use scripts to move back and forth, you will not lose any scaling of the scenario. 2. if you cannot see the complete sky or the moon, the camera may have removed him. to avoid this problem, set the camera's remote plane to a very high value (perhaps 100000 ). A smart solution is to set the preset body on its own layer. It will not be removed from the camera's remote aspect, and you can still maintain a more effective removal effect. 3. focus on the light and color of the sun and moon, remove other direct lights in the scene, and set the ambient light color to gray or black.

After reading the above content, I have learned how to create a sky, but to make a sky with a very good effect, you need to be patient and make more parameter-specific settings, match the sky environment. If you want to learn more about the working principle of sky, study the script and shader! Come on!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.