Grass Settings
The article describes all settings available in the Node tab of the Parameters window for the grass node.
Adding Grass#
To add grass to the world, perform the following:
- On the Menu bar, click Create -> Grass -> Base.
- Place the grass object somewhere in the world.
- Set the required grass parameters described below.
See also the tutorial on Adding Grass for a more detailed explanation on adding grass and setting its parameters.
Grass Parameters#
Num textures | Sets a number of grass clusters (or plants, or flowers) lined up horizontally in the diffuse texture. Read more about this parameter here. This value cannot exceed 4. |
---|---|
Size X | Specifies the length of the grass area along the X axis. |
Size Y | Specifies the length of the grass area along the Y axis. |
Step | Sets the size of the cells into which the grass field is split.
|
Subdivision | Subdivides each cell into the specified number of parts. This is usually required when grass is used as a low-poly distant LOD of a forest created by using World Clutter or an ObjectMeshClutter with a smaller cell size: the Subdivision parameter subdivides large grass cells so that they match the smaller clutter cells. This way, positions of randomly scattered objects will coincide with positions of grass-based impostors. The range of available values is from 1 to 32. |
Density | Determines how many grass quads are to be rendered per square unit taking into account the step of division and the number of cells. |
Randomizing Grass#
To randomize the appearance of grass quads, two types of values are used:
- Mean value (i.e.Aspect, Min/Max Bend, Min/Max Height, Offset) defines the average value. With its help, the designer can set milestones to control the parameter.
- Spread value defines the range for a possible variation of the parameter. The higher the value, the more diverse the final result is.
Spread value is optional: if set to 0, it does not influence the simulation process and only the mean value is uniformly used.
After these values are specified, the following formula is used to calculate the final result for the parameter:
Result = Mean + Random * Spread,
where
Random is a random value in the range from -1 to 1. This means that the parameter differs for each grass quad on the field to the desired extent (see example with Min and Max Height below).
Spread value is optional: if set to 0, it does not influence the simulation process and only the mean value is used for all objects.
Variation | On the randomly chosen quads, flips the diffuse texture horizontally, automatically giving two variants available for rendering of varied blades. | ||
---|---|---|---|
Min Bend | Determines the mean grass quad sloping value in areas with the minimum density according to the image mask. The higher the Min height value, the more bent the grass is in areas with the minimum density. | ||
Max Bend | Determines the mean grass quad sloping value in areas with the maximum density according to the image mask. The higher the Max height value, the more bent the grass is in areas with the maximum density. | ||
Min height | Determines the mean value for the height of grass blades quads rendered in areas with the minimum density according to the image mask. The higher the Min height value, the higher the grass is in areas with the minimum density.
|
||
Max height | Determines the mean value for the height of grass blades quads rendered in areas with the maximum density according to the image mask. The higher the Max height value, the higher the grass is in areas with the maximum density.
|
||
Aspect | Sets an aspect to calculate the width of a grass quad:
Width = Max height * Aspect
Aspect is set for each of the diffuse texture columns separately and can be randomly varied if
spread value is set in addition to mean one. |
||
Offset | Specifies the offset in units up the surface normal, thus accurately repeating its relief. It is set by mean value (only positive) and additional spread value (positive or negative), if variation is required. | ||
Rotation | It might be necessary to add more diversity via random rotation of grass quads. This parameter specifies the rotation of grass quads in degrees. It is set by mean value (only positive) and additional spread value (positive or negative), if variation is required. Values are set for each of the diffuse texture columns separately. | ||
Probability | Sets the grass rendering probability per diffuse texture column. | ||
Seed | Sets an integer value used to generate pseudo-random successions of numbers. The parameter is used to randomly position grass blades quads across an area by an image mask.
The same Seed value will always generate the same successions of numbers. |
Masking Grass Areas#
Mask Image | Mask that determines the density distribution of the grass.
|
||
---|---|---|---|
Threshold | Controls starting from what density (according to the mask), the grass should grow. This means, that if in some particular place the threshold value is higher than the color or alpha value of the mask, it is rendered grassless.
|
||
Min value | Image mask minimum value of the color density range. Read more here. | ||
Max value | Image mask maximum value of the color density range. Read more here. | ||
Flip X | Flips an image mask horizontally. | ||
Flip Y | Flips an image mask vertically. For example:
After flipping the image mask by the Y axis, the grass has started growing on the stony area. Density and color of grass growing on the presented area have also changed. |
||
Mesh mask | Mesh-based mask that is used to specify areas where grass can grow. A mesh for masking should be a simple planar mesh.
Mesh used as a mask
|
||
Terrain Mask | Four Masks of the Landscape Terrain each to be used to define the areas of growth for the corresponding grass texture slot (grass type). If there are several grass clusters in a vertical column, they will be randomly spread across the masked area. | ||
Inverse | Toggles the value that indicates if grass grows inside or outside the mesh contour. | ||
Field mask |
The field mask set for the grass object must match the field mask of a Field node applied to the grass object. |
||
Cutout Intersection | Cutout bit mask. This mask is used to cut out the grass in the areas of intersection with objects and decals (e.g. can be used to remove grass under houses or from the surface of roads projected using decals). The grass will be cut out by objects and decals that have their intersection masks matching this one (one bit at least). | ||
Cutout Inverse | Toggles the value that indicates whether the grass should be rendered inside or outside the areas determined by the cutout intersection mask. |
Orienting Along the Relief#
Intersection | Flag indicating whether grass should follow the relief. | ||
---|---|---|---|
Orientation | Flag indicating whether grass polygons are oriented along the normal of its parent node (for example, terrain).
Read more here. |
||
Angle | Sets the ground slope angle.
|
Optimizing Grass#
Thinning | Flag indicating whether grass is thinned out with a distance.
|
---|---|
Spawn | Sets the number of cells rendered each frame. The higher the spawn rate, the more likely a performance spike will occur. |
Triangles | Counter that shows the total number of grass polygons. The shown values can be, for example, compared after changing some parameters in order to improve performance. |
Last update:
24.11.2020
Помогите сделать статью лучше
Была ли эта статья полезной?
(или выберите слово/фразу и нажмите Ctrl+Enter