This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
Setting Up Properties
照明
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
Extending Editor Functionality
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
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
创建内容
Content Optimization
Materials
Art Samples
Tutorials

World Clutter

The World Clutter node allows scattering a set of identical nodes (node references) randomly across the scene practically in one click. There is no need any longer to position, scale, and rotate every single object by hand and constantly mind the performance factor. World Clutter automatically places nodes in the scene with random parameters, all of which can be efficiently controlled, and renders them only around the camera. World Clutter is used to scatter non-geometry objects, such as decals, particles systems, and so on. But if you want to scatter identical meshes, it is better to use Mesh Clutter.World Clutter节点实际上允许一次单击即可在场景中随机散布一组相同的节点(node references)。不再需要手动定位,缩放和旋转每个单个对象,而始终关注性能因素。 World Clutter会自动将具有随机参数的节点放置在场景中,所有这些参数都可以得到有效控制,并且仅在摄影机周围渲染它们。 World Clutter用于分散非几何对象,例如贴花,粒子系统等。但是,如果要散布相同的网格,最好使用Mesh Clutter

World Clutter scatters objects procedurally and therefore even more memory-efficient. At the same time it means that scattered objects cannot be moved.World Clutter会按程序分散对象,从而提高内存效率。同时,这意味着无法移动分散的对象。

注意
World Clutter uses only Reference Nodes, because when the world is loaded they are scattered around the camera much faster.World Clutter仅使用参考节点,因为加载世界时,它们散布在相机周围的速度更快。

Scattered wood chips created using World Clutter使用World Clutter创建的散落木屑

See also也可以看看#

Creating a World Clutter造成世界混乱#

To create World Clutter, do the following:要创建World Clutter,请执行以下操作:

  1. Add a World Clutter node: in the Menu, choose Create -> Clutter -> Node.添加一个World Clutter节点:菜单,选择Create -> Clutter -> Node

  2. Locate World Clutter on the scene.在现场找到World Clutter

World Clutter Objects世界杂物#

Objects in World Clutter are node references that are scattered throughout a definite area and for each of which the probability of its appearing is controlled.World Clutter中的对象是node references,这些对象散布在确定的区域中,并针对每个对象控制其出现的可能性。

Node references that are contained in the clutter

List of node references in World ClutterWorld Clutter中的节点引用列表
Probability slider

The higher the probability, the more often a node reference can be seen compared to other World Clutter objects. Let's say, we create a coast with wood chips and algae. We create wood chips decal and algae decal and save them as *.node files (create a NodeReference file). If the probability slider for algae is near to zero, the coast is thick with wood chips and only several algae are seen among them. Changing the probability of appearing does not affect the number of rendered objects, it only specifies the proportion between several World Clutter objects.与其他World Clutter对象相比,概率越高,看到node reference的可能性就越高。假设我们用木片和藻类创造了海岸。我们创建木屑贴花和藻类贴花,并将它们另存为*.node文件(创建一个NodeReference文件)。如果藻类的概率滑块接近于零,则海岸将充满木片,并且仅在其中观察到一些藻类。更改出现概率不影响渲染对象的数量,它仅指定多个World Clutter对象之间的比例。

  • If the probability is set to zero, the object is not rendered at all.如果将概率设置为零,则根本不会渲染对象。
  • If there is only one object in World Clutter, the probability parameter (except when it equals zero) is ignored and the object occurrence depends solely on the density.如果World Clutter中只有一个对象,则将忽略概率参数(除非它等于零),并且对象的出现仅取决于密度
Add Add a node reference to the list of World Clutter objects.将参考节点添加到World Clutter对象的列表中。
Remove Delete all selected node references from the list. To select an object, a box near it should be checked.从列表中删除所有选定的node references要选择一个对象,应选中它旁边的框。
Reload Reload all the node references in World Clutter. After a node reference was edited, the saved changes are not automatically applied to the same nodes scattered by World Clutter. It happens because a reference node after being loaded once is copied from the internal cache, which allows creating a lot of copies really fast. Reload option updates this cache and the changes in objects parameters come in effect.将所有node references重新加载到World Clutter中。编辑node reference后,保存的更改不会自动应用于由World Clutter分散的相同节点。发生这种情况的原因是,从内部缓存复制了一次加载后的参考节点,这可以真正快速地创建很多副本。 Reload选项将更新此缓存,并且对象参数的更改生效。

World Clutter Parameters世界杂波参数#

World Clutter is rendered as a 2D grid, in each cell of which a number of World Clutter objects are randomly placed depending on the World Clutter density and probability of appearing. The cells are generated one by one starting from the nearest ones. This approach allows to control how close or far the scattered objects are from each other and at the same time reduce the rendering load when the camera moves and farther cells become visible.World Clutter呈现为2D网格,根据World Clutter的密度和出现的概率,在每个单元中随机放置了多个World Clutter对象。单元是从最近的单元开始一个接一个地生成的。这种方法可以控制分散的对象彼此之间有多近或远,同时还可以减少摄像机移动且可以看到更远的单元格时的渲染负担。

Once added and scattered, the objects cannot be moved or rotated. The only way to change the scattering pattern is to change the seed.一旦添加和分散,这些对象将无法移动或旋转。更改散射图案的唯一方法是更改种子

Size X
Size Y

The size of the World Clutter bounding box along X and Y axis. Within this area objects will be scattered with specified density.沿X和Y轴的World Clutter边界框的大小。在该区域内,对象将以指定的密度散布。

The size is measured in units.大小以单位为单位。

Step for Cells

Cell size in units. The number of cells in World Clutter is defined in the following way: size of World Clutter (both alongX and Y) is divided by the step.像元大小(单位)。通过以下方式定义World Clutter中的像元数:尺寸World Clutter的x(沿XY )除以步长。

The higher the number of cells (i.e. the smaller the step), the higher the load. However, to create one large cell takes longer time. When the camera moves fast enough, small cells will be created very slow, but large ones can noticeably pop into sight and cause a small rendering lag.单元数越多(即步数越小),负载越高。但是,创建一个大单元需要更长的时间。当摄像机移动得足够快时,小单元的创建速度会非常慢,但是大单元会明显地出现在视野中,并导致较小的渲染滞后。

Density

Density specifies how many objects there are per square unit. In case there is more than one object in World Clutter, probability will be taken into account, but will not change the resulting number of all rendered objects.密度指定每平方单位有多少个对象。如果World Clutter中有多个对象,可能性将被考虑在内,但不会更改所有渲染对象的结果数量。

If the density value is too high, objects can be penetrating each other.如果密度值太高,则物体可能会相互穿透。

Lower Density
Lower Density较低的密度
Higher Density
Higher Density更高的密度
Visibility Distance

Across the visibility distance the number of objects is strictly specified by the density parameters. It means that all objects that should be present are found in place.在可见距离范围内,物体的数量严格由密度参数。这意味着所有应该存在的对象均已找到。

  • If set to inf, the Fade Distance parameter will be ignored.如果设置为inf,则将忽略Fade Distance参数。
  • The real radius of World Clutter visibility directly depends on the object (surface) maximum visibility distance and also its fade out distance. However, even in case it disappears at closer distance, further increase of the visible distance will carry performance penalty, because cell generation-related calculations are still performed.World Clutter可见性的真实半径直接取决于对象(表面)最大可见距离还有它的淡出距离。但是,即使它在更近的距离处消失了,可见距离的进一步增加也会带来性能损失,因为仍然执行与细胞生成相关的计算。
  • The visibility distance is actually measured up to the cell: when the camera moves on the specified distance form it, the cell is generated. Without the Fade Distance or the object Maximum Visibility Distance, objects will be rendered in noticeable squares.可见距离实际上是测量到整个像元的距离:当摄像机沿指定距离移动到指定距离时,将生成像元。如果没有Fade Distance或对象Maximum Visibility Distance,则对象将以明显的正方形呈现。
Fade Distance

Across the fade distance the number of objects gradually decreases, as they disappear randomly one by one. Fade distance is measured starting from the Visibility Distance. If fade distance is set, there is no clear line where the objects that are contained in World Clutter abruptly disappear. Instead, a few of them will be left smoothly blend into the background without any visual noise.在淡入淡出距离上,对象的数量逐渐减少,因为它们会随机地一个接一个地消失。淡入距离是从Visibility Distance开始测量的。如果设置了淡入距离,则没有清晰的线条将World Clutter中包含的对象突然消失。取而代之的是,它们中的一些将被平滑地融合到背景中,而没有任何视觉噪音。

注意
For the best result, it is also recommended to combine this effect with objects fade-out.为了获得最佳效果,还建议将此效果与物体淡出
Spawn Rate

Determines how many cells (in which World Clutter is rendered) are updated each frame.确定每帧更新多少个单元(渲染World Clutter的单元)。

注意
Setting too high number of updated cells may lead to a performance spike.设置的更新单元数过多可能会导致性能峰值。
Seed The seed value for pseudo random number generator allows to create different patterns of automatic positioning. The seed is either be set manually or an engine provides a random value for a seed (Randomize option).伪随机数生成器的种子值允许创建不同的自动定位模式。可以手动设置种子,也可以由引擎为种子提供随机值(Randomize选项)。

Randomizing World Clutter Objects随机化世界杂物#

To randomize the appearance of objects that compose the World Clutter, two types of values are used:为了使组成World Clutter的对象的外观随机化,使用了两种类型的值:

  • Mean values (Scale, Offset, Rotation) define the average value. These are the basic values that will be randomly made higher or lower.平均值Scale, Offset, Rotation)定义平均值。这些是将随机提高或降低的基本值。
  • Spread values (Spread) define the range for possible variation of the parameter. The higher the value, the more diverse the final result will be.传播值Spread)定义了参数可能变化的范围。值越高,最终结果将越多样化。

    The spread value is optional: if set to 0, it will not influence the simulation process and only the mean value will be used for all objects.扩展值是可选的:如果设置为0,则不会影响仿真过程,并且仅对所有对象使用平均值。

After these values are specified, each parameter is calculated according to the following formula:指定这些值后,将根据以下公式计算每个参数:

Result = Mean + Random * Spread

where Random is a random value in range from -1 to 1. For example, if a Mean value of the parameter equals 3 and a Spread value equals 1, the final result will be any in range from 2 to 4.其中Random-11范围内的随机值。例如,如果参数的Mean值等于3,而Spread值等于1,则最终结果将是从24的任意值。

Scale

The scale mean value of scattered objects depends on the minimum and maximum scale mean values and the image mask values: the mask values are used to linearly interpolate between the minimum and maximum scale values.散布物体的比例平均值取决于最小和最大比例平均值以及影像遮罩值:遮罩值用于在最小和最大比例值之间线性内插。

The mean scale value cannot be negative.吝啬的标度值不能为负。

Min Scale

Sets the scale mean value for objects scattered in the areas with low density (according to the image mask). The higher the value, the bigger the objects will be in such areas.设置散布在低密度区域中的对象的比例平均值(根据影像遮罩)。值越高,这些区域中的对象将越大。

注意
When image mask is not set, this parameter isn't taken into account as the default mask stores only the maximum mask values (there are no areas with low density).如果未设置图像遮罩,则不会考虑此参数,因为默认遮罩仅存储最大遮罩值(没有低密度的区域)。
Max Scale Sets the scale mean value for objects scattered in the areas with high density (according to the image mask). The higher the value, the bigger the objects will be in such areas.设置散布在高密度区域中的对象的比例平均值(根据影像遮罩)。值越高,这些区域中的对象将越大。
Offset

Height offset parameter controls whether all objects are positioned at one height or some are found higher or lower. For example, with offset stones can be dug deep into the ground so that only a small top part is visible, or placed higher and look bigger.高度偏移参数控制是否将所有对象都定位在一个高度上,或者将某些对象定位在更高或更低的位置。例如,可以将带有偏心的石头挖到地下深处,以便只看到很小的顶部,或者将其放在更高的位置并看起来更大。

The offset is measured in units.偏移量以单位为单位。

Rotation X
Rotation Y
Rotation Z

These parameters allow to randomly orient the scattered objects.这些参数允许随机定向分散的对象。

The rotation is set in angles. If a spread value is set to 180, objects will be rotated by 360 degrees.旋转角度设置。如果散布值设置为180,则对象将旋转360度。

Masking Areas with Objects物体遮蔽区域#

Having objects uniformly scattered in all directions and places is naturally not very convenient. Instead of creating a number of small World Clutter nodes that cover a limited location, a big one can be used with a mask.使物体均匀地分散在各个方向和位置上自然不是很方便。代替创建覆盖覆盖有限位置的多个小World Clutter节点,可以将较大的World Clutter节点与遮罩一起使用。

Image Mask

Areas across which the objects are randomly scattered and areas without any objects from the list. For example, on the terrain, a mask allows to scatter debris across certain areas, while leaving other places free of it.对象随机散布的区域以及列表中没有任何对象的区域。例如,在地形上,面罩允许将碎屑散布到某些区域,而其他地方则没有空间。

注意
When the image mask is not set, the default mask with maximum mask values will be used. The maximum mask value is 255.未设置图像蒙版时,将使用具有最大蒙版值的默认蒙版。 最大掩码值为255
  • The mask is one-channel texture (R8). If there are more channels in the provided mask, they will be ignored.蒙版是单通道纹理(R8)。如果提供的掩码中有更多通道,则将忽略它们。

    • Zero color value specify the areas without World Clutter objects.Zero颜色值指定不包含World Clutter对象的区域。
    • The higher the color value is, the more objects there are in this area and the denser they are positioned.颜色值越高,该区域中存在的对象越多,并且放置的对象越密集。
    • Color value of 255 means the density is as specified in by the corresponding parameter.颜色值255表示密度如对应参数
  • Masking is done for all objects that are contained in World Clutter list.World Clutter列表中包含的所有对象进行屏蔽。

World Clutter mask for scattering

注意
To paint the image mask directly in the scene, use Mask Editor.要直接在场景中绘制图像蒙版,请使用Mask Editor
Threshold for Mask

To control the strength of masking, a mask threshold is used. It checks the masked density for an area and if a threshold value is higher than the color value of the mask, objects are scattered across it. If the masked density is not enough, the place is left bare.为了控制掩膜的强度,使用了掩膜阈值。它检查某个区域的蒙版密度,如果阈值高于蒙版的颜色值,则对象会散布在整个蒙版上。如果遮罩的密度不足,则该位置将裸露。

  • With the minimum value of 0, the mask is applied as it is.最小值为0时,将按原样应用蒙版。
  • With a higher threshold value, the objects are scattered only in areas marked by the mask as dense. Instead of sparse distribution, objects scattered here and there, they are likely to be rendered in dense isolated groups.阈值较高时,对象仅散布在由蒙版标记为密集的区域中。而不是稀疏的分布,而是将对象分散在各处,而是将它们渲染成密集的孤立组。
  • With the maximum value of 1, there will be no objects scattered at all.最大值为1时,根本不会分散任何对象。
Minimum Threshold
Threshold = 0
Maximum Threshold
Threshold = 1
Mesh Mask A mesh-based mask can be used to place objects. Vector masking makes it possible not to depend on the mask texture resolution, and create roads, rivers, etc. with extremely high precision. A mesh for masking should be a simple planar mesh.基于网格的蒙版可用于放置对象。矢量蒙版可以不依赖于蒙版纹理分辨率,并且可以以极高的精度创建道路,河流等。用于遮罩的网格应该是简单的平面网格。
Inverse Toggling the flag makes the objects be placed within or outside the mesh contour.切换标志可使对象放置在网格轮廓之内或之外。
Min and Max mask values

As a solution for advanced objects distribution and memory consumption optimization, not only a whole mask, but any required part of it can be applied to the object. It means that different objects can share the same mask, but use different levels.作为高级对象分配和内存消耗优化的解决方案,不仅可以使用整个蒙版,还可以将其任何需要的部分应用于对象。这意味着不同的对象可以共享相同的蒙版,但是使用不同的级别。

By default, each channel of the Image Mask specifies the areas and the density of growth in the [0;255] color density range. However, by using the minimum and the maximum value, you can specify any color density range within, and the part of the mask that contains the corresponding values will be used to scatter the nodes.默认情况下,影像遮罩指定[0;255]颜色密度范围内的面积和增长密度。但是,通过使用最小值和最大值,您可以指定范围内的任何颜色密度范围,并且包含相应值的蒙版部分将用于分散节点。

Let's take the following R8 Image Mask as an example:让我们看下面的R8影像遮罩举个例子:

Several objects that represent nodes of different heights can share this mask as follows:代表不同高度节点的几个对象可以共享此掩码,如下所示:

  • In range from 100 to 200 density one type of nodes can be stored.在100到200的密度范围内,可以存储一种类型的节点。
  • In range from 190 to 255 density another type of nodes can be stored.在190到255的密度范围内,可以存储另一种类型的节点。
Flip X Horizontal flip of the Image Mask.的水平翻转影像遮罩
Flip Y Vertical flip of the Image Mask.垂直翻转影像遮罩
Cutout Intersection Cutout bit mask. This mask is used to cut out World Clutter objects in the areas of intersection with objects and decals (e.g. to remove vegetation under houses or from the surface of roads projected using decals). World Clutter objects are cut out by objects and decals that have their Intersection masks matching this one (one bit at least).Cutout位掩码。该遮罩用于在与对象和贴花相交的区域中切出World Clutter个对象(例如,去除房屋下方或使用贴花投射的道路表面的植被)。 World Clutter对象被其Intersection掩码与此对象(至少一位)匹配的对象和贴花切出。
Cutout Inverse Toggles the value that indicates whether World Clutter objects should be rendered inside or outside the areas determined by the cutout intersection mask.切换指示World Clutter对象应在cutout intersection遮罩确定的区域内部还是外部渲染的值。

Orienting along the Relief沿救济方向#

Unless objects in World Clutter are scattered over a completely flat and non-tilted surface, they can be automatically positioned to precisely repeat ups and downs of the relief without any effort. For that, an underlying surface should be made a parent of the World Clutter node. (If there are some nodes in the hierarchy between a terrain or mesh node and World Clutter, intersections will still be checked.)除非World Clutter中的对象散布在完全平坦且没有倾斜的表面上,否则它们可以自动定位以精确地重复浮雕的起伏而无需任何努力。为此,应将基础表面设为World Clutter节点的父级。 (如果在terrain或网格节点与World Clutter之间的层次结构中存在某些节点,则仍将检查相交。)

A parent for intersection can only be a terrain or a mesh object. The mesh should be terrain-like, i.e. it should have only one surface vertically, along the Z coordinate.交集的父项只能是地形网格物体。网格应该像地形一样,即沿Z坐标在垂直方向上只有一个曲面。

注意
World Clutter performs only one vertical intersection testing with parent mesh geometry. If there are surfaces underneath the upper surface, they will be ignored. For example, to scatter reference nodes across the whole sphere, two hemisphere meshes need to be used.World Clutter仅对父网格几何图形执行一次垂直相交测试。如果上表面下面有表面,则将忽略它们。例如,要在整个球体上散布参考节点,需要使用两个半球网格。
Intersection

After the Intersection box is checked, objects in World Clutter are scattered across the surface of the parent object.选中Intersection框后,World Clutter中的对象会散布在父对象的整个表面上。

It does not matter if World Clutter is bigger than the parent object in size — the scattering area will still be limited to parent object surfaces.World Clutter是否大于父对象的大小无关紧要-散射区域仍将限于父对象表面。

Orientation

This option allows setting a parent surface normal vector as the initial orientation for scattered objects. It means if the surface in some place is vertical, the up direction for objects scattered over it will be actually pointing to the side. The objects can be still randomly rotated but relatively to the orientation of the parent normal.此选项允许将父曲面法线向量设置为散布对象的初始方向。这意味着,如果某个地方的表面垂直,则散落在其上的物体的向上方向实际上将指向侧面。对象仍然可以是随机的旋转的但相对于父级法线的方向。

This parameter is enabled only if the Intersection option is enabled.仅当启用了Intersection选项时,才启用此参数。

Orientation disabled
Orientation disabled方向已禁用
Orientation enabled
Orientation enabled启用方向
Angle

Just like in the case with grass, scattering can take into account how steep the slope is.就像在,散射可以考虑坡度有多陡。

  • By the minimum value of 0, it makes no difference how flat or how tilted the surface over which World Clutter objects are scattered.通过最小值0,散布World Clutter对象的表面的平坦程度或倾斜程度没有区别。
  • The bigger the value, the flatter the place should be for objects to be scattered over it. So, higher values make less steep surfaces bare.值越大,用于将物体散布在其上的位置应该越平坦。因此,较高的值会使不太陡峭的表面裸露。
  • By the maximum value of 1, the objects can be scattered only over perfectly horizontal surface.通过最大值1,对象只能分散在完全水平的表面上。

This parameter is enabled only if the Intersection option is checked.仅当检查Intersection选项时,才启用此参数。

最新更新: 2021-05-26
Build: ()