This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
FAQ
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
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
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

grass_base

A grass_base material is used to create realistic animated grass, plants and flowers. It is applied to ObjectGrass.

Prior Knowledge
This article assumes you have prior knowledge of the following topics. Please read them before proceeding:

States#

States

Materials editor, States tab.

Options#

Auxiliary Pass#

Auxiliary pass is used for writing an additional texture into an auxiliary color buffer. Detail information on the pass can be found in the Rendering Sequence article.

Notice
Enabling this option activates an additional Auxiliary texture and Auxiliary parameters.

Shape#

Shape specifies the way to render the grass geometry:

  • Default - grass quads are rendered as a plain geometry and are turned randomly.
  • Billboard - grass quads are rendered as billboards and always face the camera.
Default shape
Billboard shape

Animation#

Animation option enables animation for objects (e.g. for plants swinging in the wind). Available modes:

  • Disabled - animation is disabled.
  • Default - standard animation is enabled.

    Standard animation
  • Field Animation - standard animation is enabled. Besides, objects are also influenced by FieldAnimation.
    FieldAnimation with visualizer disabled
    FieldAnimation with visualizer enabled
Notice
Enabling this option activates additional Animation parameters.

FieldSpacer Interaction#

FieldSpacer interaction option enables interaction with FieldSpacer objects.

Interaction with FieldSpacer disabled
Interaction with FieldSpacer enabled

Noise#

Noise activates a spatial color noise texture, so the grass field is colored differently according to it. The noise can add irregularity to the color of the grass field or it can color the grass.

Noise disabled
Noise enabled

Notice
Enabling this option activates the additional Noise texture and Noise parameters.

Light Map#

Light map activates an additional light map texture therefore specifying that the material will be rendered lit by it. Color is multiplied by the light map and the ambient color.

Notice
Enabling this option activates the additional Lightmap texture and Lightmap Scale parameters.

Ambient Occlusion#

Ambient Occlusion enables the ambient occlusion that sets shading arising from the ground to the top of the grass blade.

Ambient Occlusion disabled
Ambient Occlusion enabled
Notice
Enabling this option activates the additional Occlusion scale parameter.

Translucent#

Translucent activates an additional translucent texture.

Emission#

Emission activates an additional emission texture. It is used to simulate glow from extremely bright surfaces, therefore imitating real light sources and highlights.

Bend#

Bend activates an additional bend texture and bend scale parameter. It is used to bend grass according to the mask.

Bend option disabled
Bend option enabled

Jitter Transparency#

Jitter transparency enables creating deferred transparency by using jittering. The state can be used when such result is acceptable and post-effects are applied to the material.

Mip Bias#

Mip bias activates an additional mip bias parameter. It is used to adjust mip mapping.

Textures#

Textures

Materials Editor, Textures tab.

Base Textures#

Diffuse Texture#

Diffuse texture defines the grass shape and color. It is subdivided into chunks that are placed in the texture as follows:

  • The horizontal row can have up to 4 chunks. This number depends on the number of channels of the mask texture used.
  • The vertical column can have any number of chunks from 1 to 4. Chunks in the column represent variations of grass of the particular species (thinner, thicker, tangled, etc.). The chunks of the column are randomly spread across the area.

The texture is 4-channeled (RGBA):

  • The RGB values store grass color information.
  • The alpha (A) stores transparency information and defines which parts of the grass chunks will be rendered colored and which ones will be cut by means of the alpha test.

Notice
The chunks of the diffuse texture can be rendered according to a mask texture. In this case, each chunk of the horizontal row will correspond to the red, green, blue and alpha channels of the mask (see details).

Options Textures#

Noise Texture#

Noise texture is used to color the grass (for example, to match the colors of the terrain) or to add irregularity to the color of the grass field. In both cases, the colors of the grass diffuse texture and the spatial noise texture are blended in the overlay mode.

The texture is 3-channeled (RGB).

Noise texture used to add color irregularity
Noise texture used to color the grass

For example, if you apply these textures to the following grass field and set the Noise Scale to 0.6, you will get the following result:

The original grass field

The texture that is used to color the grass is usually generated based on the terrain's albedo colors. The texture and the terrain size may differ, but dimensions of the the spatial noise texture should be equal to some power of two (for example, 1024 × 1024, 2048 × 2048, and so on).

Notice
The texture is present only if Noise is enabled.

Lightmap Texture#

Lightmap texture stores pre-computed light information.

Notice
This texture is present only if Light Map is enabled.

Translucent Texture#

Translucent texture stores information on material's translucency.

Notice
This texture is present only if Translucent is enabled.

Auxiliary Texture#

Auxiliary texture is used for auxiliary rendering pass.

Emission Texture#

Emission texture stores information about the light emission. It is blended additively over a texture, so areas which do not glow at all should be pure black on the glow mask, and any brighter colors will appear to be emitting light.

The texture is 4-channeled (RGBA):

  • The RGB values store information on a glowing color.
  • The alpha (A) value stores a glow mask:
    • White color indicates that the area is glowing.
    • Black color indicates that the area is not glowing.

Notice
The texture is present only if Emission option is enabled.

Bend Texture#

Bend texture stores the grass bending mask.

The texture is 1-channeled (R):

  • R - bend intensity values.

Notice
The texture is present only if Bend option is enabled.

Parameters#

Notice
Availability of some parameters depends on the set States field values.

All the parameters have default values, which can be replaced by your own ones.

Material Mask#

Material mask parameter specifies a decal bit-mask. If the material mask of the decal material matches the material mask of the surface material, the decal will be projected.

Base Shading Parameters#

Diffuse Color#

Diffuse texture color is the base color of the grass surface.

Specular Color#

Specular is a color picker to choose the auxiliary specular color. It can be used for specifying different specular colors for one texture or modifying the texture color on the spot.

Gloss#

Gloss is a coefficient modifying the size of the highlight. Low values imitate wider highlights, typically appropriate to create diffuse reflection from mat surfaces. High values imitate pinpoint highlights, typically appropriate to create uniform reflection of light rays from glossy surfaces.

Microfiber#

Microfiber is a coefficient to scale the intensity of the microfiber effect. This parameter creates an effect of the napped surface. The higher the value, the higher the microfiber effect is.

Translucent#

A coefficient to scale the translucent effect, which permits light to pass through the grass blades, but diffuses it so objects behind the grass blades are not visible. The higher the value, the more translucent the material is.

Alpha Intensity#

A coefficient to scale the value of the alpha channel of the grass diffuse texture. The higher the value, the bigger areas of the texture are rendered.

Slope#

A coefficient to scale the inclination of grass polygons.

  • By the minimum value of 0, inclination of the grass polygons coincides direction of the normal of the polygon on which the grass grows.
  • When increasing the parameter value, the inclination of the grass polygons relative to the camera increases.
Changing value from 0 to 0.6 and conversely

Mip Bias#

Coefficient for mip maps adjusting.

Animation Parameters#

Stem Noise#

Stem noise is a coefficient to scale a spatial noise that diversifies the direction of movement of the grass.

  • 0 makes the grass move uniformly.
  • Increasing the value makes the grass blades movement more random.

Stem Offset#

Stem offset is a coefficient to scale an amplitude of horizontal movement of the grass.

Stem Radius#

Stem radius is a coefficient to scale an amplitude of vertical movement of the grass.

Stem Scale#

Stem scale is a coefficient to scale the speed of grass movement.

Noise#

Transform#

Spatial noise texture coordinates transformation along X, Y and Z axes. A vector of the three float components:

  • By high values, color blobs are small in size (for example, several blobs per leaf). Tiles of the spatial noise texture are small and repeat often
  • By low values, color blobs are big (for example, several blobs for the whole tree). Tiles of the spatial noise texture are big and repeat a few times

Scale#

Scale is a coefficient to scale intensity of the spatial noise texture.

Emission#

Color#

Color is a color multiplier for the emission texture.

Intensity#

Intensity is a coefficient to scale intensity of the emission texture. The higher the value, the lighter and brighter light areas of the emission texture are.

Lightmap#

Intensity#

Intensity is a coefficient to scale the intensity of the light map illumination. The higher the value, the brighter the illumination is.

Gamma#

Gamma parameter specifies the gamma of the light map texture.

Ambient Occlusion#

Visibility#

Visibility parameter specifies how the AO has influence on grass.

Multiplier#

Multiplier is a coefficient to scale the occlusion that sets shading starting from the ground to the top of the grass blades. The higher the value, the less shaded the grass is.

Power#

Power parameter sets the rate of ambient occlusion appearance on the grass.

On Diffuse#

On Diffuse shows how ambient occlusion affects the grass diffuse texture.

Auxiliary#

Color#

Color is a constant color for the auxiliary rendering pass.

Bend Scale#

Intensity is a coefficient to scale bending of the grass. The higher the value, the more significant the bending is.

Bend Scale = 0.6
Bend Scale = 0.8
Last update: 2019-12-25
Build: ()