shown in other instead.
World Clutter node allows to scatter a set of identical objects (node references) randomly across the scene practically in one click. There is need any longer to position, scale and rotate every single object by hand and constantly mind the performance factor. World Clutter automatically places static objects in the scene with random parameters, all of which can be efficiently controlled, and renders them only around the camera. With World Clutter a mixed forest where different types of trees grow, rocky grounds, locations cluttered with debris and building waste can be created with ease.
Unlike a World Cluster, a World Clutter scatters objects procedurally and therefore even more memory-efficient. At the same time it means that scattered objects cannot be moved.
- A tutorial showing how to scatter objects with the help of World Clutter
- A WorldClutter class to edit world clutters via UnigineScript
Objects in one Clutter are node references that will be scattered throughout a definite area and for each of which the probability of its appearing is controlled.
|Probability slider||The higher the probability, the more often is it can be seen if compared to other Clutter object. Let's say we create a mixed forest with birches and pines. If the probability slider for pines is near to zero, almost all of the forest consists of birches and only several pines will be seen among them. Changing appearing probability does not influence the number of rendered objects, it only specifies the proportion between several objects.
|Add||Add a reference node to the list of Clutter objects.|
|Remove||Delete all selected node references from the list. To select an object, a box near it should be checked.|
|Reload||Reload all the node references in the Clutter. After a node reference was edited, the saved changes will not be automatically applied to the same nodes scattered by the Clutter. It happens because reference node after being loaded once are copied from the internal cache, which allows to create a lot of copies really fast. Reload option updates this cache and changes in objects parameters come in effect.|
World Clutter Parameters
The World Clutter is rendered as a 2D grid, in each cell of which a number of clutter objects are randomly placed depending on the 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.
Once added and scattered, the objects cannot be moved or rotated. The only way to change the scattering pattern is to change the seed.
|The size of the clutter bounding box along X and Y axis. Within this area objects will be scattered with specified density.
|Step for cells||Cell size in units. The number of cells in the Clutter is defined in the following way: size of the Clutter (both along X and Y) is divided by the step.
|Density||Density specifies how many objects there are per square unit. In case there are more than one object in the Clutter, probability will be taken into account, but will not change the resulting number of all rendered objects.
|Visible distance||Within visible 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. The fade distance follows the Visible distance. If a fade distance is set, there is no clear line where the objects that are contained in the Clutter abruptly disappear. Instead, a few left smoothly blend into the background without any visual noise.
|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).
Randomizing Clutter Objects
To randomize the appearance of objects that compose the World Clutter, two types of values are used:
- Mean value (i.e. Scale, Offset, Rotation) defines the average value. This is the basic value that will be randomly made higher or lower.
- Spread value defines the range for possible variation of the parameter. The higher the value, the more diverse the final result will be.
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.
After these values are specified, each parameter is calculated according to the following formula:
- Result = Mean + Random * Spread
|Scale||This parameter allows to randomly scale all scattered objects making some bigger and some smaller.
|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 is visible, or placed higher and look bigger.
Rotation Y Rotation Z
|These parameters allow to randomly orient the scattered objects.
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.
|Image Mask||Areas across which the objects are randomly scattered and areas where there will be no objects from the list. For example, on the terrain a mask allows to scatter stones across the rocky areas, while leaving the grassy ones rock free.
|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 places is left bare.
|Mesh Mask||A mesh-based mask can be used to place the objects. Vector masking allows not to depend the mask texture resolution and create roads, rivers, etc. with extremely high precision. A mesh for masking should be a simple planar mesh.|
|Inverse||The Inverse flag toggles if the objects are placed inside or outside the mesh contour.|
Orienting along the Relief
Unless objects in the 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 me 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.)
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.
|Intersection||After the Intersection box is checked, objects in the World Clutter will be scattered across the surface of the parent object.
|Orientation||This option allows to set 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 over will be actually pointing to the side.
|Angle||Just like in the case with grass, the scattering can take into account how steep the slope is.