This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Animations-Related Classes
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
VR-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

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: 2024-04-19
Build: ()