为更现实的环境添加变体
Randomizer is a UnigineEditor tool designed for adding variations of the scene objects in few clicks. Randomizer是UnigineEditor工具,设计用于只需单击几下即可添加场景对象的变体。
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.根据正态分布规律在范围内随机更改所选节点的位置,旋转和比例。
Randomizer Settings随机化器设置#
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.
|
---|---|
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.
|
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.
If you enable the Uniform Scale option, you can specify the coefficient only once: the nodes will be scaled along all axes.如果启用Uniform Scale选项,则只能指定一次系数:节点将沿所有轴缩放。
|
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:
|
Replacing Nodes更换节点#
To replace nodes with other nodes taken randomly from the specified set, you need to do the following:要将节点替换为从指定集合中随机抽取的其他节点,您需要执行以下操作:
- Select the nodes that should be replaced. 选择应替换的节点。
- 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.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.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.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.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 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 specify a .node file stored inside the asset container.You can specify a .node file stored inside the asset container.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.在Nodes部分中,按,然后点击在出现的字段中,然后在打开的对话框窗口中选择.node或.mesh文件。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.您可以指定存储在资产容器内的.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.在资产浏览器中选择所需的节点,然后将其拖到Nodes部分。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.您还可以拖动.fbx,.dae,.obj或.3ds文件:将自动指定资产容器中存储的.node文件。
- 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.
- Specify the probability of the node occurrence in the field to the right.在右侧字段中指定节点出现的概率。
- Toggle the Place Nodes as NodeReference option on, if required.如果需要,将Place Nodes as NodeReference选项打开。
- 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:要使桶的类型多样化,我们需要执行以下操作:
- Select all barrels in the scene.
- Add the .node files with different types of barrels to the Nodes section by dragging them from the Asset Browser.
- 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 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
- 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添加到场景。如果您以后决定更换某种类型的桶,这可能会很有用。在这种情况下,您将只需要编辑一个桶,其他桶也将被更新。
- Click Replace. The selected nodes will be replaced with the node references from the list.
Transforming Nodes转换节点#
To translate, rotate or scale the selected nodes randomly within the specified range, you need to do the following:要在指定范围内随机平移,旋转或缩放所选节点,您需要执行以下操作:
- Select the nodes that should be transformed. 选择应转换的节点。
- Specify ranges for the Offset, Rotation and Scale values.
- Click Replace. 单击 Replace.
The randomization will be performed according to the normal law of distribution.将根据分布的正常规律进行随机化。
Usage Example使用范例#
- Select all barrels in the scene.
- 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. [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轴缩放。
- Click Replace. The selected nodes will be transformed according to the specified values.