This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Режимы вывода изображения
Физика
Браузер SDK 2
Лицензирование и типы лицензий
Дополнения (Add-Ons)
Демонстрационные проекты
API Samples
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
Унифицированный язык шейдеров UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
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
Учебные материалы

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: 13.12.2024
Build: ()