This page has been translated automatically.
Видеоуроки
Interface
Essentials
Advanced
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Professional (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Players
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Materials and Shaders
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Сэмплы материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine.LandscapeTextures Class

This class is used to manage a fragment of terrain data on the GPU side (e.g. modify heights, albedo, or masks, etc.). Actually it represents a data container for a fragment of terrain area of the specified resolution. This class can be used, for example, when implementing GPU-based brushes.

LandscapeTextures Class

Properties

int NumMipmaps#

The total number of mipmaps for the textures (maximum value among all data layers).

ivec2 Resolution#

The current texture resolution.

RenderTarget RenderTarget#

The render target containing terrain data.

Texture OpacityHeight#

The Opacity information for height data as an r32f texture.

Texture Albedo#

The Albedo data as an rgba8 texture. opacity data is stored in the alpha-channel.

Texture Height#

The Height data as an r32f texture.

Members


LandscapeTextures LandscapeTextures ( ivec2 resolution ) #

Creates a new LandscapeTextures object to store the data for a terrain area of the specified resolution.

Arguments

  • ivec2 resolution - Two-component vector containing texture resolution along X and Y axes.

Texture GetHeight ( ) #

Returns height data as an R32F texture.

Return value

Texture (R32F) containing height data.

Texture GetAlbedo ( ) #

Returns albedo data as an RGBA8 texture. Opacity data is stored in the alpha-channel.

Return value

Texture (RGBA8) containing albedo data.

Texture GetMask ( int num ) #

Returns mask data as an RGBA8 texture.
Notice
Each detail mask can be represented by a single-channel texture. For optimization purposes detail mask data is stored in blocks - RGBA8 textures (each containing 4 masks, one mask per each channel). There are 5 blocks, as the terrain has 20 detail masks available. Thus, the data of the 9th detail mask shall be stored in the R-channel of the third block (index = 2).

Arguments

  • int num - Masks data block index.

Return value

Texture (RGBA8) containing mask data.

Texture GetOpacityHeight ( ) #

Returns opacity information for height data as an R32F texture.

Return value

Texture (R32F) containing opacity information for height texture.

Texture GetOpacityMask ( int num ) #

Returns opacity information for mask data as an RGBA8 texture.
Notice
Each mask can be represented by a single-channel texture. For optimization purposes opacity information for mask data is stored in blocks - RGBA8 textures (each containing 4 masks, one mask per each channel). There are 5 blocks, as the terrain has 20 detail masks available. Thus, the data of the 9th detail mask shall be stored in the R-channel of the third block (index = 2).

Arguments

  • int num - Masks data block index.

Return value

Texture (RGBA8) containing opacity information for mask data.

Texture Get ( int type ) #

Returns the texture of the specified type.

Arguments

Return value

Texture of the specified type.

RenderTarget GetRenderTarget ( ) #

Returns the render target containing terrain data.

Return value

Render target containing terrain data.

ivec2 GetResolution ( ) #

Returns the current texture resolution.

Return value

Two-component vector containing texture resolution along X and Y axes.

void CreateMipmaps ( ) #

Generates mipmaps for the textures of all data layers.

void ClearBuffers ( ) #

Clears all levels of the textures of all data layers (fills all elements with 0-values).
Last update: 14.12.2022
Build: ()