This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine.FieldWeather Class

Inherits from: Field

This class is used to create and modify a weather field. The field is applied to CloudLayer object and specifies a local weather area. This type of field makes it possible to create local storms or clouds having their own coverage texture as well as to control their movement.

Notice
The number of weather fields on the scene is not limited as their impact on performance is not significant.

Creating a Weather Field

Notice
When creating a FieldWeather node you should specify a coverage texture for it as it doesn't have any default texture.
Source code (C#)
// create a new instance of the FieldWeather class and set its transformation
FieldWeather weather = new FieldWeather();
weather.setTransform(Mat4(1));
// set the size of the field
weather.setSize(vec3(4096.0f, 4096.0f, 4096.0f));
// set the coverage texture
weather.setTexturePath("unigine_project/textures/coverage.png");

FieldWeather Class

Properties

vec3 CloudsAnimationOffset#

The Sets the offset of the FieldWeather coverage texture.

int WindEnabled#

The A value indicating if local wind inside the fieldweather is enabled.

vec3 WindAnimation#

The current local wind speed in X, Y and Z directions.

Texture Texture#

The Grabs the current coverage texture of the FieldWeather and puts it into the given Texture instance.

string TexturePath#

The current path to the fieldweather's coverage texture.

float Intensity#

The Current intensity of the fieldweather. this parameter determines the degree of impact of the fieldweather coverage texture on the clouds.

float Power#

The current power value for the fieldweather coverage texture. this parameter derermines the contrast of the coverage texture and makes it possible to gradually increase cloudiness without changing the coverage texture.

float Attenuation#

The Current attenuation factor value. this parameter indicates how much the coverage texture attenuates starting from the center of the fieldweather to its edges.

int AttenuationType#

The current type of attenuation shape.

vec3 Size#

The current size of the fieldweather.

Members


FieldWeather ( ) #

Constructor. Creates a new empty FieldWeather instance with default properties.

int SetTextureImage ( Image image ) #

Sets the given image as the coverage texture of the FieldWeather.

Arguments

  • Image image - Image instance with a coverage texture for the FieldWeather.

Return value

1 if the coverage texture was set successfully; otherwise, 0.

int GetTextureImage ( Image image ) #

Grabs the coverage texture of the FieldWeather (already loaded to GPU) and saves it into the given Image instance.

Arguments

  • Image image - Image instance into which the current coverage texture will be grabbed.

Return value

1 if the coverage texture was grabbed successfully; otherwise, 0.

static int type ( ) #

Returns the type of the object.

Return value

FieldWeather type identifier.
Last update: 2022-12-14
Build: ()