This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор 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
Учебные материалы

Добавление вариаций для более реалистичного окружения

Randomizer is a UnigineEditor tool designed for adding variations of the scene objects in few clicks. Randomizer - это инструмент UnigineEditor, предназначенный для добавления вариаций объектов сцены за несколько кликов.

Randomizer Interface

Randomizer Tool Инструмент Randomizer
Примечание
To open the Randomizer tool, choose Tools -> Randomizer in the Menu Bar.
To learn how to use the tool, watch this video tutorial.
Чтобы открыть инструмент Randomizer, выберите Tools -> Randomizer в строке меню.
Чтобы узнать больше о работе с данным инструментом, посмотрите этот видеоурок.

The Randomizer can perform the following operations with nodes: Randomizer может выполнять следующие операции с нодами:

  • Replace the selected nodes with other nodes taken randomly from the specified set according to the normal law of distribution. Заменить выбранные ноды другими нодами, выбранными случайным образом из указанного набора в соответствии с нормальным законом распределения.
  • Change position, rotation, and scale of the selected nodes randomly within the range according to the normal law of distribution. Изменить положение, поворот и масштаб выбранных нод случайным образом в пределах диапазона в соответствии с нормальным законом распределения.
Примечание
You can perform all operations together. Besides, you can perform the randomization as many times as you want: every time you will get the different result. Вы можете выполнять все операции вместе. Кроме того, вы можете выполнять рандомизацию сколько угодно раз: каждый раз вы будете получать разные результаты.

Randomizer SettingsНастройки Randomizer#

The Randomizer tool provides the following settings: Инструмент Randomizer предоставляет следующие настройки:

Offset Offset of the selected nodes taken randomly from the specified range. An offset range is specified for each axis.
  • From specifies the minimum offset of nodes in units.From specifies the minimum offset of nodes in units.
  • To specifies the maximum offset of nodes in units.To specifies the maximum offset of nodes in units.
You can specify both negative and positive values. From specifies the minimum offset of nodes in units.To specifies the maximum offset of nodes in units.
Смещение выбранных нод, взятых случайным образом из указанного диапазона. Диапазон смещения указан для каждой оси.
  • From specifies the minimum offset of nodes in units. From указывает минимальное смещение нод в единицах измерения.
  • To specifies the maximum offset of nodes in units. To указывает максимальное смещение нод в единицах.
Вы можете указать как отрицательные, так и положительные значения.
Rotation Rotation of the selected nodes by the angle taken randomly from the specified range. Rotation is performed relative to the current direction of an axis. An angle range is specified for each axis.
  • From specifies the minimum angle by which nodes can be rotated.From specifies the minimum angle by which nodes can be rotated.
  • To specifies the maximum angle by which nodes can be rotated.To specifies the maximum angle by which nodes can be rotated.
If one of the values is negative, the nodes will be rotated about the axis in both directions (clockwise and counterclockwise). From specifies the minimum angle by which nodes can be rotated.To specifies the maximum angle by which nodes can be rotated.
Поворот выбранных нод на угол, произвольно взятый из заданного диапазона. Вращение выполняется относительно текущего направления оси. Диапазон углов указан для каждой оси.
  • From specifies the minimum angle by which nodes can be rotated. From указывает минимальный угол, на который можно повернуть ноды.
  • To specifies the maximum angle by which nodes can be rotated. To указывает максимальный угол, на который можно повернуть ноды.
Если одно из значений отрицательное, ноды будут вращаться вокруг оси в обоих направлениях (по часовой стрелке и против часовой стрелки).
Scale Scale of the selected nodes taken randomly from the specified range. A scale coefficient is specified for each axis.
Примечание
If you enable the Uniform Scale option, you can specify the coefficient only once: the nodes will be scaled along all axes.If you enable the Uniform Scale option, you can specify the coefficient only once: the nodes will be scaled along all axes.
  • From specifies the minimum scale coefficient for nodes.From specifies the minimum scale coefficient for nodes.
  • To specifies the maximum scale coefficient for nodes.To specifies the maximum scale coefficient for nodes.
To downscale the selected nodes, specify values in range [0;1). If you enable the Uniform Scale option, you can specify the coefficient only once: the nodes will be scaled along all axes.From specifies the minimum scale coefficient for nodes.To specifies the maximum scale coefficient for nodes.
Масштаб выбранных нод, взятый случайным образом из указанного диапазона. Для каждой оси указан масштабный коэффициент.
Примечание
If you enable the Uniform Scale option, you can specify the coefficient only once: the nodes will be scaled along all axes. Если вы включите опцию Uniform Scale, вы можете указать коэффициент только один раз: ноды будут масштабироваться по всем осям.
  • From specifies the minimum scale coefficient for nodes. From указывает минимальный масштабный коэффициент для нод.
  • To specifies the maximum scale coefficient for nodes. To указывает максимальный коэффициент масштабирования для нод.
Чтобы уменьшить масштаб выбранных нод, укажите значения в диапазоне [0; 1) .
Place Nodes as NodeReference Toggles adding the specified nodes as NodeReferences to the scene on and off. If the option is disabled, the replaced nodes will change its types to the types of the replacing nodes stored in the .node files. Включает и выключает добавление указанных нод как NodeReferences в сцену. Если опция отключена, замененные ноды изменят свои типы на типы заменяющих нод, хранящиеся в файлах .node.
Nodes Set of nodes (.node) or/and meshes (.mesh) that will be used for random replacing of the selected nodes. To add a new node/mesh, click or drag a file from the Asset Browser. The following fields will appear:

  • File Name field displays the name of the replacing file.File Name field displays the name of the replacing file.
  • Probability field allows specifying the probability of node/mesh occurrence. According to this value, the frequency of node/mesh occurrence is calculated as follows: the probability value of each node is divided by the sum of probabilities set for all nodes/meshes in the set.Probability field allows specifying the probability of node/mesh occurrence. According to this value, the frequency of node/mesh occurrence is calculated as follows: the probability value of each node is divided by the sum of probabilities set for all nodes/meshes in the set.
File Name field displays the name of the replacing file.Probability field allows specifying the probability of node/mesh occurrence. According to this value, the frequency of node/mesh occurrence is calculated as follows: the probability value of each node is divided by the sum of probabilities set for all nodes/meshes in the set.
Набор нод (.node) или / и сеток (.mesh), которые будут использоваться для случайной замены выбранных нод. Чтобы добавить новую ноду / сетку, щелкнитеили перетащите файл из Asset Browser. Появятся следующие поля:

  • File Name field displays the name of the replacing file.В поле File Name отображается имя заменяющего файла.
  • Probability field allows specifying the probability of node/mesh occurrence. According to this value, the frequency of node/mesh occurrence is calculated as follows: the probability value of each node is divided by the sum of probabilities set for all nodes/meshes in the set.Поле Probability позволяет указать вероятность появления ноды / сетки. В соответствии с этим значением частота появления ноды / сетки рассчитывается следующим образом: значение вероятности каждой ноды делится на сумму вероятностей, установленных для всех нод / сеток в наборе.

Replacing NodesЗамена нод#

To replace nodes with other nodes taken randomly from the specified set, you need to do the following: Чтобы заменить ноды другими нодами, взятыми случайным образом из указанного набора, вам необходимо сделать следующее:

  1. Select the nodes that should be replaced. Выберите ноды, которые следует заменить.
  2. Add nodes that will be used for random replacing of the selected nodes in one of the following ways:
    • In the Nodes section, press , then click in the field that appears and choose a .node or .mesh file in the dialog window that opens.
      Примечание
      You can specify a .node file stored inside the asset container.You can specify a .node file stored inside the asset container.
      You can specify a .node file stored inside the asset container.
      In the Nodes section, press , then click in the field that appears and choose a .node or .mesh file in the dialog window that opens.
      Примечание
      You can specify a .node file stored inside the asset container.You can specify a .node file stored inside the asset container.
    • Select the required nodes in the Asset Browser and drag them to the Nodes section.
      Примечание
      You can also drag an .fbx, .dae, .obj or .3ds file: a .node file stored inside the asset container will be specified automatically.You can also drag an .fbx, .dae, .obj or .3ds file: a .node file stored inside the asset container will be specified automatically.
      You can also drag an .fbx, .dae, .obj or .3ds file: a .node file stored inside the asset container will be specified automatically.
      Select the required nodes in the Asset Browser and drag them to the Nodes section.
      Примечание
      You can also drag an .fbx, .dae, .obj or .3ds file: a .node file stored inside the asset container will be specified automatically.You can also drag an .fbx, .dae, .obj or .3ds file: a .node file stored inside the asset container will be specified automatically.
    In the Nodes section, press , then click in the field that appears and choose a .node or .mesh file in the dialog window that opens.
    Примечание
    You can specify a .node file stored inside the asset container.You can specify a .node file stored inside the asset container.
    You can specify a .node file stored inside the asset container.Select the required nodes in the Asset Browser and drag them to the Nodes section.
    Примечание
    You can also drag an .fbx, .dae, .obj or .3ds file: a .node file stored inside the asset container will be specified automatically.You can also drag an .fbx, .dae, .obj or .3ds file: a .node file stored inside the asset container will be specified automatically.
    You can also drag an .fbx, .dae, .obj or .3ds file: a .node file stored inside the asset container will be specified automatically.
    Добавьте ноды, которые будут использоваться для случайной замены выбранных нод, одним из следующих способов:
    • In the Nodes section, press , then click in the field that appears and choose a .node or .mesh file in the dialog window that opens.
      Примечание
      You can specify a .node file stored inside the asset container.You can specify a .node file stored inside the asset container.
      You can specify a .node file stored inside the asset container.
      В разделе Nodes нажмите, затем щелкнитев появившемся поле и выберите файл .node или .mesh в открывшемся диалоговом окне.
      Примечание
      You can specify a .node file stored inside the asset container. Вы можете указать файл .node, хранящийся внутри контейнера ресурсов.
    • Select the required nodes in the Asset Browser and drag them to the Nodes section.
      Примечание
      You can also drag an .fbx, .dae, .obj or .3ds file: a .node file stored inside the asset container will be specified automatically.You can also drag an .fbx, .dae, .obj or .3ds file: a .node file stored inside the asset container will be specified automatically.
      You can also drag an .fbx, .dae, .obj or .3ds file: a .node file stored inside the asset container will be specified automatically.
      Выберите необходимые ноды в Asset Browser и перетащите их в раздел Nodes.
      Примечание
      You can also drag an .fbx, .dae, .obj or .3ds file: a .node file stored inside the asset container will be specified automatically. Вы также можете перетащить файл .fbx, .dae, .obj или .3ds: файл .node, хранящийся внутри контейнера ресурсов, будет указан автоматически.
  3. Specify the probability of the node occurrence in the field to the right. Укажите вероятность появления ноды в поле справа.
  4. Toggle the Place Nodes as NodeReference option on, if required. Включите параметр Place Nodes as NodeReference, если требуется.
  5. Click Replace. Щелкните Replace.

The randomization will be performed according to the normal law of distribution. Рандомизация будет выполняться в соответствии с нормальным законом распределения.

Usage ExampleПример использования#

For example, we have several identical barrels: Например, у нас есть несколько одинаковых бочек:

To diversify the types of barrels, we need to perform as follows: Чтобы разнообразить виды бочек, нам нужно выполнить следующее:

  1. Select all barrels in the scene.

    Выбрать все бочки в сцене.

  2. Add the .node files with different types of barrels to the Nodes section by dragging them from the Asset Browser.

    Добавьте файлы .node с различными типами бочек в раздел Nodes, перетащив их из Asset Browser.

  3. Specify the probabilities of occurrence of each type of barrels:
    • 10 for red barrels10 for red barrels
    • 5 for blue barrels5 for blue barrels
    • 2 for light brown barrels2 for light brown barrels
    • 1 for brown barrels1 for brown barrels

    According to our set probabilities, the frequency of occurrence of barrels of each type will be the following:According to our set probabilities, the frequency of occurrence of barrels of each type will be the following:

    • 10/18 for red barrels10/18 for red barrels
    • 5/18 for blue barrels5/18 for blue barrels
    • 2/18 for light brown barrels2/18 for light brown barrels
    • 1/18 for brown barrels1/18 for brown barrels
    10 for red barrels5 for blue barrels2 for light brown barrels1 for brown barrelsAccording to our set probabilities, the frequency of occurrence of barrels of each type will be the following:10/18 for red barrels5/18 for blue barrels2/18 for light brown barrels1/18 for brown barrels
    Укажите вероятности появления каждого типа бочек:
    • 10 for red barrels 10 для красных бочек
    • 5 for blue barrels 5 для синих бочек
    • 2 for light brown barrels 2 для светло-коричневых бочек
    • 1 for brown barrels 1 для коричневых бочек

    According to our set probabilities, the frequency of occurrence of barrels of each type will be the following: Согласно нашим установленным вероятностям, частота появления бочек каждого типа будет следующей:

    • 10/18 for red barrels 10/18 для красных бочек
    • 5/18 for blue barrels 5/18 для синих бочек
    • 2/18 for light brown barrels 2/18 для светло-коричневых бочек
    • 1/18 for brown barrels 1/18 для коричневых бочек
  4. Toggle the Place Nodes as NodeReferences option on, so that the specified nodes are added to the scene as NodeReferences. It may be useful if you will decide to change barrels of a certain type later. In this case, you will need to edit only one barrel: the others will be updated as well. Включите опцию Place Nodes as NodeReferences, чтобы указанные ноды добавлялись в сцену как NodeReferences. Это может быть полезно, если вы решите позже поменять бочки определенного типа. В этом случае вам нужно будет отредактировать только одну бочку: остальные тоже будут обновлены.
  5. Click Replace. The selected nodes will be replaced with the node references from the list.

    Щелкните Replace. Выбранные ноды будут заменены ссылками на ноды из списка.

Transforming NodesПреобразование нод#

To translate, rotate or scale the selected nodes randomly within the specified range, you need to do the following: Чтобы перемещать, вращать или масштабировать выбранные ноды случайным образом в указанном диапазоне, вам необходимо сделать следующее:

  1. Select the nodes that should be transformed. Выберите ноды, которые необходимо преобразовать.
  2. Specify ranges for the Offset, Rotation and Scale values.

    Укажите диапазоны для значений Offset, Rotation и Scale.

  3. Click Replace. Щелкните Replace.

The randomization will be performed according to the normal law of distribution. Рандомизация будет выполняться в соответствии с нормальным законом распределения.

Usage ExampleПример использования#

  1. Select all barrels in the scene.

    Выбрать все бочки в сцене.

  2. Specify ranges for the transformation parameters:
    • [30;180] degree for rotation about the Z axis.[30;180] degree for rotation about the Z axis.
    • [0;30] for offset along the X and Y axes.[0;30] for offset along the X and Y axes.
    • [1;3] for scale by the X, Y, and Z axes.[1;3] for scale by the X, Y, and Z axes.

    [30;180] degree for rotation about the Z axis.[0;30] for offset along the X and Y axes.[1;3] for scale by the X, Y, and Z axes.
    Укажите диапазоны для параметров преобразования:
    • [30;180] degree for rotation about the Z axis. [30; 180] градус для вращения вокруг оси Z.
    • [0;30] for offset along the X and Y axes. [0; 30] для смещения по осям X и Y.
    • [1;3] for scale by the X, Y, and Z axes. [1; 3] для масштабирования по осям X, Y и Z.

  3. Click Replace. The selected nodes will be transformed according to the specified values.

    Щелкните Replace. Выбранные ноды будут преобразованы в соответствии с указанными значениями.

Video TutorialВидеоурок#

Watch the video below to learn how to add variations with the Randomizer tool.Чтобы узнать о добавлении вариаций объектов сцены, посмотрите следующее видео:

Последнее обновление: 16.12.2022
Build: ()