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会按程序分散对象,从而提高内存效率。同时,这意味着无法移动分散的对象。
See also也可以看看#
- The WorldClutter class to edit World Clutter via API通过API编辑World Clutter的WorldClutter类
Creating a World Clutter造成世界混乱#
To create World Clutter, do the following:要创建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,这些对象散布在确定的区域中,并针对每个对象控制其出现的可能性。
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对象之间的比例。
|
---|---|
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(沿X和Y )除以步长。 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.如果密度值太高,则物体可能会相互穿透。
|
||
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.在可见距离范围内,物体的数量严格由密度参数。这意味着所有应该存在的对象均已找到。
|
||
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是-1至1范围内的随机值。例如,如果参数的Mean值等于3,而Spread值等于1,则最终结果将是从2到4的任意值。
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.这吝啬的标度值不能为负。
|
||||
---|---|---|---|---|---|
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.对象随机散布的区域以及列表中没有任何对象的区域。例如,在地形上,面罩允许将碎屑散布到某些区域,而其他地方则没有空间。
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.为了控制掩膜的强度,使用了掩膜阈值。它检查某个区域的蒙版密度,如果阈值高于蒙版的颜色值,则对象会散布在整个蒙版上。如果遮罩的密度不足,则该位置将裸露。
|
||
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:代表不同高度节点的几个对象可以共享此掩码,如下所示:
|
||
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坐标在垂直方向上只有一个曲面。
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选项时,才启用此参数。
|
||
Angle |
Just like in the case with grass, scattering can take into account how steep the slope is.就像在草,散射可以考虑坡度有多陡。
This parameter is enabled only if the Intersection option is checked.仅当检查Intersection选项时,才启用此参数。 |